From 54a1e34fa602a3538e7b3cc051163e214e82c0cf Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Tue, 10 Sep 2024 22:07:27 +0200 Subject: [PATCH] refactor bottomBar smol bit --- .../eww/configDir/bottomBar/bottomBar.yuck | 20 ++----------------- .../eww/configDir/bottomBar/workspaces.yuck | 17 ++++++++++++++++ 2 files changed, 19 insertions(+), 18 deletions(-) create mode 100644 modules/desktop-environment/home/panels/eww/configDir/bottomBar/workspaces.yuck diff --git a/modules/desktop-environment/home/panels/eww/configDir/bottomBar/bottomBar.yuck b/modules/desktop-environment/home/panels/eww/configDir/bottomBar/bottomBar.yuck index 6c31965..f3bbb94 100644 --- a/modules/desktop-environment/home/panels/eww/configDir/bottomBar/bottomBar.yuck +++ b/modules/desktop-environment/home/panels/eww/configDir/bottomBar/bottomBar.yuck @@ -1,3 +1,5 @@ +(include "bottomBar/workspaces.yuck") + (defwindow bottomBar :monitor 0 :stacking "fg" @@ -39,21 +41,3 @@ ) ) ) - -(defwidget workspaceWidget [] - (box - :class "workspaces" - (for workspace in workspaces - (button - :class "${workspace.urgent ? "urgent" : ""} ${workspace.focused ? "focused" : 0}" - :onclick "swaymsg workspace ${workspace.name}" - (label :text "${workspace.name}") - ) - ) - ) -) - -(deflisten workspaces - :initial "[]" - "bar-ws-monitor" -) diff --git a/modules/desktop-environment/home/panels/eww/configDir/bottomBar/workspaces.yuck b/modules/desktop-environment/home/panels/eww/configDir/bottomBar/workspaces.yuck new file mode 100644 index 0000000..4c5495f --- /dev/null +++ b/modules/desktop-environment/home/panels/eww/configDir/bottomBar/workspaces.yuck @@ -0,0 +1,17 @@ +(defwidget workspaceWidget [] + (box + :class "workspaces" + (for workspace in workspaces + (button + :class "${workspace.urgent ? "urgent" : ""} ${workspace.focused ? "focused" : 0}" + :onclick "swaymsg workspace ${workspace.name}" + (label :text "${workspace.name}") + ) + ) + ) +) + +(deflisten workspaces + :initial "[]" + "bar-ws-monitor" +)