♻️ refactor(bar): Rename Language widget to HyprlandLanguage for clarity

This commit is contained in:
sankalp committed 2025-07-29 12:39:38 +05:45
1 parent 86e1e98004
commit c626734a00
3 files changed
+5 -2

No files matched your search

+1
View File
@@ -0,0 +1 @@
{}
+2 -2
View File
@@ -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())
+2
View File
@@ -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)