refactor: niri config
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
{
|
||||
browserCommand,
|
||||
shortcutCommands,
|
||||
terminalCommand,
|
||||
uxCommands,
|
||||
}:
|
||||
{
|
||||
# Application and utility launchers
|
||||
"Mod+Return" = {
|
||||
action.spawn = terminalCommand;
|
||||
hotkey-overlay.title = "Terminal";
|
||||
@@ -22,25 +23,76 @@
|
||||
};
|
||||
"Mod+E" = {
|
||||
repeat = false;
|
||||
action.spawn = uxCommands.neovimProjects;
|
||||
action.spawn = shortcutCommands.neovimProjects;
|
||||
hotkey-overlay.title = "Neovim Projects";
|
||||
};
|
||||
"Mod+Ctrl+Return" = {
|
||||
repeat = false;
|
||||
action.spawn = uxCommands.nixosTerminal;
|
||||
action.spawn = shortcutCommands.nixosTerminal;
|
||||
hotkey-overlay.title = "NixOS Config Terminal";
|
||||
};
|
||||
"Mod+Ctrl+Shift+Return" = {
|
||||
repeat = false;
|
||||
action.spawn = uxCommands.nixosSwitch;
|
||||
action.spawn = shortcutCommands.nixosSwitch;
|
||||
hotkey-overlay.title = "NixOS Switch";
|
||||
};
|
||||
"Mod+Ctrl+E" = {
|
||||
repeat = false;
|
||||
action.spawn = uxCommands.editSecrets;
|
||||
action.spawn = shortcutCommands.editSecrets;
|
||||
hotkey-overlay.title = "Edit Secrets";
|
||||
};
|
||||
"Mod+Ctrl+F" = {
|
||||
repeat = false;
|
||||
action.spawn = [
|
||||
shortcutCommands.vicinaeCommand
|
||||
"files"
|
||||
];
|
||||
hotkey-overlay.title = "Find Files";
|
||||
};
|
||||
"Mod+V" = {
|
||||
repeat = false;
|
||||
action.spawn = shortcutCommands.clipboardHistory;
|
||||
hotkey-overlay.title = "Clipboard History";
|
||||
};
|
||||
"Mod+Ctrl+N" = {
|
||||
repeat = false;
|
||||
action.spawn = [
|
||||
shortcutCommands.vicinaeCommand
|
||||
"nix-options"
|
||||
];
|
||||
hotkey-overlay.title = "NixOS Options";
|
||||
};
|
||||
"Mod+Ctrl+H" = {
|
||||
repeat = false;
|
||||
action.spawn = [
|
||||
shortcutCommands.vicinaeCommand
|
||||
"home-manager-options"
|
||||
];
|
||||
hotkey-overlay.title = "Home Manager Options";
|
||||
};
|
||||
"Mod+Ctrl+P" = {
|
||||
repeat = false;
|
||||
action.spawn = [
|
||||
shortcutCommands.vicinaeCommand
|
||||
"nix-packages"
|
||||
];
|
||||
hotkey-overlay.title = "Nix Packages";
|
||||
};
|
||||
"Mod+Ctrl+W" = {
|
||||
repeat = false;
|
||||
action.spawn = [
|
||||
shortcutCommands.vicinaeCommand
|
||||
"niri-windows"
|
||||
];
|
||||
hotkey-overlay.title = "Windows";
|
||||
};
|
||||
"Mod+Ctrl+C" = {
|
||||
repeat = false;
|
||||
action.spawn = shortcutCommands.pickColor;
|
||||
hotkey-overlay.title = "Pick Color";
|
||||
};
|
||||
|
||||
# Hardware media, volume, and brightness keys
|
||||
"XF86AudioPlay" = {
|
||||
action.spawn-sh = "playerctl play-pause";
|
||||
allow-when-locked = true;
|
||||
@@ -82,10 +134,12 @@
|
||||
allow-when-locked = true;
|
||||
};
|
||||
|
||||
# Screenshots
|
||||
"Mod+S".action.screenshot = [ ];
|
||||
"Mod+Ctrl+S".action.screenshot-screen = [ ];
|
||||
"Mod+Alt+S".action.screenshot-window = [ ];
|
||||
|
||||
# Session and compositor controls
|
||||
"Mod+Shift+Slash".action.show-hotkey-overlay = [ ];
|
||||
"Mod+Escape" = {
|
||||
action.toggle-keyboard-shortcuts-inhibit = [ ];
|
||||
@@ -99,6 +153,7 @@
|
||||
"Ctrl+Alt+Delete".action.quit = [ ];
|
||||
"Mod+Shift+P".action.power-off-monitors = [ ];
|
||||
|
||||
# Overview and window close
|
||||
"Mod+O" = {
|
||||
action.toggle-overview = [ ];
|
||||
repeat = false;
|
||||
@@ -108,6 +163,7 @@
|
||||
repeat = false;
|
||||
};
|
||||
|
||||
# Keyboard focus movement
|
||||
"Mod+Left".action.focus-column-or-monitor-left = [ ];
|
||||
"Mod+Down".action.focus-window-down = [ ];
|
||||
"Mod+Up".action.focus-window-up = [ ];
|
||||
@@ -117,6 +173,7 @@
|
||||
"Mod+K".action.focus-window-up = [ ];
|
||||
"Mod+L".action.focus-column-or-monitor-right = [ ];
|
||||
|
||||
# Keyboard window and column movement
|
||||
"Mod+Alt+Left".action.move-column-left-or-to-monitor-left = [ ];
|
||||
"Mod+Alt+Down".action.move-window-down-or-to-workspace-down = [ ];
|
||||
"Mod+Alt+Up".action.move-window-up-or-to-workspace-up = [ ];
|
||||
@@ -126,12 +183,19 @@
|
||||
"Mod+Alt+K".action.move-window-up-or-to-workspace-up = [ ];
|
||||
"Mod+Alt+L".action.move-column-right-or-to-monitor-right = [ ];
|
||||
|
||||
# First and last column navigation
|
||||
"Mod+Home".action.focus-column-first = [ ];
|
||||
"Mod+End".action.focus-column-last = [ ];
|
||||
"Mod+Alt+Home".action.move-column-to-first = [ ];
|
||||
"Mod+Alt+End".action.move-column-to-last = [ ];
|
||||
|
||||
# Move focus, columns, and workspaces across monitors
|
||||
"Mod+Tab".action.focus-monitor-next = [ ];
|
||||
"Mod+A" = {
|
||||
repeat = false;
|
||||
action.spawn = shortcutCommands.swapMonitorWorkspaces;
|
||||
hotkey-overlay.title = "Swap Monitor Workspaces";
|
||||
};
|
||||
"Mod+Alt+Tab".action.move-column-to-monitor-next = [ ];
|
||||
"Mod+Shift+Tab".action.move-workspace-to-monitor-next = [ ];
|
||||
|
||||
@@ -140,21 +204,25 @@
|
||||
"Mod+Shift+Up".action.focus-monitor-up = [ ];
|
||||
"Mod+Shift+Right".action.focus-monitor-right = [ ];
|
||||
|
||||
# Linear workspace navigation
|
||||
"Mod+Page_Down".action.focus-workspace-down = [ ];
|
||||
"Mod+Page_Up".action.focus-workspace-up = [ ];
|
||||
"Mod+U".action.focus-workspace-down = [ ];
|
||||
"Mod+I".action.focus-workspace-up = [ ];
|
||||
|
||||
# Move columns between adjacent workspaces
|
||||
"Mod+Alt+Page_Down".action.move-column-to-workspace-down = [ ];
|
||||
"Mod+Alt+Page_Up".action.move-column-to-workspace-up = [ ];
|
||||
"Mod+Alt+U".action.move-column-to-workspace-down = [ ];
|
||||
"Mod+Alt+I".action.move-column-to-workspace-up = [ ];
|
||||
|
||||
# Reorder workspaces
|
||||
"Mod+Shift+Page_Down".action.move-workspace-down = [ ];
|
||||
"Mod+Shift+Page_Up".action.move-workspace-up = [ ];
|
||||
"Mod+Shift+U".action.move-workspace-down = [ ];
|
||||
"Mod+Shift+I".action.move-workspace-up = [ ];
|
||||
|
||||
# Mouse workspace navigation
|
||||
"Mod+WheelScrollDown" = {
|
||||
action.focus-workspace-down = [ ];
|
||||
cooldown-ms = 150;
|
||||
@@ -172,6 +240,7 @@
|
||||
cooldown-ms = 150;
|
||||
};
|
||||
|
||||
# Mouse column navigation and movement
|
||||
"Mod+WheelScrollRight".action.focus-column-or-monitor-right = [ ];
|
||||
"Mod+WheelScrollLeft".action.focus-column-or-monitor-left = [ ];
|
||||
"Mod+Alt+WheelScrollRight".action.move-column-right-or-to-monitor-right = [ ];
|
||||
@@ -179,6 +248,7 @@
|
||||
"Mod+Shift+WheelScrollDown".action.focus-column-or-monitor-right = [ ];
|
||||
"Mod+Shift+WheelScrollUp".action.focus-column-or-monitor-left = [ ];
|
||||
|
||||
# Direct workspace focus
|
||||
"Mod+1".action.focus-workspace = 1;
|
||||
"Mod+2".action.focus-workspace = 2;
|
||||
"Mod+3".action.focus-workspace = 3;
|
||||
@@ -189,6 +259,7 @@
|
||||
"Mod+8".action.focus-workspace = 8;
|
||||
"Mod+9".action.focus-workspace = 9;
|
||||
|
||||
# Move columns to numbered workspaces
|
||||
"Mod+Ctrl+1".action.move-column-to-workspace = 1;
|
||||
"Mod+Ctrl+2".action.move-column-to-workspace = 2;
|
||||
"Mod+Ctrl+3".action.move-column-to-workspace = 3;
|
||||
@@ -199,11 +270,13 @@
|
||||
"Mod+Ctrl+8".action.move-column-to-workspace = 8;
|
||||
"Mod+Ctrl+9".action.move-column-to-workspace = 9;
|
||||
|
||||
# Add and remove windows from columns
|
||||
"Mod+BracketLeft".action.consume-or-expel-window-left = [ ];
|
||||
"Mod+BracketRight".action.consume-or-expel-window-right = [ ];
|
||||
"Mod+Comma".action.consume-window-into-column = [ ];
|
||||
"Mod+Period".action.expel-window-from-column = [ ];
|
||||
|
||||
# Column and window presentation modes
|
||||
"Mod+R".action.switch-preset-column-width = [ ];
|
||||
"Mod+Shift+R".action.switch-preset-column-width-back = [ ];
|
||||
"Mod+Ctrl+R".action.reset-window-height = [ ];
|
||||
@@ -213,6 +286,7 @@
|
||||
"Mod+M".action.maximize-window-to-edges = [ ];
|
||||
"Mod+C".action.center-column = [ ];
|
||||
|
||||
# Manual column width and window height adjustments
|
||||
"Mod+Shift+H".action.set-column-width = "-10%";
|
||||
"Mod+Shift+L".action.set-column-width = "+10%";
|
||||
"Mod+Shift+J".action.set-window-height = "+10%";
|
||||
@@ -222,57 +296,7 @@
|
||||
"Mod+Shift+Minus".action.set-window-height = "-10%";
|
||||
"Mod+Shift+Equal".action.set-window-height = "+10%";
|
||||
|
||||
"Mod+Ctrl+F" = {
|
||||
repeat = false;
|
||||
action.spawn = [
|
||||
uxCommands.vicinaeCommand
|
||||
"files"
|
||||
];
|
||||
hotkey-overlay.title = "Find Files";
|
||||
};
|
||||
"Mod+V" = {
|
||||
repeat = false;
|
||||
action.spawn = uxCommands.clipboardHistory;
|
||||
hotkey-overlay.title = "Clipboard History";
|
||||
};
|
||||
"Mod+Ctrl+N" = {
|
||||
repeat = false;
|
||||
action.spawn = [
|
||||
uxCommands.vicinaeCommand
|
||||
"nix-options"
|
||||
];
|
||||
hotkey-overlay.title = "NixOS Options";
|
||||
};
|
||||
"Mod+Ctrl+H" = {
|
||||
repeat = false;
|
||||
action.spawn = [
|
||||
uxCommands.vicinaeCommand
|
||||
"home-manager-options"
|
||||
];
|
||||
hotkey-overlay.title = "Home Manager Options";
|
||||
};
|
||||
"Mod+Ctrl+P" = {
|
||||
repeat = false;
|
||||
action.spawn = [
|
||||
uxCommands.vicinaeCommand
|
||||
"nix-packages"
|
||||
];
|
||||
hotkey-overlay.title = "Nix Packages";
|
||||
};
|
||||
"Mod+Ctrl+W" = {
|
||||
repeat = false;
|
||||
action.spawn = [
|
||||
uxCommands.vicinaeCommand
|
||||
"niri-windows"
|
||||
];
|
||||
hotkey-overlay.title = "Windows";
|
||||
};
|
||||
"Mod+Ctrl+C" = {
|
||||
repeat = false;
|
||||
action.spawn = uxCommands.pickColor;
|
||||
hotkey-overlay.title = "Pick Color";
|
||||
};
|
||||
|
||||
# Floating and tabbed layout toggles
|
||||
"Mod+Alt+V".action.toggle-window-floating = [ ];
|
||||
"Mod+Shift+V".action.switch-focus-between-floating-and-tiling = [ ];
|
||||
"Mod+W".action.toggle-column-tabbed-display = [ ];
|
||||
|
||||
Reference in New Issue
Block a user