🔧 chore(dock): add system tray and update tray visibility in DockComponents

This commit is contained in:
sankalp committed 2025-06-07 23:02:52 +05:45
1 parent a6f47cc548
commit 904dfa2b6b
7 files changed
+377 -113

No files matched your search

+10 -10
View File
@@ -5,15 +5,15 @@ from fabric.widgets.label import Label
connection = Hyprland()
def create_workspace_widget():
workspaceData = connection.send_command("j/activeworkspace").reply
activeWorkspace = json.loads(workspaceData.decode("utf-8"))["name"]
workspace_label = Label(label=f"{activeWorkspace}")
workspaceData = connection.send_command("j/activeworkspace").reply
activeWorkspace = json.loads(workspaceData.decode("utf-8"))["name"]
workspace = Label(label=f"{activeWorkspace}")
def on_workspace(obj, signal):
nonlocal workspace_label
activeWorkspace = json.loads(signal.data[0])
workspace_label.set_label(f"{activeWorkspace}")
connection.connect("event::workspace", on_workspace)
return workspace_label
def on_workspace(obj, signal):
global activeWorkspace
activeWorkspace = json.loads(signal.data[0])
workspace.set_label(f"{activeWorkspace}")
connection.connect("event::workspace", on_workspace)