1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2025-10-09 19:11:15 +02:00

statusbar/sxhkd: updated player interface and cleaned up

This commit is contained in:
2024-03-09 02:48:17 +01:00
parent 60a947a8a2
commit f862b777ec
9 changed files with 127 additions and 20 deletions

View File

@@ -3,9 +3,21 @@
# Status bar module for disk space
# $1 should be drive mountpoint
disk="/"
disk="/home"
[ ! -z "$1" ] && disk="$1"
icon="$disk"
printf "^b#282828^^c#dfdfdf^ 󰗮 ^d^ %s\n" "$(df -h "$disk" | awk ' /[0-9]/ {print $3 "/" $2}')"
free=$(df "$disk" | awk ' /[0-9][0-9]/ {print $4}')
if [ $free -gt 104857600 ]
then
icon="^b#282828^^c#dfdfdf^ 󰗮 ^d^"
elif [ $free -gt 52428800 ]
then
icon="^b#282828^^c#ffff00^ 󰗮 ^d^"
else
icon="^b#282828^^c#ff0000^ 󰗮 ^d^"
fi
printf "$icon %s"