New backup 2025-09-01 12:00:01

This commit is contained in:
Penelope Gwen 2025-09-01 12:00:01 -07:00
parent b2f8c0ff37
commit 53b18a5de5

View file

@ -5,22 +5,6 @@
(defvar wsreveal false) (defvar wsreveal false)
(defwidget workspaces [array] (defwidget workspaces [array]
;(box :class "bar-module"
; :space-evenly false
; (button :class "profile"
; :onclick 'sp-profiles next'
; (label :text '${active_profile}'))
; (box :class "chevron"
; :width 32
; (transform :rotate 12.5
; :translate-x '-50%'
; :translate-y '50%'
; :transform-origin-x '50%'
; :transform-origin-y '50%'
; :scale-x '100%'
; :scale-y '100%'
; (box :width 32)))
; (windowtitle)
(eventbox (eventbox
:onhover "${EWW_CMD} update wsreveal=true" :onhover "${EWW_CMD} update wsreveal=true"
:onhoverlost "${EWW_CMD} update wsreveal=false" :onhoverlost "${EWW_CMD} update wsreveal=false"
@ -44,7 +28,7 @@
(for entry in array (for entry in array
(literal (literal
:visible {entry.focused ? true : false} :visible {entry.focused ? true : false}
:content {entry.focused ? '(workspace :ws entry :side '"center ${jq(array, '.[0].num)'}"')' : "(box :visible false)"}))) :content {entry.focused ? "(workspace :ws entry :side 'center' :lastws ${jq(array,'.[-1].num')})" : "(box :visible false)"})))
(revealer (revealer
:class "ws-right" :class "ws-right"
:reveal wsreveal :reveal wsreveal
@ -55,26 +39,10 @@
(literal (literal
:visible {((entry.num >= activeWorkspace) && !entry.focused) ? true : false} :visible {((entry.num >= activeWorkspace) && !entry.focused) ? true : false}
:content {((entry.num >= activeWorkspace) && !entry.focused) ? "(workspace :ws entry :side 'right')" : "(box :visible false)"}))))))) :content {((entry.num >= activeWorkspace) && !entry.focused) ? "(workspace :ws entry :side 'right')" : "(box :visible false)"})))))))
;)
; (for entry in array (defwidget workspace [ws side ?lastws]
; {entry.focused ? (workspace :ws entry) : ""})))
; (for ws in {}
; (box
; (literal
; :visible {(entry.num < jq(array, '.. | select(.type?) | select(.focused==true).num', 'r')) ? true : false}
; :content {(entry.num < jq(array, '.. | select(.type?) | select(.focused==true).num', 'r')) ? "(workspace :ws entry)" : "(box :visible false)"})
; (literal
; :visible {entry.focused ? true : false}
; :content {entry.focused ? "(workspace :ws entry)" : "(box :visible false)"})
; (literal
; :visible {(entry.num > jq(array, '.. | select(.type?) | select(.focused==true).num')) ? true : false}
; :content {(entry.num > jq(array, '.. | select(.type?) | select(.focused==true).num')) ? "(workspace :ws entry)" : "(box :visible false)"})))))
(defwidget workspace [ws side]
(button :onclick `swaymsg workspace "${ws.name}"` (button :onclick `swaymsg workspace "${ws.name}"`
:class side :class '${side} ${ws.num == lastws ? "last_workspace" : ""}'
(box (box
'${replace(ws.name,".*:","")}' '${replace(ws.name,".*:","")}'
(label (label