This commit is contained in:
天クマ 2025-12-18 12:09:34 -03:00
commit c8734e660a
392 changed files with 21043 additions and 0 deletions

View file

@ -0,0 +1,19 @@
#!/bin/sh
class=$(playerctl metadata --player=spotify_player --format '{{lc(status)}}')
icon=" "
if [[ $class == "playing" ]]; then
info=$(playerctl metadata --player=spotify_player --format '{{artist}} - {{title}}')
# if [[ ${#info} > 20 ]]; then
# info=$(echo $info | cut -c1-20)"..."
# fi
info=$(echo $info | cut -c1-50)
text=$icon" "$info
elif [[ $class == "paused" ]]; then
text=$icon" "paused
elif [[ $class == "stopped" ]]; then
text=""
fi
echo -e "{\"text\":\""$text"\", \"class\":\""$class"\"}"

View file

@ -0,0 +1,4 @@
#!/bin/bash
ip route | grep -q 'proton0' \
&& echo '{"text":"Connected","class":"connected","percentage":100}' \
|| echo '{"text":"Disconnected","class":"disconnected","percentage":0}'