nixos-config/home/afoucaultc/packages/niri/conf/keybind.nix
2026-08-07 21:31:50 +02:00

121 lines
3.1 KiB
Nix

{ ... }:
{
programs.niri.settings.binds = {
# open programs
"ALT+Q".action.spawn = "kitty";
"ALT+W".action.spawn = "fuzzel";
"ALT+D".action.spawn = "dolphin";
"ALT+N".action.spawn = [
"kitty"
"-e"
"nvim"
];
"Alt+F".action.spawn = [ "zen-beta" ];
"Alt+Z".action.spawn = [ "zotero" ];
"Alt+T".action.spawn = [ "thunderbird" ];
# other actions
"ALT+F4".action.close-window = { };
"ALT+V".action.toggle-window-floating = { };
"Ctrl+M".action.maximize-column = { };
"Ctrl+F".action.fullscreen-window = { };
"ALT+H".action.focus-column-left = { };
"ALT+L".action.focus-column-right = { };
"ALT+K".action.focus-window-up = { };
"ALT+J".action.focus-window-down = { };
"Ctrl+Super+H".action.move-column-left = { };
"Ctrl+Super+L".action.move-column-right = { };
"Ctrl+Super+K".action.move-window-up = { };
"Ctrl+Super+J".action.move-window-down = { };
"Super+L".action.focus-workspace-down = { };
"Super+H".action.focus-workspace-up = { };
"Super+K".action.move-column-to-workspace-down = { };
"Super+J".action.move-column-to-workspace-up = { };
"Alt+A".action.focus-monitor-left = { };
"Alt+B".action.focus-monitor-right = { };
"Ctrl+Super+A".action.move-column-to-monitor-left = { };
"Ctrl+Super+B".action.move-column-to-monitor-right = { };
"Alt+R".action.switch-preset-column-width = { };
"Ctrl+H".action.set-column-width = [ "-10%" ];
"Ctrl+L".action.set-column-width = [ "+10%" ];
"Ctrl+K".action.set-window-height = "-10%";
"Ctrl+J".action.set-window-height = "+10%";
"Print".action.screenshot = { };
"Ctrl+Print".action.screenshot-screen = { };
"Alt+Print".action.screenshot-window = { };
# multimédia / luminosité
"XF86MonBrightnessUp" = {
allow-when-locked = true;
action.spawn = [
"brightnessctl"
"-e4"
"-n2"
"set"
"5%+"
];
};
"XF86MonBrightnessDown" = {
allow-when-locked = true;
action.spawn = [
"brightnessctl"
"-e4"
"-n2"
"set"
"5%-"
];
};
"XF86AudioRaiseVolume" = {
allow-when-locked = true;
action.spawn = [
"wpctl"
"set-volume"
"-l"
"1"
"@DEFAULT_AUDIO_SINK@"
"5%+"
];
};
"XF86AudioLowerVolume" = {
allow-when-locked = true;
action.spawn = [
"wpctl"
"set-volume"
"@DEFAULT_AUDIO_SINK@"
"5%-"
];
};
"XF86AudioMute" = {
allow-when-locked = true;
action.spawn = [
"wpctl"
"set-mute"
"@DEFAULT_AUDIO_SINK@"
"toggle"
];
};
"XF86AudioMicMute" = {
allow-when-locked = true;
action.spawn = [
"wpctl"
"set-mute"
"@DEFAULT_AUDIO_SOURCE@"
"toggle"
];
};
# Verrouillage d'écran
"Ctrl+Alt+L" = {
action.spawn = [ "swaylock" ];
allow-when-locked = true;
};
# Aperçu global (overview)
"Alt+Tab".action.toggle-overview = { };
};
}