From 27f907852934c855c6b9d5cec5c8c7990c5da97c Mon Sep 17 00:00:00 2001 From: Shubham Saini Date: Sat, 1 Aug 2020 16:06:14 +0530 Subject: added brightness wrapper --- bin/.local/bin/light | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 bin/.local/bin/light 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 @@ +#!/bin/sh +# brightness wrapper + +case "$1" in + u*) + for f in /sys/class/backlight/*; do + echo $(($(<$f/brightness)+5*$(<$f/max_brightness)/100)) > $f/brightness; + done + ;; + d*) + for f in /sys/class/backlight/*; do + echo $(($(<$f/brightness)-5*$(<$f/max_brightness)/100)) > $f/brightness; + done + ;; + *) + echo "choose u or d" + ;; +esac + -- cgit v1.2.3