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
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

View File

@@ -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 {

View File

@@ -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" "󰓅")

View File

@@ -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."
notify-send -a "spotify-lyrics" "Cache Cleared" "The lyrics cache have been cleared."

View File

@@ -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;