aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbrightness.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/brightness.sh b/brightness.sh
index 946453c..5e4304b 100755
--- a/brightness.sh
+++ b/brightness.sh
@@ -3,6 +3,11 @@
brightness_file=/sys/class/backlight/intel_backlight/brightness
maxbrightness_file=/sys/class/backlight/intel_backlight/max_brightness
+permissions=$(ls -l $brightness_file | awk '{print $1}')
+if [ $permissions != "-rw-rw-rw-" ]; then
+ urxvt -title floating -geometry 32x1 -e sudo ~/scripts/brightFirst.sh
+fi
+
brightness=$(< $brightness_file)
maxbrightness=$(< $maxbrightness_file)
let target=$1+$brightness