summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorShubham Saini <pryr@pryr.xyz>2020-08-01 10:36:14 +0000
committerShubham Saini <pryr@pryr.xyz>2020-08-01 10:36:14 +0000
commit27f907852934c855c6b9d5cec5c8c7990c5da97c (patch)
tree4149a879c8c945bc102fd66b74597b89c945de50 /bin
parentaa1fbe12aec99cecd90f2e7ea21d8ab2110ac4ba (diff)
added brightness wrapper
Diffstat (limited to 'bin')
-rwxr-xr-xbin/.local/bin/light19
1 files changed, 19 insertions, 0 deletions
diff --git a/bin/.local/bin/light b/bin/.local/bin/light
new file mode 100755
index 0000000..b34150f
--- /dev/null
+++ b/bin/.local/bin/light
@@ -0,0 +1,19 @@
1#!/bin/sh
2# brightness wrapper
3
4case "$1" in
5 u*)
6 for f in /sys/class/backlight/*; do
7 echo $(($(<$f/brightness)+5*$(<$f/max_brightness)/100)) > $f/brightness;
8 done
9 ;;
10 d*)
11 for f in /sys/class/backlight/*; do
12 echo $(($(<$f/brightness)-5*$(<$f/max_brightness)/100)) > $f/brightness;
13 done
14 ;;
15 *)
16 echo "choose u or d"
17 ;;
18esac
19