diff --git a/eww/eww.yuck b/eww/eww.yuck index 916491e..d68c282 100644 --- a/eww/eww.yuck +++ b/eww/eww.yuck @@ -29,9 +29,13 @@ "/home/val/.config/eww/scripts/lan.sh" ) (defpoll SCREENSAVER - :interval "3s" + :interval "2s" "/home/val/.config/eww/scripts/screensaver.sh" ) +(defpoll NOTIFICATION + :interval "2s" + "/home/val/.config/eww/scripts/dunst.sh" +) ;;(defpoll PLAYING ;; :interval "50ms" ;; "playerctl status" @@ -109,7 +113,7 @@ ) ) ) -(defwidget redshift [] +(defwidget notification [] (box :class "module" :space-evenly false @@ -117,6 +121,19 @@ :spacing "3" (button :class "icon" + :onclick "dunstctl set-paused toggle" + NOTIFICATION + ) + ) +) +(defwidget redshift [] + (box + :class "module" + :space-evenly false + :orientation "h" + :spacing "3" + (button + :class "icon lg" :onclick "exec ~/.script/sysmenu.py redshift &" REDSHIFT ) @@ -170,6 +187,7 @@ :class "right_modules" (keyboard) (screensaver) + (notification) (redshift) (wifi) (sidebar_toggle) diff --git a/eww/scripts/dunst.sh b/eww/scripts/dunst.sh new file mode 100755 index 0000000..100bfcd --- /dev/null +++ b/eww/scripts/dunst.sh @@ -0,0 +1,8 @@ +#!/usr/bin/bash + +if [[ "`dunstctl is-paused`" == "true" ]]; then + echo '󰂛' +else + echo '󰂞' +fi +