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

20 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