mirror of
https://github.com/tiyn/dotfiles.git
synced 2025-04-09 20:27:46 +02:00
Compare commits
5 Commits
34c63dd99f
...
3917ffaa7c
Author | SHA1 | Date | |
---|---|---|---|
|
3917ffaa7c | ||
62c161c3c1 | |||
50451fe26e | |||
|
a165c62469 | ||
|
62b70378a5 |
@ -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^"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user