11 lines
506 B
Plaintext
11 lines
506 B
Plaintext
(defwidget workspaces_button []
|
|
(eventbox
|
|
:onscroll "hyprctl dispatch workspace e${matches({},"up") ? '+' : '-' }1"
|
|
:onclick "hyprctl dispatch workspace ${workspace_total + 1}"
|
|
(box :class "workspace_button"
|
|
"${workspace_active}/${workspace_total}")))
|
|
|
|
(defpoll workspace_total :interval "1s" "hyprctl workspaces | grep ID | cut -c 2-2<<< $(awk 'END{print $4}')")
|
|
(defpoll workspace_active :interval "1s" "hyprctl activeworkspace |grep ID | cut -c 1-1<<< $(awk 'FNR == 1 {print $3}')")
|
|
|