From 1c2275c86563a103a53a3199d25808aa98ed62dd Mon Sep 17 00:00:00 2001 From: johannst Date: Tue, 19 May 2020 22:02:10 +0200 Subject: added backlight script --- scripts/backlight.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 scripts/backlight.sh (limited to 'scripts/backlight.sh') diff --git a/scripts/backlight.sh b/scripts/backlight.sh new file mode 100755 index 0000000..acf79bd --- /dev/null +++ b/scripts/backlight.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# dotfiles -- scripts/backlight.sh +# author: johannst + +case $BLOCK_BUTTON in + 3) xbacklight -set 100;; # right click, set default + 4) xbacklight -inc 10 ;; # scroll up, inc brightness + 5) xbacklight -dec 10 ;; # scroll down, dec brightness +esac + +BACKLIGHT=$(xbacklight -get | awk -F . '{ printf $1 }') + +echo "${BACKLIGHT}%" -- cgit v1.2.3