diff --git a/config/assets/accounts.json b/config/assets/accounts.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/config/assets/accounts.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/modules/bar/bar.py b/modules/bar/bar.py index 61a2653..6a54a56 100644 --- a/modules/bar/bar.py +++ b/modules/bar/bar.py @@ -1,4 +1,4 @@ -from fabric.hyprland.widgets import Language, get_hyprland_connection +from fabric.hyprland.widgets import HyprlandLanguage, get_hyprland_connection from fabric.hyprland.service import HyprlandEvent from fabric.system_tray.widgets import SystemTray from fabric.widgets.shapes import Corner @@ -262,7 +262,7 @@ class Bar(Window): self.launcher.open("calendar") def on_language_switch(self, _=None, event: HyprlandEvent = None): - lang = event.data[1] if event else Language().get_label() + lang = event.data[1] if event else HyprlandLanguage().get_label() self.language.set_tooltip_text(lang) if not data.VERTICAL: self.lang_label.set_label(lang[:2].lower()) diff --git a/modules/bar/components/workspace.py b/modules/bar/components/workspace.py index 072364b..e24a3d1 100644 --- a/modules/bar/components/workspace.py +++ b/modules/bar/components/workspace.py @@ -19,6 +19,7 @@ else: name="workspace-name", ) + def on_workspace(obj, signal): global activeWorkspace activeWorkspace = json.loads(signal.data[0]) @@ -27,4 +28,5 @@ def on_workspace(obj, signal): else: workspace.set_label(f"W\no\nr\nk\ns\np\na\nc\ne\n\n{activeWorkspace}") + connection.connect("event::workspace", on_workspace)