12 lines
316 B
Bash
12 lines
316 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
if [[ "$1" =~ ^[0-9]+$ ]]; then
|
||
|
echo "$1" > /sys/class/backlight/amdgpu_bl1/brightness
|
||
|
elif [[ "$1" == "raise" ]]; then
|
||
|
swayosd-client --brightness raise
|
||
|
elif [[ "$1" == "lower" ]]; then
|
||
|
swayosd-client --brightness lower
|
||
|
fi
|
||
|
|
||
|
eww update brightness=$(cat /sys/class/backlight/amdgpu_bl1/brightness)
|