eww: play-pause button

This commit is contained in:
2025-06-24 17:54:40 +02:00
parent d47e53cf4e
commit 565f67efc3
5 changed files with 13 additions and 8 deletions

View File

@@ -23,6 +23,8 @@ brightnessctl
pamixer pamixer
qt5ct qt5ct
qt6ct qt6ct
spicetify # spotify tweaks
spicetify-maketplace # spotify themes
waybar waybar
eww eww
@@ -33,8 +35,11 @@ pavucontrol
nautilus # file manager and file picker nautilus # file manager and file picker
gnome-text-editor # or kwrite, just notepad replacement gnome-text-editor # or kwrite, just notepad replacement
btop # system monitor btop # system monitor
activate-linux # :/
maplemonol-nf-cn
ttf-font-awesome ttf-font-awesome
meslo font # I installed manually
nwg-look # theme of GTK apps nwg-look # theme of GTK apps
catppuccin-gtk-theme-mocha # theme of GTK apps catppuccin-gtk-theme-mocha # theme of GTK apps
polkit-gnome # polkit authentication agent polkit-gnome # polkit authentication agent

View File

@@ -155,8 +155,8 @@
padding: 11px; padding: 11px;
margin: 10px 20px 20px 10px; margin: 10px 20px 20px 10px;
border-radius: 15px; border-radius: 15px;
background-color: $gray-alt; // background-color: $gray-alt;
box-shadow: 5px 5px 8px rgba(0, 0, 0, 0.5); // box-shadow: 5px 5px 8px rgba(0, 0, 0, 0.5);
} }
.offset-label { .offset-label {

View File

@@ -3,7 +3,7 @@
(defpoll position :interval "1s" "~/.local/bin/spotify-lyrics position") (defpoll position :interval "1s" "~/.local/bin/spotify-lyrics position")
(defpoll length :interval "1s" "~/.local/bin/spotify-lyrics length") (defpoll length :interval "1s" "~/.local/bin/spotify-lyrics length")
(defpoll offset :interval "1s" "cat $HOME/.local/state/eww/lyrics/offset") (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 [] (defwidget lyrics []
(box :class "lyrics-window" :space-evenly "false" :orientation "v" (box :class "lyrics-window" :space-evenly "false" :orientation "v"
@@ -41,9 +41,9 @@
(box :class "player-controls-box" (box :class "player-controls-box"
:vexpand "false" :hexpand "false" :valign "center" :space-evenly "false" :orientation "h" :vexpand "false" :hexpand "false" :valign "center" :space-evenly "false" :orientation "h"
(button :class "player-prev" :onclick "playerctl prev --player=spotify" "󰒮") (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 "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" (box :class "offset-box"
:vexpand "false" :hexpand "true" :valign "center" :halign "center" :space-evenly "false" :orientation "h" :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-box-single" :vexpand "false" :hexpand "false" :space-evenly "true" :orientation "v"
(box :class "control-row-1-single" :space-evenly "false" :orientation "h" (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-plus-single" :onclick "Lyrics/scripts/lyric-offset.py +500" "󰾆")
(button :class "offset-reset-single" :onclick "Lyrics/scripts/lyric-offset.py" "󰾅") (button :class "offset-reset-single" :onclick "Lyrics/scripts/lyric-offset.py" "󰾅")
(button :class "offset-minus-single" :onclick "Lyrics/scripts/lyric-offset.py -500" "󰓅") (button :class "offset-minus-single" :onclick "Lyrics/scripts/lyric-offset.py -500" "󰓅")

View File

@@ -3,4 +3,4 @@
killall spotify-lyrics killall spotify-lyrics
sleep 0.1 sleep 0.1
"$HOME/.local/bin/spotify-lyrics" clear "$HOME/.local/bin/spotify-lyrics" clear
notify-send -a "spotify-lyrics" "Lyrics Cleared" "The lyrics have been cleared." notify-send -a "spotify-lyrics" "Cache Cleared" "The lyrics cache have been cleared."

View File

@@ -11,7 +11,7 @@
} }
.date-box { .date-box {
// background-color: $gray-alt; // background-color: $bg;
margin: 20px 20px 0px 20px; margin: 20px 20px 0px 20px;
min-width: 290px; min-width: 290px;
padding: 20px 10px 20px 10px; padding: 20px 10px 20px 10px;