12 lines
326 B
Bash
Executable file
12 lines
326 B
Bash
Executable file
#! /bin/bash
|
|
|
|
set_brightness() {
|
|
brightnessctl set "$1"
|
|
CURRENT=$(brightnessctl -m -d intel_backlight | awk -F, '{print substr($4, 0, length($4)-1)}')
|
|
dunstify -a "changeBrightness" -r 3 -u low -i brightness-high -h int:value:"$CURRENT" "Brightness: ${CURRENT}%"
|
|
}
|
|
|
|
if [ "$1" == "brightness" ]; then
|
|
set_brightness "$2"
|
|
fi
|
|
|