neodotfiles/user/.config/suckless/dwmblocks/scripts/block_brightness
Darius Drake c0b02ea2d5 updated
2023-08-07 21:04:48 -04:00

24 lines
559 B
Bash
Executable file

#!/bin/bash
brt=$(brightnessctl -m | cut -d, -f4 | tr -d %)
if [ "${brt%.*}" -eq 100 ]; then
icon="󰛨"
elif [ "${brt%.*}" -ge 90 ]; then
icon="󱩖"
elif [ "${brt%.*}" -ge 80 ]; then
icon="󱩕"
elif [ "${brt%.*}" -ge 70 ]; then
icon="󱩔"
elif [ "${brt%.*}" -ge 60 ]; then
icon="󱩓"
elif [ "${brt%.*}" -ge 50 ]; then
icon="󱩒"
elif [ "${brt%.*}" -ge 40 ]; then
icon="󱩑"
elif [ "${brt%.*}" -ge 30 ]; then
icon="󱩐"
elif [ "${brt%.*}" -ge 20 ]; then
icon="󱩏"
else
icon="󱩎"
fi
echo " $icon ${brt%.*}% "