~ruther/nixos-config

ref: 2d5802f3b180217c2653ff1dcccf852aea34f569 nixos-config/home/modules/profiles/desktop/qtile/config/brightness.sh -rw-r--r-- 342 bytes
2d5802f3 — Frantisek Bohacek feat: use custom session start script instead of DM 1 year, 8 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env sh

function send_notification() {
    brightness=$(printf "%.0f\n" $(brillo -G))
    dunstify -a "brightness" -u low -r 9991 -h int:value:"$brightness" -i "brightness-$1" "Brightness: $brightness %"
}

case $1 in
    up)
        brillo -A 2 -q
        ;;
    down)
        brillo -U 2 -q
        ;;
esac

send_notification $1