~mil/sxmo-utils

ref: 5b705dc91b5ef06268ed00cb22bbed40c754c2de sxmo-utils/scripts/core/sxmo_brightness.sh -rwxr-xr-x 314 bytes
5b705dc9baroque reduce notification spam in volume/brightness a month ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env sh

# include common definitions
# shellcheck source=scripts/core/sxmo_common.sh
. "$(dirname "$0")/sxmo_common.sh"

notify() {
	light | xargs notify-send " Brightness"
}

setvalue() {
	light -S "$1"
}

up() {
	light -A 5
}

down() {
	light -N 5
	light -U 5
}

getvalue() {
	light
}

"$@"
notify