From 59f3c990e37b8f7f495668aeedb4f42e766b15d2 Mon Sep 17 00:00:00 2001 From: Penelope Gwen Date: Thu, 24 Jul 2025 10:15:02 -0700 Subject: [PATCH] New backup 2025-07-24 10:15:02 --- .../.config/eww/modules/bar/workspaces.yuck | 44 ++++++++++++++++--- 1 file changed, 37 insertions(+), 7 deletions(-) diff --git a/de/home/.config/eww/modules/bar/workspaces.yuck b/de/home/.config/eww/modules/bar/workspaces.yuck index c22c493..2af759a 100644 --- a/de/home/.config/eww/modules/bar/workspaces.yuck +++ b/de/home/.config/eww/modules/bar/workspaces.yuck @@ -1,6 +1,7 @@ (deflisten workspacesArray :initial '[{"name": "placeholder","focused":true,"num":0}]' 'scripts/bar/workspaces') + (defwidget workspaces [array] (box :class "workspaces" :orientation "h" @@ -8,10 +9,39 @@ :halign "start" (for entry in array - (button :onclick `swaymsg workspace "${entry.name}"` - :class {entry.focused ? "focused" : ""} - (box - '${replace(entry.name,".*:","")}' - (label - :class "workspace-number" - :text {jq(captures(entry.num, '[0-9]$'),'.[].[]','r')})))))) +; {entry.focused ? (workspace :ws entry) : ""}))) +; (for ws in {} + (literal + :content {entry.focused ? "(workspace :ws entry)" : ""})))) +;; {entry.focused ? "${entry.num}" : ""}))) +; (button :onclick `swaymsg workspace "${entry.name}"` +; :class {entry.focused ? "focused" : ""} +; (box +; '${replace(entry.name,".*:","")}' +; (label +; :class "workspace-number" +; :text {jq(captures(entry.num, '[0-9]$'),'.[].[]','r')})))))) + +(defwidget workspace [ws] + (button :onclick `swaymsg workspace "${ws.name}"` + :class {ws.focused ? "focused" : ""} + (box + '${replace(ws.name,".*:","")}' + (label + :class "workspace-number" + :text {jq(captures(ws.num, '[0-9]$'),'.[].[]','r')})))) + +;(defwidget workspaces [array] +;(box :class "workspaces" +; :orientation "h" +; :space-evenly false +; :halign "start" +; +; (for entry in array +; (button :onclick `swaymsg workspace "${entry.name}"` +; :class {entry.focused ? "focused" : ""} +; (box +; '${replace(entry.name,".*:","")}' +; (label +; :class "workspace-number" +; :text {jq(captures(entry.num, '[0-9]$'),'.[].[]','r')}))))))