20 lines
613 B
Bash
Executable File
20 lines
613 B
Bash
Executable File
#!/bin/sh
|
|
|
|
######################################################################
|
|
# @author : swytch
|
|
# @file : backlight_notify
|
|
# @license : GPLv3
|
|
# @created : Wednesday May 20, 2020 17:53:36 CEST
|
|
#
|
|
# @description : send a notification with xbacklight value
|
|
######################################################################
|
|
|
|
|
|
current=$(cat /sys/class/backlight/intel_backlight/brightness)
|
|
max=$(cat /sys/class/backlight/intel_backlight/max_brightness)
|
|
step=$(expr $max / 20)
|
|
|
|
level=$(expr $(expr $current / $step) \* 5)
|
|
|
|
dunstify -r 100001 -u "low" "Current xBacklight value :" "$level%"
|