check if 'swaync' installed
This commit is contained in:
@@ -28,7 +28,8 @@ commands = {
|
||||
"netifaces": False,
|
||||
"btmgmt": False,
|
||||
"wlr-randr": False,
|
||||
"upower": False
|
||||
"upower": False,
|
||||
"swaync": False
|
||||
}
|
||||
|
||||
icons_path = "" # "icons_light", "icons_dark" or "" (GTK icons)
|
||||
|
@@ -496,7 +496,11 @@ class EditorWrapper(object):
|
||||
btn.connect("clicked", self.edit_scratchpad)
|
||||
|
||||
btn = builder.get_object("btn-swaync")
|
||||
btn.connect("clicked", self.edit_swaync)
|
||||
if is_command("swaync"):
|
||||
btn.connect("clicked", self.edit_swaync)
|
||||
else:
|
||||
btn.set_sensitive(False)
|
||||
btn.set_tooltip_text("The 'swaync' package required")
|
||||
|
||||
btn = builder.get_object("btn-executors")
|
||||
btn.connect("clicked", self.select_executor)
|
||||
|
@@ -87,6 +87,19 @@
|
||||
<property name="position">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="btn-swaync">
|
||||
<property name="label" translatable="yes">Notifications</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">5</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="btn-menu-start">
|
||||
<property name="label" translatable="yes">Menu Start</property>
|
||||
@@ -97,7 +110,7 @@
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">5</property>
|
||||
<property name="position">6</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@@ -110,7 +123,7 @@
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">6</property>
|
||||
<property name="position">7</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@@ -123,7 +136,7 @@
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">7</property>
|
||||
<property name="position">8</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@@ -136,7 +149,7 @@
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">8</property>
|
||||
<property name="position">9</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@@ -149,7 +162,7 @@
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">9</property>
|
||||
<property name="position">10</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@@ -159,19 +172,6 @@
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">10</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="btn-swaync">
|
||||
<property name="label" translatable="yes">Notification Center</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
|
@@ -447,10 +447,11 @@ def main():
|
||||
common.controls_list.append(cc)
|
||||
left_box.pack_start(cc, False, False, 0)
|
||||
|
||||
if "swaync" not in panel:
|
||||
panel["swaync"] = {}
|
||||
sway_nc = SwayNC(panel["swaync"], icons_path)
|
||||
left_box.pack_start(sway_nc, False, False, 0)
|
||||
if common.commands["swaync"]:
|
||||
if "swaync" not in panel:
|
||||
panel["swaync"] = {}
|
||||
sway_nc = SwayNC(panel["swaync"], icons_path)
|
||||
left_box.pack_start(sway_nc, False, False, 0)
|
||||
|
||||
if panel["menu-start"] == "left":
|
||||
ms = MenuStart(panel, icons_path=icons_path)
|
||||
@@ -487,10 +488,11 @@ def main():
|
||||
common.controls_list.append(cc)
|
||||
right_box.pack_end(cc, False, False, 0)
|
||||
|
||||
if "swaync" not in panel:
|
||||
panel["swaync"] = {}
|
||||
sway_nc = SwayNC(panel["swaync"], icons_path)
|
||||
right_box.pack_end(sway_nc, False, False, 0)
|
||||
if common.commands["swaync"]:
|
||||
if "swaync" not in panel:
|
||||
panel["swaync"] = {}
|
||||
sway_nc = SwayNC(panel["swaync"], icons_path)
|
||||
right_box.pack_end(sway_nc, False, False, 0)
|
||||
|
||||
window.add(vbox)
|
||||
|
||||
|
Reference in New Issue
Block a user