Skip to content

Instantly share code, notes, and snippets.

@tbnorth
Last active December 22, 2019 01:52
Show Gist options
  • Save tbnorth/00dcc546d250899b2ae48683ea928e10 to your computer and use it in GitHub Desktop.
Save tbnorth/00dcc546d250899b2ae48683ea928e10 to your computer and use it in GitHub Desktop.
HP Intel laptop screen backlight control when xbacklight doesn't work
# i3 config
bindsym XF86MonBrightnessUp exec /home/tbrown/bin/undim # increase screen brightness
bindsym XF86MonBrightnessDown exec /home/tbrown/bin/dim # decrease screen brightness
# /home/tbrown/bin/undim
LVL=$(cat /sys/class/backlight/intel_backlight/brightness)
LVL=$(((LVL+20)%648))
echo $LVL >/sys/class/backlight/intel_backlight/brightness
# dim as above but -20
# check /sys/class/backlight/intel_backlight/max_brightness for % term
# sudo chown a+rw /sys/class/backlight/intel_backlight/brightness
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment