update polybar for laptop

This commit is contained in:
azpsen
2025-03-10 10:30:45 -05:00
parent 1e1c2bbe64
commit e17228ef61
7 changed files with 260 additions and 10 deletions

View File

@@ -0,0 +1,34 @@
#!/bin/sh
[ -z $1 ] && echo "Error: BAR_NAME is not supplied." && exit 1
#Get config values for script
source "${0%/*}/now-playing-options.cfg"
#Call the get_status script with the supplied BAR_NAME in polybar's config.ini (therefore, running get_status icon supplies icon as arg 2)
get_status() {
${0%/*}/now-playing-get.sh $1 $2
}
prepend() {
echo "$1$(get_status $1)"
if [ -n $wait_time ]; then
sleep $wait_time
fi
}
case "$(get_status $1 icon)" in
"none"|"") prepend '';;
"browser") prepend '󰇧 ';;
"netflix") prepend '󰝆 ';;
"youtube") prepend '󰗃 ';;
"prime") prepend ' ';;
"spotify") prepend '󰓇 ';;
"vlc") prepend '󰕼 ';;
"mpv") prepend '󱖏 ';;
"kdeconnect") prepend ' ';;
"corridor") prepend '󰎁 ';;
"rhythmbox") prepend '󰓃 ';;
esac