Files
dotfiles/bin/brightness
Thierry Schork d80a9526a8 Merge branch 'x13'
# Conflicts:
#	.config/hypr/hyprland.conf
#	.config/hypr/hyprpaper.conf
#	.config/waybar/config
#	.gitignore
#	.zshrc
#	bin/alias
#	bin/brightness
#	bin/cycle_pactl.sh
#	bin/keep.sh
#	bin/lid_close.sh
#	bin/lid_open.sh
#	bin/startup.sh
2026-02-14 18:08:15 +01:00

25 lines
487 B
Fish
Executable File

#!/bin/fish
set backlight_device $argv[1]
set action $argv[2]
set dvalue $argv[3]
echo Backlight device: $backlight_device Bumping: $action By: $dvalue
set current_value (cat $backlight_device)
if test $action = up
echo (math $current_value + $dvalue) > $backlight_device
else if test $action = down
set newVal (math $current_value - $dvalue)
if test $newVal -lt 2424
set newVal 2424
end
echo New brightness value: $newVal
echo $newVal > $backlight_device
else
exit 2
end