dotfiles/home/.bin/bri
2024-10-11 21:25:46 +02:00

12 lines
577 B
Bash
Executable file

#!/usr/bin/env zsh
if \[ "$1" = "--up" \]; then
# eww -c $HOME/.dotfiles/eww/bar o bri && brightnessctl -q s 5%+ && sleep 3 && eww -c $HOME/.dotfiles/eww/bar c bri
swayosd-client --brightness raise
# brightnessctl -q s 5%+
elif \[ "$1" = "--down" \]; then
# eww -c $HOME/.dotfiles/eww/bar o bri && brightnessctl -q s 5%- && sleep 3 && eww -c $HOME/.dotfiles/eww/bar c bri
swayosd-client --brightness lower
# brightnessctl -q s 5%-
elif \[ "$1" = "--get" \]; then
echo $(brightnessctl | head -n 2 | tail -n 1 | awk '{print $4}' | tr -d '(%)')
fi