Fix brightness script
This commit is contained in:
parent
4f04b5d683
commit
5443370f16
2 changed files with 3 additions and 9 deletions
|
|
@ -164,8 +164,8 @@ in {
|
|||
",XF86AudioPlay,exec, playerctl play-pause"
|
||||
",XF86AudioNext,exec, playerctl next"
|
||||
",XF86AudioPrev,exec, playerctl previous"
|
||||
(lib.mkIf config.mods.scripts.changeBrightness ",XF86MonBrightnessDown,exec, change-brightness brightness 10%-")
|
||||
(lib.mkIf config.mods.scripts.changeBrightness ",XF86MonBrightnessUp,exec, change-brightness brightness +10%")
|
||||
(lib.mkIf config.mods.scripts.changeBrightness ",XF86MonBrightnessDown,exec, changeBrightness brightness 10%-")
|
||||
(lib.mkIf config.mods.scripts.changeBrightness ",XF86MonBrightnessUp,exec, changeBrightness brightness +10%")
|
||||
|
||||
# hyprland keybinds
|
||||
# misc
|
||||
|
|
|
|||
|
|
@ -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 (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue