1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2025-04-19 08:17:47 +02:00

Compare commits

..

5 Commits

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%" notify-send -u critical "Battery" "Below 15%"
fi 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 case "$status" in
"Discharging") "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") "Not charging")
icon="^b#282828^^c#dfdfdf^  ^d^";; icon="";;
"Charging") "Charging")
icon="^b#282828^^c#dfdfdf^  ^d^";; icon="";;
"Unknown") "Unknown")
icon="^b#282828^^c#dfdfdf^  ^d^";; icon="";;
"Full") "Full")
icon="^b#282828^^c#dfdfdf^ ⚡ ^d^";; icon="⚡";;
esac esac
capacity=$(echo "$capacity" | sed -e 's/$//') capacity=$(echo "$capacity" | sed -e 's/$//')
capacity=$(printf %3s $capacity | tr ' ' ' ') 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 ] if [ $temp -gt 100 ]
then then
icon="^b#282828^^c#ff0000^  ^d^" icon="^b#282828^^c#ff0000^ "
elif [ $temp -gt 80 ] elif [ $temp -gt 80 ]
then then
icon="^b#282828^^c#ffff00^  ^d^" icon="^b#282828^^c#ffff00^ "
else else
icon="^b#282828^^c#dfdfdf^  ^d^" icon="^b#282828^^c#dfdfdf^ "
fi fi
echo "$icon" echo "$icon"

View File

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

View File

@ -12,12 +12,12 @@ if [ $wifistatus = "up" ]
then then
if [ $wifipercent -gt 75 ] if [ $wifipercent -gt 75 ]
then then
wifiicon=" ^d^" wifiicon="^c#dfdfdf^ ^d^"
elif [ $wifipercent -gt 40 ] elif [ $wifipercent -gt 40 ]
then then
wifiicon=" ^d^" wifiicon="^c#ffff00^ ^d^"
else else
wifiicon=" ^d^" wifiicon="^c#ff0000^ ^d^"
fi fi
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 ] if [ $percent -gt 75 ]
then then
icon="^b#282828^^c#ff0000^  ^d^" icon="^b#282828^^c#ff0000^ "
elif [ $percent -gt 50 ] elif [ $percent -gt 50 ]
then then
icon="^b#282828^^c#ffff00^  ^d^" icon="^b#282828^^c#ffff00^ "
else else
icon="^b#282828^^c#dfdfdf^  ^d^" icon="^b#282828^^c#dfdfdf^ "
fi fi
echo "$icon" 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*//')" vol="$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print $2}' | sed -e 's/\.//g' | sed 's/^0*//')"
if [ "$vol" -eq "0" ]; then if [ "$vol" -gt "100" ]; then
vol_info="^c#dfdfdf^  " vol_info="^c#ffff00^  "
elif [ "$vol" -gt "70" ]; then elif [ "$vol" -gt "70" ]; then
vol_info="^c#dfdfdf^  " vol_info="^c#dfdfdf^  "
elif [ "$vol" -eq "0" ]; then
vol_info="^c#dfdfdf^  "
else else
vol_info="^c#dfdfdf^  " vol_info="^c#dfdfdf^  "
fi fi
@ -19,4 +21,4 @@ else
fi fi
vol=$(printf %3s $vol | tr ' ' ' ') 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"