New backup 2025-07-24 10:15:02
This commit is contained in:
parent
447185d311
commit
59f3c990e3
1 changed files with 37 additions and 7 deletions
|
@ -1,6 +1,7 @@
|
||||||
(deflisten workspacesArray :initial '[{"name": "placeholder","focused":true,"num":0}]'
|
(deflisten workspacesArray :initial '[{"name": "placeholder","focused":true,"num":0}]'
|
||||||
'scripts/bar/workspaces')
|
'scripts/bar/workspaces')
|
||||||
|
|
||||||
|
|
||||||
(defwidget workspaces [array]
|
(defwidget workspaces [array]
|
||||||
(box :class "workspaces"
|
(box :class "workspaces"
|
||||||
:orientation "h"
|
:orientation "h"
|
||||||
|
@ -8,10 +9,39 @@
|
||||||
:halign "start"
|
:halign "start"
|
||||||
|
|
||||||
(for entry in array
|
(for entry in array
|
||||||
(button :onclick `swaymsg workspace "${entry.name}"`
|
; {entry.focused ? (workspace :ws entry) : ""})))
|
||||||
:class {entry.focused ? "focused" : ""}
|
; (for ws in {}
|
||||||
(box
|
(literal
|
||||||
'${replace(entry.name,".*:","")}'
|
:content {entry.focused ? "(workspace :ws entry)" : ""}))))
|
||||||
(label
|
;; {entry.focused ? "${entry.num}" : ""})))
|
||||||
:class "workspace-number"
|
; (button :onclick `swaymsg workspace "${entry.name}"`
|
||||||
:text {jq(captures(entry.num, '[0-9]$'),'.[].[]','r')}))))))
|
; :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')}))))))
|
||||||
|
|
Loading…
Add table
Reference in a new issue