This commit is contained in:
sankalp committed 2026-07-12 18:56:10 +05:45
1 parent 6b62051f93
commit dc60e20bd7
182 files changed
+18062 -277

No files matched your search

@@ -0,0 +1,32 @@
import json
from fabric.hyprland.service import Hyprland
from fabric.widgets.label import Label
import config.data as data
connection = Hyprland()
workspaceData = connection.send_command("j/activeworkspace").reply
activeWorkspace = json.loads(workspaceData.decode("utf-8"))["name"]
# Create the workspace label with proper initialization
if not data.VERTICAL:
workspace = Label(label=f"Workspace {activeWorkspace}", name="workspace-name")
else:
workspace = Label(
v_align="center",
label="W\no\nr\nk\ns\np\na\nc\ne\n\n" + activeWorkspace,
name="workspace-name",
)
def on_workspace(obj, signal):
global activeWorkspace
activeWorkspace = json.loads(signal.data[0])
if not data.VERTICAL:
workspace.set_label(f"Workspace {activeWorkspace}")
else:
workspace.set_label(f"W\no\nr\nk\ns\np\na\nc\ne\n\n{activeWorkspace}")
connection.connect("event::workspace", on_workspace)