From 6aab08ec9b215c2393af1bb0e614a03b62dee721 Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Mon, 2 Sep 2024 19:07:19 +0200 Subject: [PATCH] do more bar things --- .../eww/configDir/bottomBar/bottomBar.yuck | 41 +++++++++++++++++++ .../home/panels/eww/configDir/eww.css | 2 +- .../home/panels/eww/configDir/eww.yuck | 1 + .../eww/configDir/scripts/workspaces.nu | 3 ++ .../panels/eww/configDir/topBar/topBar.yuck | 11 +++-- .../home/panels/eww/configDir/util.yuck | 4 +- 6 files changed, 53 insertions(+), 9 deletions(-) create mode 100644 modules/desktop-environment/home/panels/eww/configDir/bottomBar/bottomBar.yuck create mode 100644 modules/desktop-environment/home/panels/eww/configDir/scripts/workspaces.nu diff --git a/modules/desktop-environment/home/panels/eww/configDir/bottomBar/bottomBar.yuck b/modules/desktop-environment/home/panels/eww/configDir/bottomBar/bottomBar.yuck new file mode 100644 index 0000000..2a2da02 --- /dev/null +++ b/modules/desktop-environment/home/panels/eww/configDir/bottomBar/bottomBar.yuck @@ -0,0 +1,41 @@ +(defwindow bottomBar + :monitor 0 + :stacking "fg" + :wm-ignore true + :exclusive true + :geometry (geometry + :width "100%" + :height "32px" + :anchor "bottom center") + (bottomBar)) + +(defwidget bottomBar [] + (overlay + :class "bottomBar" + (centerbox + (box + :halign "start" + (label :text "left") + ) + (box + :halign "center" + (label :text "mid") + ) + (box + :halign "end" + (label :text "right") + ) + ) + (box + :class "lesbianFlag" + :height 1 + ( flagEl :flipped true :color "#D52D00") + ( flagEl :flipped true :color "#EF7627") + ( flagEl :flipped true :color "#FF9A56") + ( flagEl :flipped true :color "#FFFFFF") + ( flagEl :flipped true :color "#D162A4") + ( flagEl :flipped true :color "#B55690") + ( flagEl :flipped true :color "#A30262") + ) + ) +) diff --git a/modules/desktop-environment/home/panels/eww/configDir/eww.css b/modules/desktop-environment/home/panels/eww/configDir/eww.css index 3e12d0f..851f731 100644 --- a/modules/desktop-environment/home/panels/eww/configDir/eww.css +++ b/modules/desktop-environment/home/panels/eww/configDir/eww.css @@ -1,4 +1,4 @@ -.topbar { +.topBar { margin-bottom: 2px; } diff --git a/modules/desktop-environment/home/panels/eww/configDir/eww.yuck b/modules/desktop-environment/home/panels/eww/configDir/eww.yuck index d17d0f0..5e5d10d 100644 --- a/modules/desktop-environment/home/panels/eww/configDir/eww.yuck +++ b/modules/desktop-environment/home/panels/eww/configDir/eww.yuck @@ -1 +1,2 @@ (include "topBar/topBar.yuck") +(include "bottomBar/bottomBar.yuck") diff --git a/modules/desktop-environment/home/panels/eww/configDir/scripts/workspaces.nu b/modules/desktop-environment/home/panels/eww/configDir/scripts/workspaces.nu new file mode 100644 index 0000000..6e72651 --- /dev/null +++ b/modules/desktop-environment/home/panels/eww/configDir/scripts/workspaces.nu @@ -0,0 +1,3 @@ +def main [] { + mut workspaces = waymsg -rt get_workspaces | from json | select name focused urgent; +} diff --git a/modules/desktop-environment/home/panels/eww/configDir/topBar/topBar.yuck b/modules/desktop-environment/home/panels/eww/configDir/topBar/topBar.yuck index 8963e5a..be4b25f 100644 --- a/modules/desktop-environment/home/panels/eww/configDir/topBar/topBar.yuck +++ b/modules/desktop-environment/home/panels/eww/configDir/topBar/topBar.yuck @@ -5,7 +5,6 @@ (defwindow topBar :monitor 0 :stacking "fg" - :windowtype "normal" :wm-ignore true :exclusive true :geometry (geometry @@ -46,11 +45,11 @@ (box :class "transFlag" :height 1 - ( flagEl :color "#5BCEFA") - ( flagEl :color "#F5A9B8") - ( flagEl :color "#FFFFFF") - ( flagEl :color "#F5A9B8") - ( flagEl :color "#5BCEFA") + ( flagEl :flipped false :color "#5BCEFA") + ( flagEl :flipped false :color "#F5A9B8") + ( flagEl :flipped false :color "#FFFFFF") + ( flagEl :flipped false :color "#F5A9B8") + ( flagEl :flipped false :color "#5BCEFA") ) ) ) diff --git a/modules/desktop-environment/home/panels/eww/configDir/util.yuck b/modules/desktop-environment/home/panels/eww/configDir/util.yuck index 53b9be5..f0aa592 100644 --- a/modules/desktop-environment/home/panels/eww/configDir/util.yuck +++ b/modules/desktop-environment/home/panels/eww/configDir/util.yuck @@ -1,6 +1,6 @@ -(defwidget flagEl [color] +(defwidget flagEl [color ?flipped] (box - :style "border-bottom: 3px solid ${color}" + :style "border-${flipped ? "top" : "bottom"}: 3px solid ${color}" :halign "fill" ) )