This repository has been archived on 2023-10-17. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/scripts/brightness
diego castillo salazar 9a82d82fd6 Update dotfiles
2023-04-21 12:33:06 -05:00

19 lines
486 B
Bash
Executable file

#!/bin/sh
#Brightness changer using xrandr
# Usage:
# bright + to up brightness in 0.1 step
# bright - to down brightness in 0.1 step
# Change the output name, use xrandr to know yours
output="LVDS-1"
case "$1" in
+)
xrandr --output $output --brightness $(echo "$(xrandr --verbose |grep Brightness |grep -o '[0-9].*')+0.1" | bc) ;;
-)
xrandr --output $output --brightness $(echo "$(xrandr --verbose |grep Brightness |grep -o '[0-9].*')-0.1" | bc) ;;
esac