1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2025-10-17 06:51:15 +02:00

Compare commits

...

5 Commits

Author SHA1 Message Date
TiynGER
3917ffaa7c statusbar: removed percentage of battery 2024-03-11 01:02:32 +01:00
62c161c3c1 statusbar: removed volume number for color 2024-03-11 00:47:28 +01:00
50451fe26e statusbar: made hardware icons stick together 2024-03-11 00:26:11 +01:00
TiynGER
a165c62469 Merge branch 'master' of git+ssh://github/tiynger/.dotfiles 2024-03-11 00:14:38 +01:00
TiynGER
62b70378a5 statusbar: added missing colors in internet script 2024-03-11 00:14:22 +01:00
6 changed files with 48 additions and 21 deletions

View File

@@ -16,20 +16,45 @@ if [ "$status" = "Discharging" ] && [ $capacity -le 15 ] ; then
notify-send -u critical "Battery" "Below 15%"
fi
if [ $capacity -gt 40 ]
then
color="^b#282828^^c#dfdfdf^"
elif [ $capacity -gt 20 ]
then
color="^b#282828^^c#ffff00^"
else
color="^b#282828^^c#ff0000^"
fi
case "$status" in
"Discharging")
icon="^b#282828^^c#dfdfdf^  ^d^";;
if [ $capacity -gt 75 ]
then
icon=""
elif [ $capacity -gt 60 ]
then
icon=""
elif [ $capacity -gt 40 ]
then
icon=""
elif [ $capacity -gt 20 ]
then
icon=""
else
icon=""
fi
;;
"Not charging")
icon="^b#282828^^c#dfdfdf^  ^d^";;
icon="";;
"Charging")
icon="^b#282828^^c#dfdfdf^  ^d^";;
icon="";;
"Unknown")
icon="^b#282828^^c#dfdfdf^  ^d^";;
icon="";;
"Full")
icon="^b#282828^^c#dfdfdf^ ⚡ ^d^";;
icon="";;
esac
capacity=$(echo "$capacity" | sed -e 's/$//')
capacity=$(printf %3s $capacity | tr ' ' ' ')
echo "$icon $capacity%"
echo "$color $icon ^d^"

View File

@@ -12,12 +12,12 @@ temp=$(printf %3s $(echo ${temp##*+} | sed "s/\..*//") | tr ' ' ' ')
if [ $temp -gt 100 ]
then
icon="^b#282828^^c#ff0000^  ^d^"
icon="^b#282828^^c#ff0000^ "
elif [ $temp -gt 80 ]
then
icon="^b#282828^^c#ffff00^  ^d^"
icon="^b#282828^^c#ffff00^ "
else
icon="^b#282828^^c#dfdfdf^  ^d^"
icon="^b#282828^^c#dfdfdf^ "
fi
echo "$icon"

View File

@@ -14,12 +14,12 @@ fi
if [ $temp -gt 100 ]
then
icon="^b#282828^^c#ff0000^  ^d^"
icon="^b#282828^^c#ff0000^ "
elif [ $temp -gt 80 ]
then
icon="^b#282828^^c#ffff00^  ^d^"
icon="^b#282828^^c#ffff00^ "
else
icon="^b#282828^^c#dfdfdf^  ^d^"
icon="^b#282828^^c#dfdfdf^ "
fi
echo "$icon"

View File

@@ -12,12 +12,12 @@ if [ $wifistatus = "up" ]
then
if [ $wifipercent -gt 75 ]
then
wifiicon=" ^d^"
wifiicon="^c#dfdfdf^ ^d^"
elif [ $wifipercent -gt 40 ]
then
wifiicon=" ^d^"
wifiicon="^c#ffff00^ ^d^"
else
wifiicon=" ^d^"
wifiicon="^c#ff0000^ ^d^"
fi
fi

View File

@@ -6,12 +6,12 @@ percent=$(printf %3s $(printf %-4s $total | tr ' ' '0' | cut -c1-4 | sed -e 's/\
if [ $percent -gt 75 ]
then
icon="^b#282828^^c#ff0000^  ^d^"
icon="^b#282828^^c#ff0000^ "
elif [ $percent -gt 50 ]
then
icon="^b#282828^^c#ffff00^  ^d^"
icon="^b#282828^^c#ffff00^ "
else
icon="^b#282828^^c#dfdfdf^  ^d^"
icon="^b#282828^^c#dfdfdf^ "
fi
echo "$icon"

View File

@@ -2,10 +2,12 @@
vol="$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print $2}' | sed -e 's/\.//g' | sed 's/^0*//')"
if [ "$vol" -eq "0" ]; then
vol_info="^c#dfdfdf^ "
if [ "$vol" -gt "100" ]; then
vol_info="^c#ffff00^ "
elif [ "$vol" -gt "70" ]; then
vol_info="^c#dfdfdf^  "
elif [ "$vol" -eq "0" ]; then
vol_info="^c#dfdfdf^  "
else
vol_info="^c#dfdfdf^  "
fi
@@ -19,4 +21,4 @@ else
fi
vol=$(printf %3s $vol | tr ' ' ' ')
printf "^b#282828^%s%s^d^ %s" "$mic" "$vol_info" "$vol%"
printf "^b#282828^%s%s^d^" "$mic" "$vol_info"