summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjohannst <johannes.stoelp@gmail.com>2020-05-19 22:02:10 +0200
committerjohannst <johannes.stoelp@gmail.com>2020-05-19 22:02:10 +0200
commit1c2275c86563a103a53a3199d25808aa98ed62dd (patch)
tree71a85f75e054a03191fed1b718d4cc3c914fe1d4
parent8c2d17f29951adc4719f3fb57de489e46c6acc97 (diff)
downloaddotfiles-1c2275c86563a103a53a3199d25808aa98ed62dd.tar.gz
dotfiles-1c2275c86563a103a53a3199d25808aa98ed62dd.zip
added backlight script
-rwxr-xr-xscripts/backlight.sh13
1 files changed, 13 insertions, 0 deletions
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}%"