pkgs: add change-backlight
This commit is contained in:
parent
7dc177cf44
commit
f6381b14b0
3 changed files with 61 additions and 0 deletions
15
pkgs/change-backlight/change-backlight
Executable file
15
pkgs/change-backlight/change-backlight
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
if [ "$1" = "up" ]; then
|
||||
upDown="+$2%"
|
||||
else
|
||||
upDown="$2%-"
|
||||
fi
|
||||
|
||||
newBrightness="$(brightnessctl -m set "$upDown" | cut -d, -f4)"
|
||||
notify-send -u low \
|
||||
-h string:x-canonical-private-synchronous:change-backlight \
|
||||
-h "int:value:${newBrightness/\%/}" \
|
||||
-- "Set brightness to $newBrightness"
|
||||
Loading…
Add table
Add a link
Reference in a new issue