feat(update): huge changes
This commit is contained in:
98 files changed
+9636
-5575
No files matched your search
@@ -2,18 +2,29 @@ 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"]
|
||||
workspace = Label(label=f"Workspace {activeWorkspace}")
|
||||
|
||||
# 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])
|
||||
workspace.set_label(f"Workspace {activeWorkspace}")
|
||||
|
||||
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)
|
||||
Reference in new issue
Block a user