Changed notification daemon and added volume/brightness notification

This commit is contained in:
2026-04-24 15:42:20 +02:00
parent 2ea4490891
commit 3ce6c956f6
5 changed files with 54 additions and 60 deletions
+5 -5
View File
@@ -17,7 +17,7 @@
};
"XF86AudioMute" = {
_props.allow-when-locked = true;
spawn._args = ["wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"];
spawn._args = ["sh" "-c" "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && notify-send -e -h string:x-canonical-private-synchronous:volume -h \"int:value:$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print $2 * 100}')\" -c osd \"Volume\""];
};
"XF86AudioMicMute" = {
_props.allow-when-locked = true;
@@ -25,19 +25,19 @@
};
"XF86AudioRaiseVolume" = {
_props.allow-when-locked = true;
spawn._args = ["wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "5%+"];
spawn._args = ["sh" "-c" "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ && notify-send -e -h string:x-canonical-private-synchronous:volume -h \"int:value:$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print $2 * 100}')\" -c osd \"Volume\""];
};
"XF86AudioLowerVolume" = {
_props.allow-when-locked = true;
spawn._args = ["wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "5%-"];
spawn._args = ["sh" "-c" "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- && notify-send -e -h string:x-canonical-private-synchronous:volume -h \"int:value:$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print $2 * 100}')\" -c osd \"Volume\""];
};
"XF86MonBrightnessUp" = {
_props.allow-when-locked = true;
spawn._args = ["brightnessctl" "set" "10%+"];
spawn._args = ["sh" "-c" "brightnessctl set 10%+ && notify-send -e -h string:x-canonical-private-synchronous:brightness -h \"int:value:$(brightnessctl -m | cut -d, -f4 | tr -d '%')\" -c osd \"Brightness\""];
};
"XF86MonBrightnessDown" = {
_props.allow-when-locked = true;
spawn._args = ["brightnessctl" "set" "10%-"];
spawn._args = ["sh" "-c" "brightnessctl set 10%- && notify-send -e -h string:x-canonical-private-synchronous:brightness -h \"int:value:$(brightnessctl -m | cut -d, -f4 | tr -d '%')\" -c osd \"Brightness\""];
};
"Print".spawn._args = ["sh" "-c" "grim -g \"$(slurp)\" - | satty --filename - --output-filename ~/Pictures/Screenshots/satty-$(date +%Y%m%d-%H%M%S).png"];
"Mod+B".spawn._args = ["zen"];