nixos-config/home/afoucaultc/packages/niri/conf/keybind.nix
2026-08-07 20:04:22 +02:00

122 lines
2.9 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".spawn = [ "zen-beta" ];
"Alt+Z".spawn = [ "zotero" ];
"Alt+T".spawn = [ "thunderbird" ];
# other actions
"ALT+F4".action.close-window = { };
"ALT+V".toggle-window-floating = { };
"ALT+M".maximize-column = { };
"ALT+F".fullscreen-window = { };
"ALT+H".focus-column-left = { };
"ALT+L".focus-column-right = { };
"ALT+K".focus-window-up = { };
"ALT+J".focus-window-down = { };
"Ctrl+Super+H".move-column-left = { };
"Ctrl+Super+L".move-column-right = { };
"Ctrl+Super+K".move-window-up = { };
"Ctrl+Super+J".move-window-down = { };
"Super+L".focus-workspace-down = { };
"Super+H".focus-workspace-up = { };
"Super+K".move-column-to-workspace-down = { };
"Super+J".move-column-to-workspace-up = { };
"Alt+A".focus-monitor-left = { };
"Alt+B".focus-monitor-right = { };
"Ctrl+Super+A".move-column-to-monitor-left = { };
"Ctrl+Super+B".move-column-to-monitor-right = { };
"Alt+R".switch-preset-column-width = { };
"Ctrl+H".set-column-width = [ "-10%" ];
"Ctrl+L".set-column-width = [ "+10%" ];
"Ctrl+K".action.set-window-height = "-10%";
"Ctrl+J".action.set-window-height = "+10%";
"Print".screenshot = { };
"Ctrl+Print".screenshot-screen = { };
"Alt+Print".screenshot-window = { };
# multimédia / luminosité
"XF86MonBrightnessUp" = {
_props.allow-when-locked = true;
spawn = [
"brightnessctl"
"-e4"
"-n2"
"set"
"5%+"
];
};
"XF86MonBrightnessDown" = {
_props.allow-when-locked = true;
spawn = [
"brightnessctl"
"-e4"
"-n2"
"set"
"5%-"
];
};
"XF86AudioRaiseVolume" = {
_props.allow-when-locked = true;
spawn = [
"wpctl"
"set-volume"
"-l"
"1"
"@DEFAULT_AUDIO_SINK@"
"5%+"
];
};
"XF86AudioLowerVolume" = {
_props.allow-when-locked = true;
spawn = [
"wpctl"
"set-volume"
"@DEFAULT_AUDIO_SINK@"
"5%-"
];
};
"XF86AudioMute" = {
_props.allow-when-locked = true;
spawn = [
"wpctl"
"set-mute"
"@DEFAULT_AUDIO_SINK@"
"toggle"
];
};
"XF86AudioMicMute" = {
_props.allow-when-locked = true;
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 = { };
};
}