✨ feat(eww): use gnome-like workspaces in bar
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
|
||||
(defpoll output_volume :interval "500ms"
|
||||
`echo "$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | sed -e 's/Volume: //' -e 's/^1\./1/' -e 's/^0.//' -e 's/^00/0/')%"`)
|
||||
(deflisten volume_out :initial '{ "volume": "100%" }'
|
||||
`sh -c "source './scripts/volume.sh'; get_json_loop"`)
|
||||
|
||||
(defwidget audio []
|
||||
(eventbox
|
||||
:onscroll `sh -c "SCROLL='{}'; source './scripts/volume.sh'; Update_volume"`
|
||||
|
||||
(button :class "audio" " ${output_volume}")
|
||||
:onscroll `[[ {} == "up" ]]; sh -c "source './scripts/volume.sh'; increase_vol" || sh -c "source './scripts/volume.sh'; decrease_vol"`
|
||||
(button " ${volume_out.volume}")
|
||||
)
|
||||
)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
(deflisten active_window :initial ""
|
||||
`sh ./scripts/window.sh`)
|
||||
`sh ./scripts/active-window.sh`)
|
||||
|
||||
(defwidget window []
|
||||
(button :visible { active_window.class == "null" ? false : true }
|
||||
|
||||
@@ -8,10 +8,11 @@
|
||||
(defwidget workspaces []
|
||||
(eventbox :onscroll "[[ {} == up ]] && hyprctl dispatch workspace e+1 || hyprctl dispatch workspace e-1"
|
||||
(box :class "workspaces"
|
||||
:space-evenly false
|
||||
(for workspace in json_workspaces
|
||||
(button :onclick "hyprctl dispatch workspace ${workspace.id}"
|
||||
:class "${ json_active_workspace.id == workspace.id ? "active" : "default" }"
|
||||
"${workspace.id}")
|
||||
"")
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user