aboutsummaryrefslogtreecommitdiff
path: root/bin/brightness-popup.sh
blob: 3c3ad98f60033c81ec737092371974d78d7c9cd6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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"