feat(niri): commonize 2

This commit is contained in:
Ahurac 2024-10-15 09:51:07 +02:00
parent 0560adc22a
commit 6dc649642d
2 changed files with 39 additions and 35 deletions

View file

@ -43,43 +43,41 @@
};
};
programs.niri = {
settings = {
input = {
keyboard.xkb.layout = "fr";
touchpad = {
tap = true;
natural-scroll = true;
accel-profile = "flat";
};
programs.niri.settings = {
input = {
keyboard.xkb.layout = "fr";
touchpad = {
tap = true;
natural-scroll = true;
accel-profile = "flat";
};
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;
};
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

@ -28,4 +28,10 @@
misc.animate_manual_resizes = true;
};
};
programs.niri.settings = {
input.keyboard.xkb.layout = "us";
outputs."HDMI-1".scale = 1;
layout.border.active.color = "#d966ff";
};
}