46 lines
1.2 KiB
Text
46 lines
1.2 KiB
Text
(defvar reveal_shortcuts true)
|
|
(defwidget shortcuts_revealer []
|
|
(revealer-on-press
|
|
:revealvar reveal_shortcuts
|
|
:revealvar-name "reveal_shortcuts"
|
|
(button
|
|
; :width 300
|
|
:class "revealer-title"
|
|
"Shortcuts ${reveal_shortcuts ? '' : ''}")
|
|
(shortcuts)))
|
|
|
|
(defwidget shortcuts []
|
|
(box
|
|
:class "shortcuts"
|
|
:orientation "v"
|
|
:space-evenly false
|
|
:halign "center"
|
|
:width 300
|
|
:height 50
|
|
(box
|
|
; :visible {jq(workspacesArray, '.[]\|select(.focused==true).num') <= 10}
|
|
:visible (arraylength(sway_info.workspace_profile.scripts) > 0)
|
|
:orientation "v"
|
|
:space-evenly true
|
|
:spacing 5
|
|
:halign "fill"
|
|
(for script in {jq(sway_info,'[.workspace_profile.scripts[]]','r')}
|
|
(button
|
|
:visible "${script?.name!='null'}"
|
|
:onclick "${script?.command}"
|
|
:tooltip "${script?.name}"
|
|
; :width 300
|
|
(box
|
|
:orientation "h"
|
|
:space-evenly false
|
|
:halign "fill"
|
|
(label
|
|
:height 20
|
|
:class "icon"
|
|
:text "${script?.icon}")
|
|
(label
|
|
:class "buttontext"
|
|
:text "${script?.name}")))
|
|
)
|
|
)
|
|
))
|