dotfiles/.config/eww/scripts/set-brightness.sh
2024-11-05 14:09:13 +01:00

9 lines
220 B
Bash
Executable file

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