dotfiles/.config/eww/scripts/set-brightness.sh

10 lines
220 B
Bash
Raw Normal View History

#!/bin/bash
if [[ "$1" =~ ^[0-9]+$ ]]; then
echo "$1" > /sys/class/backlight/amdgpu_bl1/brightness
2024-11-05 14:09:13 +01:00
else
swayosd-client --brightness "$1"
fi
2024-11-05 14:09:13 +01:00
eww update brightness="$(cat /sys/class/backlight/amdgpu_bl1/brightness)"