✨ feat(panel): add workspace indicator to panel
This commit is contained in:
1 parent
3f9c9139a6
commit
610865ef2d
5 files changed
+75
-19
No files matched your search
@@ -0,0 +1,25 @@
|
||||
from fabric.hyprland.widgets import HyprlandWorkspaces, WorkspaceButton
|
||||
from fabric.widgets.box import Box
|
||||
|
||||
# TODO: Support Multi Monitor
|
||||
|
||||
class WorkspaceIndicator(Box):
|
||||
def __init__(self, **kwargs):
|
||||
super().__init__(
|
||||
name="workspace-indicator",
|
||||
orientation="h",
|
||||
spacing=4,
|
||||
**kwargs
|
||||
)
|
||||
|
||||
self.workspaces = HyprlandWorkspaces(
|
||||
name="workspaces",
|
||||
spacing=4,
|
||||
buttons_factory=lambda ws_id: WorkspaceButton(
|
||||
id=ws_id,
|
||||
label=str(ws_id)
|
||||
),
|
||||
)
|
||||
|
||||
self.add(self.workspaces)
|
||||
self.show_all()
|
||||
Reference in new issue
Block a user