Fix brightness script

This commit is contained in:
DashieTM 2025-03-15 15:45:11 +01:00
parent 4f04b5d683
commit 5443370f16
2 changed files with 3 additions and 9 deletions

View file

@ -30,15 +30,9 @@
[
(lib.mkIf config.mods.scripts.changeBrightness (
pkgs.writeShellScriptBin "changeBrightness" ''
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
notify-send -a "changeBrightness" -r 3 -u low -i brightness-high -h int:value:"$CURRENT" "Brightness: ''${CURRENT}%"
''
))
(lib.mkIf config.mods.scripts.audioControl (