Major update
parent
5c79830dfd
commit
0079f5021e
24
dwm-bar
24
dwm-bar
|
@ -11,6 +11,28 @@ pkg_updates() {
|
|||
fi
|
||||
}
|
||||
|
||||
music() {
|
||||
ARTIST=$(playerctl metadata artist)
|
||||
TRACK=$(playerctl metadata title)
|
||||
#DURATION=$(playerctl metadata mpris:length | sed 's/.\{6\}$//')
|
||||
STATUS=$(playerctl status)
|
||||
|
||||
if [ "$STATUS" = "Playing" ]; then
|
||||
STATUS=""
|
||||
else
|
||||
STATUS=" "
|
||||
fi
|
||||
|
||||
if [ "$ARTIST" = "" ]; then
|
||||
printf ""
|
||||
else
|
||||
printf "^c#656565^ "
|
||||
printf "$STATUS "
|
||||
printf "^c#d4d5d5^$ARTIST - $TRACK"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
weather() {
|
||||
weather=$(curl -s wttr.in/Reda?format=1 | grep -o ".[0-9].*")
|
||||
printf "^c#656565^ "
|
||||
|
@ -44,6 +66,6 @@ while true; do
|
|||
[ $interval == 0 ] || [ $(($interval % 3600)) == 0 ] && updates=$(pkg_updates)
|
||||
interval=$((interval + 1))
|
||||
|
||||
sleep 1 && xsetroot -name "$(update_icon) $updates $(weather) $(cpu) $(mem) $(clock)"
|
||||
sleep 1 && xsetroot -name "$(music) $(update_icon) $updates $(weather) $(cpu) $(mem) $(clock)"
|
||||
done
|
||||
|
||||
|
|
Loading…
Reference in New Issue