14 lines
534 B
Bash
Executable file
14 lines
534 B
Bash
Executable file
#!/bin/bash
|
|
# dunst change brightness notification
|
|
|
|
# set varialbe $brightness to current brightness level
|
|
brightness=$(cat /sys/class/backlight/acpi_video0/actual_brightness)
|
|
|
|
# set variable $max to current max brightness level
|
|
max=$(cat /sys/class/backlight/acpi_video0/max_brightness)
|
|
|
|
# calculate percentage
|
|
brightness_percent=$(((brightness * 100) / max))
|
|
|
|
# show brightness notification
|
|
dunstify -u low -i brightness -h string:x-dunst-stack-tag:Brightness -h int:value:"$brightness_percent" "Brightness: ${brightness_percent}%"
|