👽
This commit is contained in:
1 parent
0b17aa140b
commit
dde4ef218a
136 files changed
+9796
No files matched your search
Executable
+45
@@ -0,0 +1,45 @@
|
||||
#!/bin/bash
|
||||
|
||||
players="spotify,%any,firefox,chromium,brave,mpd"
|
||||
player_status=$(playerctl -p $players status)
|
||||
script_dir=$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd)
|
||||
exit=$?
|
||||
|
||||
scroll () {
|
||||
zscroll -l 20 \
|
||||
--delay 1 \
|
||||
--scroll-padding " | " \
|
||||
--match-command "$script_dir/scroll scroll-music" \
|
||||
--match-text "Playing" "--scroll 1" \
|
||||
--match-text "Paused" "--scroll 0" \
|
||||
--update-check true "$script_dir/scroll" &
|
||||
wait
|
||||
}
|
||||
|
||||
|
||||
if [ $exit -eq 0 ]; then
|
||||
status=$player_status
|
||||
else
|
||||
status="Offline"
|
||||
fi
|
||||
|
||||
if [ "$1" == "scroll-music" ]; then
|
||||
echo $status
|
||||
else
|
||||
if [ $status = "Stopped" ]; then
|
||||
echo "Offline"
|
||||
elif [ $status = "Paused" ]; then
|
||||
playerctl -p $players metadata --format '{{ artist }} - {{ title }}'
|
||||
elif [ $status = "Offline" ]; then
|
||||
echo $status
|
||||
else
|
||||
playerctl -p $players metadata --format '{{ artist }} - {{ title }}'
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
case $1 in
|
||||
scroll-toggle)
|
||||
scroll
|
||||
;;
|
||||
esac
|
||||
Reference in new issue
Block a user