From 80dc0a70c336adaa0ec8fd3e556c09a28fdcfa15 Mon Sep 17 00:00:00 2001 From: jakobst1n Date: Sat, 4 Sep 2021 12:22:08 +0200 Subject: Add things --- bin/brightness-popup.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 bin/brightness-popup.sh (limited to 'bin/brightness-popup.sh') diff --git a/bin/brightness-popup.sh b/bin/brightness-popup.sh new file mode 100755 index 0000000..3c3ad98 --- /dev/null +++ b/bin/brightness-popup.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +if [ "$1" == "inc" ]; then + brightnessctl s +5% +fi + +if [ "$1" == "dec" ]; then + brightnessctl s 5%- +fi + +BRIGHTNESS=$(brightnessctl g) +BRIGHTNESSMAX=$(brightnessctl m) +let fullb=BRIGHTNESS*100 +let brightnessperc=fullb/BRIGHTNESSMAX +BRIGHTNESS=${brightnessperc%.*} +#NOTI_ID=$(notify-send.py "Brightness" "$BRIGHTNESS/100" \ +# --hint string:image-path:video-display boolean:transient:true \ +# int:has-percentage:$BRIGHTNESS \ +# --replaces-process "brightness-popup") +notify-send.py "Brightness" "$BRIGHTNESS%" --hint boolean:transient:true int:value:$BRIGHTNESS --replaces-process "brightness-popup" -- cgit v1.2.3