feat: use eww as bar!

This commit is contained in:
João Dias
2024-11-23 10:10:28 -03:00
parent 1f08358b10
commit fb7b91699e
18 changed files with 349 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
(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/')%"`)
(defwidget audio []
(eventbox
:onscroll `sh -c "SCROLL='{}'; source './scripts/volume.sh'; Update_volume"`
(button :class "audio" "󰕾 ${output_volume}")
)
)
+12
View File
@@ -0,0 +1,12 @@
(defpoll datetime :interval "10s"
"date +'%A %d, %H:%M'")
(defvar calendar_state "hidden")
(defwidget clock []
(box :class "clock"
(button :onclick "sh ./scripts/display-calendar.sh"
"${datetime}")
)
)
+4
View File
@@ -0,0 +1,4 @@
(defwidget logo []
(button :class "distro-logo"
"")
)
View File
+5
View File
@@ -0,0 +1,5 @@
(defwidget notifications []
(box :class "notifications"
(button :onclick "swaync-client -t" "")
)
)
+10
View File
@@ -0,0 +1,10 @@
(defpoll windowInfo :interval "250ms"
"sh ./scripts/get-window.sh")
(defvar widget_window_visible true)
(defwidget window []
(button :visible "${widget_window_visible}"
"${windowInfo}")
)
+15
View File
@@ -0,0 +1,15 @@
(deflisten json_workspaces
:initial "[{1: {}, 2:{}}]"
`hyprctl -j workspaces`)
(defwidget workspaces []
(eventbox :onscroll "[[ {} =~ up ]] && hyprctl dispatch workspace e+1 || hyprctl dispatch workspace e-1"
(box :class "workspaces"
(for i in json_workspaces
(button :onclick "hyprctl dispatch workspace ${i}"
"${i[0].num}")
)
)
)
)