feat(niri): sane config

This commit is contained in:
Ahurac 2024-10-14 13:39:05 +02:00
parent 5272ad66cc
commit b6c5fa9ca8

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { config, pkgs, ... }:
{ {
imports = [ ../common/home.nix ]; imports = [ ../common/home.nix ];
@ -49,6 +49,7 @@
settings = { settings = {
input = { input = {
keyboard.xkb.layout = "fr"; keyboard.xkb.layout = "fr";
keyboard.xkb.options = "compose:rctrl";
touchpad = { touchpad = {
tap = true; tap = true;
natural-scroll = true; natural-scroll = true;
@ -63,14 +64,70 @@
gaps = 10; gaps = 10;
focus-ring = { focus-ring = {
width = 4; width = 4;
active.color = "#10f810bb"; active.color = "#35f835e5";
inactive.color = "#80808080"; inactive.color = "#80808080";
}; };
}; };
prefer-no-csd = true; prefer-no-csd = true;
screenshot-path = "~/screenshots/%Y%m%d%H%m%N.png"; screenshot-path = "~/screenshots/%Y%m%d%H%m%N.png";
binds = { # window-rules = [{
# geometry-corner-radius = 10;
# clip-to-geometry = true;
# }];
binds = with config.lib.niri.actions; {
"Mod+Space".action = spawn "alacritty";
"Mod+F1".action = spawn "anyrun";
"Mod+L".action = spawn "hyprlock";
"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";
};
"Mod+Shift+Q".action = close-window;
"Mod+A".action = focus-column-left;
"Mod+Z".action = focus-window-or-workspace-up;
"Mod+S".action = focus-window-or-workspace-down;
"Mod+D".action = focus-column-right;
"Mod+Shift+A".action = move-column-left;
"Mod+Shift+Z".action = move-window-up;
"Mod+Shift+S".action = move-window-down;
"Mod+Shift+D".action = move-column-right;
"Mod+Page_Up".action = focus-workspace-up;
"Mod+Page_Down".action = focus-workspace-down;
"Mod+Shift+Page_Up".action = move-column-to-workspace-up;
"Mod+Shift+Page_Down".action = move-column-to-workspace-down;
"Mod+WheelScrollDown".action = focus-column-right;
"Mod+WheelScrollUp".action = focus-column-left;
"Mod+Shift+WheelScrollDown".action = move-column-right;
"Mod+Shift+WheelScrollUp".action = move-column-left;
"Alt+TouchpadScrollDown".action = spawn "brightnessctl" "set" "10-";
"Alt+TouchpadScrollUp".action = spawn "brightnessctl" "set" "+10";
"Mod+ampersand".action = focus-workspace 1;
"Mod+eacute".action = focus-workspace 2;
"Mod+quotedbl".action = focus-workspace 3;
"Mod+apostrophe".action = focus-workspace 4;
"Mod+Shift+ampersand".action = move-column-to-workspace 1;
"Mod+Shift+eacute".action = move-column-to-workspace 2;
"Mod+Shift+quotedbl".action = move-column-to-workspace 3;
"Mod+Shift+apostrophe".action = move-column-to-workspace 4;
"Mod+Tab".action = focus-workspace-previous;
"Mod+F".action = maximize-column;
"Mod+W".action = set-column-width "-10%";
"Mod+X".action = set-column-width "+10%";
"Mod+Shift+W".action = set-window-height "-10%";
"Mod+Shift+X".action = set-window-height "+10%";
"Print".action = screenshot-screen;
"Shift+Print".action = screenshot;
"Alt+Print".action = screenshot-window;
"Mod+Shift+Backspace".action = quit;
"XF86Display".action = power-off-monitors;
}; };
}; };
}; };