eww: dashboard(fake) & spotify player

This commit is contained in:
2025-06-18 13:46:51 +02:00
parent 514cbdabfc
commit 285f7a37b7
37 changed files with 1417 additions and 25 deletions

57
eww/Player/scripts/player Executable file
View File

@@ -0,0 +1,57 @@
#!/bin/bash
if [[ $1 == "--length" ]]; then
playerctl -p spotify metadata mpris:length
fi
if [[ $1 == "--open" ]]; then
URL=$(playerctl -p spotify metadata xesam:url)
echo "$URL?go=1&utm_medium=desktop"
fi
if [[ $1 == "--artist" ]]; then
"$HOME/.config/eww/Player/scripts/music-artist"
fi
if [[ $1 == "--length-time" ]]; then
"$HOME/.config/eww/Player/scripts/music-length"
fi
if [[ $1 == "--length-info" ]]; then
"$HOME/.config/eww/Player/scripts/music-length-info"
fi
if [[ $1 == "--cover" ]]; then
"$HOME/.config/eww/Player/scripts/music-art"
fi
if [[ $1 == "--album" ]]; then
"$HOME/.config/eww/Player/scripts/music-album"
fi
if [[ $1 == "--current-volume" ]]; then
VOLUME=$(playerctl -p spotify volume)
echo $(python -c "print(float("$VOLUME")*100)")
fi
if [[ $1 == "--volume" ]]; then
CURRENT_VOLUME=$2
NOW_VOLUME=$(python -c "print(float($CURRENT_VOLUME)/100)")
playerctl -p spotify volume "$NOW_VOLUME"
fi
if [[ $1 == "--shuffle" ]]; then
if [[ $(playerctl -p spotify shuffle) == "On" ]]; then
playerctl -p spotify shuffle off
else
playerctl -p spotify shuffle On
fi
fi
if [[ $1 == "--current-pos" ]]; then
playerctl -p spotify position --format '{{ duration(position) }}'
fi
if [[ $1 == "--launch-lyrics" ]]; then
eww open --toggle lyrics
fi