fix(niri): shortcuts with swayosd

This commit is contained in:
Ahurac 2024-11-05 10:51:50 +01:00
parent 1bc558e263
commit ad9777d394
2 changed files with 20 additions and 20 deletions

View file

@ -25,26 +25,6 @@
outputs."eDP-1".scale = 1;
layout.border.active.color = "#35f835e5";
binds = with config.lib.niri.actions; {
"XF86AudioRaiseVolume" = {
allow-when-locked = true;
action = spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+";
};
"XF86AudioLowerVolume" = {
allow-when-locked = true;
action = spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-";
};
"XF86AudioMute" = {
allow-when-locked = true;
action = spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle";
};
"XF86MonBrightnessDown" = {
allow-when-locked = true;
action = spawn "brightnessctl" "set" "10-";
};
"XF86MonBrightnessUp" = {
allow-when-locked = true;
action = spawn "brightnessctl" "set" "+10";
};
"Alt+TouchpadScrollDown".action = spawn "brightnessctl" "set" "10-";
"Alt+TouchpadScrollUp".action = spawn "brightnessctl" "set" "+10";
"XF86Display".action = power-off-monitors;

View file

@ -374,6 +374,26 @@
"Mod+Shift+Backspace" = {
action = quit { skip-confirmation = true; };
};
"XF86MonBrightnessDown" = {
allow-when-locked = true;
action = spawn "swayosd-client" "--brightness=lower";
};
"XF86MonBrightnessUp" = {
allow-when-locked = true;
action = spawn "swayosd-client" "--brightness=raise";
};
"XF86AudioRaiseVolume" = {
allow-when-locked = true;
action = spawn "swayosd-client" "--output-volume=raise";
};
"XF86AudioLowerVolume" = {
allow-when-locked = true;
action = spawn "swayosd-client" "--output-volume=lower";
};
"XF86AudioMute" = {
allow-when-locked = true;
action = spawn "swayosd-client" "--output-volume=mute-toggle";
};
};
};
};