diff --git a/modules/wm/hyprland/config/eww/eww_variables.yuck b/modules/wm/hyprland/config/eww/eww_variables.yuck index 388acd7..a868abe 100644 --- a/modules/wm/hyprland/config/eww/eww_variables.yuck +++ b/modules/wm/hyprland/config/eww/eww_variables.yuck @@ -11,11 +11,16 @@ `echo $(whoami)@$(hostname)` ) +(defpoll time + :interval "1s" + :initial-value "" + "date +'%H:%M:%S'" +) + (defpoll TODAY :interval "1s" `date +%m/%d/%y`) (defpoll distro :interval "12h" "awk '/^ID=/' /etc/*-release | awk -F'=' '{ print tolower($2) }'") (defpoll de :interval "12h" "echo $XDG_CURRENT_DESKTOP") (defpoll shell :interval "5m" "echo $SHELL | awk -F'/' '{print $NF}'") -(defpoll uptime :interval "30s" "./scripts/uptime.sh") (defpoll packages :interval "5m" "pacman -Q | wc -l") ;;;; NOTES, MUSIC, NETWORKING diff --git a/modules/wm/hyprland/config/eww/eww_widgets.yuck b/modules/wm/hyprland/config/eww/eww_widgets.yuck index 82821e4..29f2840 100644 --- a/modules/wm/hyprland/config/eww/eww_widgets.yuck +++ b/modules/wm/hyprland/config/eww/eww_widgets.yuck @@ -24,11 +24,6 @@ (button :onclick "pcmanfm ~/Downloads &" "") (button :onclick "pcmanfm ~/Pictures &" ""))) -;;;; Big Calendar Widget - -(defwidget cal [] - (calendar :halign "center" :valign "center" :class "cal" :month 10 :year 2021)) - ;;;; Small date in mm/dd/yy format (defwidget smalldate [] @@ -54,7 +49,7 @@ (label :style "color: #b48ead;" :halign "start" :text ": ${distro}") (label :style "color: #ebcb8b;" :halign "start" :text ": Hyprland") (label :style "color: #80a0c0;" :halign "start" :text ": ${shell}") - (label :style "color: #b48ead;" :halign "start" :text ": ${uptime}") + (label :style "color: #b48ead;" :halign "start" :text ": ${time}") )))) ;;;; System Information Widget @@ -73,12 +68,11 @@ (label :class "quote-text" :text "${quote_text}" :wrap true))) ;;;; QuickSettings widget - (defwidget quicksettings [] (box :orientation "h" :space-evenly true :class "quicksettings" :spacing "10" :halign "center" :valign "center" - (button :style "color: #5e81ac;" :onclick "mpv --demuxer-lavf-format=video4linux2 --demuxer-lavf-o-set=input_format=mjpeg av://v4l2:/dev/video0 &" (image :path "/home/horsema" :width 32 :height 32)) - (button :style "color: #81a1c1; padding-left: 3px;" :onclick "pavucontrol &" (image :path "images/audio-headphones.svg" :width 32 :height 32)) - (button :style "color: #b48ead;" :onclick "sh ~/.config/eww/scripts/airplane_mode.sh &" (image :path "images/network-card.svg" :width 32 :height 32)))) + (button :onclick "playerctl previous &" (image :path "images/prev.svg" :width 32 :height 32)) + (button :onclick "playerctl play-pause &" (image :path "images/play.svg" :width 32 :height 32)) + (button :onclick "playerctl next &" (image :path "images/next.svg" :width 32 :height 32)))) ;;;; AppBar widget (defwidget appbar [] diff --git a/modules/wm/hyprland/config/eww/eww_windows.yuck b/modules/wm/hyprland/config/eww/eww_windows.yuck index ad8b6ee..f5321fa 100644 --- a/modules/wm/hyprland/config/eww/eww_windows.yuck +++ b/modules/wm/hyprland/config/eww/eww_windows.yuck @@ -69,19 +69,6 @@ :anchor "top left") (appbar)) -;;;; Big Calendar Window - -(defwindow calendar - :wm-ignore: true - :monitor 0 - :windowtype "dock" - :geometry (geometry :x "20px" - :y "415px" - :width "240px" - :height "160px" - :anchor "top left") -(cal)) - ;;;; Favorite Locations Window (defwindow favorites diff --git a/modules/wm/hyprland/config/eww/images/next.svg b/modules/wm/hyprland/config/eww/images/next.svg new file mode 100644 index 0000000..23ee212 --- /dev/null +++ b/modules/wm/hyprland/config/eww/images/next.svg @@ -0,0 +1,46 @@ + + + + + + + + + + + + diff --git a/modules/wm/hyprland/config/eww/images/play.svg b/modules/wm/hyprland/config/eww/images/play.svg new file mode 100644 index 0000000..4196951 --- /dev/null +++ b/modules/wm/hyprland/config/eww/images/play.svg @@ -0,0 +1,4 @@ + + + + diff --git a/modules/wm/hyprland/config/eww/images/prev.svg b/modules/wm/hyprland/config/eww/images/prev.svg new file mode 100644 index 0000000..1f259db --- /dev/null +++ b/modules/wm/hyprland/config/eww/images/prev.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/modules/wm/hyprland/config/eww/scripts/battery.sh b/modules/wm/hyprland/config/eww/scripts/battery.sh deleted file mode 100755 index 369c7b7..0000000 --- a/modules/wm/hyprland/config/eww/scripts/battery.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -cap=$(cat /sys/class/power_supply/BAT1/capacity) - -charge=$(cat /sys/class/power_supply/BAT1/status) - -[[ $charge == "Discharging" ]] && echo -$cap% || echo +$cap% diff --git a/modules/wm/hyprland/config/eww/scripts/open.sh b/modules/wm/hyprland/config/eww/scripts/open.sh new file mode 100755 index 0000000..f32d050 --- /dev/null +++ b/modules/wm/hyprland/config/eww/scripts/open.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +eww open-many --toggle notes quote smalldate quicksettings favorites appbar fetch sys diff --git a/modules/wm/hyprland/config/eww/scripts/windows.sh b/modules/wm/hyprland/config/eww/scripts/windows.sh deleted file mode 100755 index 89f9101..0000000 --- a/modules/wm/hyprland/config/eww/scripts/windows.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -if [ $(hyprctl -j clients | jq '.[].workspace.id' | grep -w $1 | wc -l) -eq 0 ]; then - echo "⬦" -else - echo "⟐" -fi diff --git a/modules/wm/hyprland/config/eww/vars.yuck b/modules/wm/hyprland/config/eww/vars.yuck deleted file mode 100644 index 53dc180..0000000 --- a/modules/wm/hyprland/config/eww/vars.yuck +++ /dev/null @@ -1,84 +0,0 @@ -; ---- TIME ---- -(defpoll time - :interval "1s" - :initial-value "" - "date +'%H:%M:%S'" -) - - - -; ---- SYSTRAY ---- -(defpoll battery - :interval "10s" - :initial-value "" - "./scripts/battery.sh" -) - - - -; ---- WORKSPACES ---- -;(defpoll workspace -; :interval '0.1s' -; :initial-value "" -; "hyprctl -j activeworkspace | jq '.id'" -;) -; -;(defpoll windows-1 -; :interval '0.1s' -; :initial-value "" -; "./scripts/windows.sh 1" -;) -; -;(defpoll windows-2 -; :interval '0.1s' -; :initial-value "" -; "./scripts/windows.sh 2" -;) -; -;(defpoll windows-3 -; :interval '0.1s' -; :initial-value "" -; "./scripts/windows.sh 3" -;) -; -;(defpoll windows-4 -; :interval '0.1s' -; :initial-value "" -; "./scripts/windows.sh 4" -;) -; -;(defpoll windows-5 -; :interval '0.1s' -; :initial-value "" -; "./scripts/windows.sh 5" -;) -; -;(defpoll windows-6 -; :interval '0.1s' -; :initial-value "" -; "./scripts/windows.sh 6" -;) -; -;(defpoll windows-7 -; :interval '0.1s' -; :initial-value "" -; "./scripts/windows.sh 7" -;) -; -;(defpoll windows-8 -; :interval '0.1s' -; :initial-value "" -; "./scripts/windows.sh 8" -;) -; -;(defpoll windows-9 -; :interval '0.1s' -; :initial-value "" -; "./scripts/windows.sh 9" -;) -; -;(defpoll windows-10 -; :interval '0.1s' -; :initial-value "" -; "./scripts/windows.sh 10" -;)