From 98c5d04bb264cc903b935897b2188d8f2be4c7a1 Mon Sep 17 00:00:00 2001 From: InigoGutierrez Date: Wed, 12 Dec 2018 14:45:10 +0100 Subject: i3blocks modules. --- brightness.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'brightness.sh') diff --git a/brightness.sh b/brightness.sh index b104d22..946453c 100755 --- a/brightness.sh +++ b/brightness.sh @@ -6,15 +6,18 @@ maxbrightness_file=/sys/class/backlight/intel_backlight/max_brightness brightness=$(< $brightness_file) maxbrightness=$(< $maxbrightness_file) let target=$1+$brightness -#for testing: -#echo "Actual bright: $brightness; Max: $maxbrightness; Target: $target" if [ $target -gt $maxbrightness ] then - echo "Value too big. Target: $target; max: $maxbrightness" + #echo "Value too big. Target: $target; max: $maxbrightness" + echo $maxbrightness | tee $brightness_file elif [ 0 -gt $target ] then - echo "Value too low. Target: $target" + #echo "Value too low. Target: $target" + echo "0" | tee $brightness_file else echo $target | tee $brightness_file - echo "New brightness: $target/$maxbrightness" + #echo "New brightness: $target/$maxbrightness" fi + +notify-send -t 500 "$(~/scripts/i3blocks/i3brightness.sh)" +pkill -SIGRTMIN+11 i3blocks -- cgit v1.2.1