diff options
author | InigoGutierrez <inigogf.95@gmail.com> | 2018-12-12 16:37:23 +0100 |
---|---|---|
committer | InigoGutierrez <inigogf.95@gmail.com> | 2018-12-12 16:37:23 +0100 |
commit | eec7698efec7169432787423bf94bfc7836761d5 (patch) | |
tree | edf96a23099c1f93b753391b01aec82f8bb95d62 | |
parent | 98c5d04bb264cc903b935897b2188d8f2be4c7a1 (diff) | |
download | scripts-eec7698efec7169432787423bf94bfc7836761d5.tar.gz scripts-eec7698efec7169432787423bf94bfc7836761d5.zip |
brightness.sh now behaves different if not yet used.
-rwxr-xr-x | brightness.sh | 5 |
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 |