✨ feat: use eww as bar!
This commit is contained in:
@@ -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}")
|
||||
)
|
||||
)
|
||||
@@ -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}")
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,4 @@
|
||||
(defwidget logo []
|
||||
(button :class "distro-logo"
|
||||
"")
|
||||
)
|
||||
@@ -0,0 +1,5 @@
|
||||
(defwidget notifications []
|
||||
(box :class "notifications"
|
||||
(button :onclick "swaync-client -t" "")
|
||||
)
|
||||
)
|
||||
@@ -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}")
|
||||
)
|
||||
@@ -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}")
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
Reference in New Issue
Block a user