From 565f67efc3eb1eb67622aaab390d4b7a623bc4a8 Mon Sep 17 00:00:00 2001 From: Uyanide Date: Tue, 24 Jun 2025 17:54:40 +0200 Subject: [PATCH] eww: play-pause button --- .memo/hyprland-ricing | 5 +++++ eww/Lyrics/eww.scss | 4 ++-- eww/Lyrics/eww.yuck | 8 ++++---- eww/Lyrics/scripts/lyric-clear.sh | 2 +- eww/Main/eww.scss | 2 +- 5 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.memo/hyprland-ricing b/.memo/hyprland-ricing index ba1f444..14f0d27 100644 --- a/.memo/hyprland-ricing +++ b/.memo/hyprland-ricing @@ -23,6 +23,8 @@ brightnessctl pamixer qt5ct qt6ct +spicetify # spotify tweaks +spicetify-maketplace # spotify themes waybar eww @@ -33,8 +35,11 @@ pavucontrol nautilus # file manager and file picker gnome-text-editor # or kwrite, just notepad replacement btop # system monitor +activate-linux # :/ +maplemonol-nf-cn ttf-font-awesome +meslo font # I installed manually nwg-look # theme of GTK apps catppuccin-gtk-theme-mocha # theme of GTK apps polkit-gnome # polkit authentication agent diff --git a/eww/Lyrics/eww.scss b/eww/Lyrics/eww.scss index 1ab9899..2d99bd1 100644 --- a/eww/Lyrics/eww.scss +++ b/eww/Lyrics/eww.scss @@ -155,8 +155,8 @@ padding: 11px; margin: 10px 20px 20px 10px; border-radius: 15px; - background-color: $gray-alt; - box-shadow: 5px 5px 8px rgba(0, 0, 0, 0.5); + // background-color: $gray-alt; + // box-shadow: 5px 5px 8px rgba(0, 0, 0, 0.5); } .offset-label { diff --git a/eww/Lyrics/eww.yuck b/eww/Lyrics/eww.yuck index a5d03a7..f2dec54 100644 --- a/eww/Lyrics/eww.yuck +++ b/eww/Lyrics/eww.yuck @@ -3,7 +3,7 @@ (defpoll position :interval "1s" "~/.local/bin/spotify-lyrics position") (defpoll length :interval "1s" "~/.local/bin/spotify-lyrics length") (defpoll offset :interval "1s" "cat $HOME/.local/state/eww/lyrics/offset") -(defvar hover false) +(defpoll play-button :interval "1s" "if ~/.local/bin/spotify-lyrics status; then echo \"󰏤\"; else echo \"󰐊\"; fi")(defvar hover false) (defwidget lyrics [] (box :class "lyrics-window" :space-evenly "false" :orientation "v" @@ -41,9 +41,9 @@ (box :class "player-controls-box" :vexpand "false" :hexpand "false" :valign "center" :space-evenly "false" :orientation "h" (button :class "player-prev" :onclick "playerctl prev --player=spotify" "󰒮") - (button :class "player-pp" :onclick "playerctl play-pause --player=spotify" "󰏤") + (button :class "player-pp" :onclick "playerctl play-pause --player=spotify" "${play-button}") (button :class "player-next" :onclick "playerctl next --player=spotify" "󰒭") - (button :class "lyrics-info" :onclick "ghostty -e '\"$HOME/.local/bin/spotify-lyrics\" fetch | less' &" "") + (button :class "lyrics-info" :onclick "ghostty -e '\"$HOME/.local/bin/spotify-lyrics\" fetch -p | less' &" "") ) (box :class "offset-box" :vexpand "false" :hexpand "true" :valign "center" :halign "center" :space-evenly "false" :orientation "h" @@ -67,7 +67,7 @@ ) (box :class "control-box-single" :vexpand "false" :hexpand "false" :space-evenly "true" :orientation "v" (box :class "control-row-1-single" :space-evenly "false" :orientation "h" - (button :class "info-single" :onclick "ghostty -e '\"$HOME/.local/bin/spotify-lyrics\" fetch | less' &" "") + (button :class "info-single" :onclick "ghostty -e '\"$HOME/.local/bin/spotify-lyrics\" fetch -p | less' &" "") (button :class "offset-plus-single" :onclick "Lyrics/scripts/lyric-offset.py +500" "󰾆") (button :class "offset-reset-single" :onclick "Lyrics/scripts/lyric-offset.py" "󰾅") (button :class "offset-minus-single" :onclick "Lyrics/scripts/lyric-offset.py -500" "󰓅") diff --git a/eww/Lyrics/scripts/lyric-clear.sh b/eww/Lyrics/scripts/lyric-clear.sh index c91782c..ff2d7a5 100755 --- a/eww/Lyrics/scripts/lyric-clear.sh +++ b/eww/Lyrics/scripts/lyric-clear.sh @@ -3,4 +3,4 @@ killall spotify-lyrics sleep 0.1 "$HOME/.local/bin/spotify-lyrics" clear -notify-send -a "spotify-lyrics" "Lyrics Cleared" "The lyrics have been cleared." \ No newline at end of file +notify-send -a "spotify-lyrics" "Cache Cleared" "The lyrics cache have been cleared." \ No newline at end of file diff --git a/eww/Main/eww.scss b/eww/Main/eww.scss index 5c497e3..e5f3254 100644 --- a/eww/Main/eww.scss +++ b/eww/Main/eww.scss @@ -11,7 +11,7 @@ } .date-box { - // background-color: $gray-alt; + // background-color: $bg; margin: 20px 20px 0px 20px; min-width: 290px; padding: 20px 10px 20px 10px;