hardcode SwayNC next to Controls

This commit is contained in:
piotr
2022-01-27 11:42:02 +01:00
parent e7763c51ef
commit ea5f553a4e
3 changed files with 12 additions and 8 deletions

View File

@@ -1071,7 +1071,7 @@ class EditorWrapper(object):
"root-css-name": "root-executor",
"css-name": "executor",
"icon-placement": "left",
"icon-size": 16,
"icon-size": 18,
"interval": 1,
"always-show-icon": False
}

View File

@@ -185,12 +185,6 @@ def instantiate_content(panel, container, content_list, icons_path=""):
else:
print("'{}' not defined in this panel instance".format(item))
if item == "swaync":
if item not in panel:
panel[item] = {}
sway_nc = SwayNC(panel[item], icons_path)
container.pack_start(sway_nc, False, False, panel["items-padding"])
if item == "clock":
if item in panel:
clock = Clock(panel[item])
@@ -453,6 +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 panel["menu-start"] == "left":
ms = MenuStart(panel, icons_path=icons_path)
left_box.pack_start(ms, False, False, 0)
@@ -488,6 +487,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)
window.add(vbox)
GtkLayerShell.init_for_window(window)

View File

@@ -30,7 +30,7 @@ class SwayNC(Gtk.EventBox):
check_key(settings, "root-css-name", "root-executor")
check_key(settings, "css-name", "executor-label")
check_key(settings, "icon-placement", "left")
check_key(settings, "icon-size", 16)
check_key(settings, "icon-size", 18)
check_key(settings, "tooltip-text", "")
check_key(settings, "on-left-click", "swaync-client -t")
check_key(settings, "on-right-click", "")