dot/.local/bin/i3scripts/contrib/brightness

27 lines
429 B
Plaintext
Raw Normal View History

2020-02-19 15:55:35 +00:00
#!/usr/bin/env bash
################################
# Shows current brightness
#
# dependencies:
# - xbacklight
#
# @return {Number}: Current brightness
################################
case $BLOCK_BUTTON in
# right click
# set to `20
3) xbacklight -set 20 ;;
# scroll up
# raise brightness
4) xbacklight -inc 10 ;;
# scroll down
# lower brightness
5) xbacklight -dec 10 ;;
esac
printf "%.0f" "$(xbacklight -get)"