11 lines
235 B
Bash
Executable File
11 lines
235 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -- /sys/class/backlight/*/
|
|
|
|
read -r curr_brightness <"${1%/}/brightness"
|
|
read -r max_brightness <"${1%/}/max_brightness"
|
|
|
|
brightness_per=$((100 * curr_brightness / max_brightness))
|
|
|
|
printf "Bri:%d%%\n" "$brightness_per"
|