310 lines
12 KiB
Nix
310 lines
12 KiB
Nix
{ inputs, ... }:
|
|
{
|
|
flake-file.inputs.niri.url = "github:sodiboo/niri-flake";
|
|
|
|
lux.niri = {
|
|
nixos =
|
|
{ pkgs, ... }:
|
|
{
|
|
imports = [ inputs.niri.nixosModules.niri ];
|
|
nixpkgs.overlays = [ inputs.niri.overlays.niri ];
|
|
|
|
programs.niri.enable = true;
|
|
programs.niri.package = pkgs.niri-unstable;
|
|
};
|
|
|
|
homeManager =
|
|
{ config, pkgs, ... }:
|
|
{
|
|
# Needed for file picker
|
|
home.packages = with pkgs; [
|
|
playerctl
|
|
nautilus
|
|
];
|
|
|
|
programs.niri = {
|
|
settings = {
|
|
prefer-no-csd = true;
|
|
hotkey-overlay.skip-at-startup = true;
|
|
screenshot-path = "${config.xdg.userDirs.pictures}/screenshots/%Y-%m-%dT%H:%M:%S.png";
|
|
|
|
cursor = with config.home.pointerCursor; {
|
|
size = size;
|
|
theme = name;
|
|
|
|
hide-after-inactive-ms = 3000;
|
|
hide-when-typing = true;
|
|
};
|
|
|
|
layout = {
|
|
always-center-single-column = true;
|
|
gaps = 16;
|
|
focus-ring.width = 3;
|
|
};
|
|
|
|
window-rules = [
|
|
{
|
|
geometry-corner-radius =
|
|
let
|
|
radius = 15.0;
|
|
in
|
|
{
|
|
bottom-left = radius;
|
|
bottom-right = radius;
|
|
top-left = radius;
|
|
top-right = radius;
|
|
};
|
|
clip-to-geometry = true;
|
|
}
|
|
];
|
|
|
|
debug = {
|
|
honor-xdg-activation-with-invalid-serial = true;
|
|
};
|
|
|
|
input = {
|
|
focus-follows-mouse.enable = true;
|
|
keyboard = {
|
|
repeat-delay = 300;
|
|
repeat-rate = 50;
|
|
xkb.options = "caps:escape";
|
|
};
|
|
mouse.accel-speed = 0.4;
|
|
};
|
|
|
|
outputs."LG Electronics LG ULTRAGEAR 103NTYT8R290" = {
|
|
focus-at-startup = true;
|
|
position.x = 0;
|
|
position.y = 0;
|
|
};
|
|
|
|
outputs."LG Electronics LG ULTRAGEAR 103NTJJ8R332" = {
|
|
position.x = 2560;
|
|
position.y = 0;
|
|
};
|
|
|
|
binds = {
|
|
"Mod+Space".action.spawn-sh = "noctalia-shell ipc call launcher toggle";
|
|
|
|
# --- Helpful Overlays & Launchers ---
|
|
"Mod+Shift+Slash".action.show-hotkey-overlay = [ ];
|
|
|
|
"Mod+Return" = {
|
|
action.spawn = "kitty";
|
|
hotkey-overlay.title = "Open a Terminal";
|
|
};
|
|
|
|
"Mod+B" = {
|
|
action.spawn = "brave";
|
|
hotkey-overlay.title = "Open a Browser";
|
|
};
|
|
|
|
"Mod+D" = {
|
|
action.spawn = "fuzzel";
|
|
hotkey-overlay.title = "Run an Application: fuzzel";
|
|
};
|
|
"Mod+Alt+S" = {
|
|
action.spawn-sh = "pkill orca || exec orca";
|
|
allow-when-locked = true;
|
|
hotkey-overlay.hidden = true; # Equivalent to hotkey-overlay-title=null
|
|
};
|
|
|
|
# --- Audio & Media Controls ---
|
|
"XF86AudioPlay" = {
|
|
action.spawn-sh = "playerctl play-pause";
|
|
allow-when-locked = true;
|
|
};
|
|
"XF86AudioStop" = {
|
|
action.spawn-sh = "playerctl stop";
|
|
allow-when-locked = true;
|
|
};
|
|
"XF86AudioPrev" = {
|
|
action.spawn-sh = "playerctl previous";
|
|
allow-when-locked = true;
|
|
};
|
|
"XF86AudioNext" = {
|
|
action.spawn-sh = "playerctl next";
|
|
allow-when-locked = true;
|
|
};
|
|
"XF86AudioRaiseVolume" = {
|
|
action.spawn-sh = "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+";
|
|
allow-when-locked = true;
|
|
};
|
|
"XF86AudioLowerVolume" = {
|
|
action.spawn-sh = "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-";
|
|
allow-when-locked = true;
|
|
};
|
|
"XF86AudioMute" = {
|
|
action.spawn-sh = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
|
allow-when-locked = true;
|
|
};
|
|
"XF86AudioMicMute" = {
|
|
action.spawn-sh = "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle";
|
|
allow-when-locked = true;
|
|
};
|
|
|
|
# --- Overview & Window Management ---
|
|
"Mod+O" = {
|
|
action.toggle-overview = [ ];
|
|
repeat = false;
|
|
};
|
|
"Mod+Q" = {
|
|
action.close-window = [ ];
|
|
repeat = false;
|
|
};
|
|
|
|
# Focus Movement
|
|
"Mod+H".action.focus-column-left = [ ];
|
|
"Mod+J".action.focus-window-down = [ ];
|
|
"Mod+K".action.focus-window-up = [ ];
|
|
"Mod+L".action.focus-column-right = [ ];
|
|
|
|
# Window Movement
|
|
"Mod+Ctrl+Left".action.move-column-left = [ ];
|
|
"Mod+Ctrl+Down".action.move-window-down = [ ];
|
|
"Mod+Ctrl+Up".action.move-window-up = [ ];
|
|
"Mod+Ctrl+Right".action.move-column-right = [ ];
|
|
"Mod+Ctrl+H".action.move-column-left = [ ];
|
|
"Mod+Ctrl+J".action.move-window-down = [ ];
|
|
"Mod+Ctrl+K".action.move-window-up = [ ];
|
|
"Mod+Ctrl+L".action.move-column-right = [ ];
|
|
|
|
# Column Focus & Movement
|
|
"Mod+Home".action.focus-column-first = [ ];
|
|
"Mod+End".action.focus-column-last = [ ];
|
|
"Mod+Ctrl+Home".action.move-column-to-first = [ ];
|
|
"Mod+Ctrl+End".action.move-column-to-last = [ ];
|
|
|
|
# Monitor Focus
|
|
"Mod+Shift+Left".action.focus-monitor-left = [ ];
|
|
"Mod+Shift+Down".action.focus-monitor-down = [ ];
|
|
"Mod+Shift+Up".action.focus-monitor-up = [ ];
|
|
"Mod+Shift+Right".action.focus-monitor-right = [ ];
|
|
"Mod+Shift+H".action.focus-monitor-left = [ ];
|
|
"Mod+Shift+J".action.focus-monitor-down = [ ];
|
|
"Mod+Shift+K".action.focus-monitor-up = [ ];
|
|
"Mod+Shift+L".action.focus-monitor-right = [ ];
|
|
|
|
# Monitor Movement
|
|
"Mod+Shift+Ctrl+Left".action.move-column-to-monitor-left = [ ];
|
|
"Mod+Shift+Ctrl+Down".action.move-column-to-monitor-down = [ ];
|
|
"Mod+Shift+Ctrl+Up".action.move-column-to-monitor-up = [ ];
|
|
"Mod+Shift+Ctrl+Right".action.move-column-to-monitor-right = [ ];
|
|
"Mod+Shift+Ctrl+H".action.move-column-to-monitor-left = [ ];
|
|
"Mod+Shift+Ctrl+J".action.move-column-to-monitor-down = [ ];
|
|
"Mod+Shift+Ctrl+K".action.move-column-to-monitor-up = [ ];
|
|
"Mod+Shift+Ctrl+L".action.move-column-to-monitor-right = [ ];
|
|
|
|
# Workspace Focus
|
|
"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 = [ ];
|
|
|
|
# Workspace Movement (Column)
|
|
"Mod+Ctrl+Page_Down".action.move-column-to-workspace-down = [ ];
|
|
"Mod+Ctrl+Page_Up".action.move-column-to-workspace-up = [ ];
|
|
"Mod+Ctrl+U".action.move-column-to-workspace-down = [ ];
|
|
"Mod+Ctrl+I".action.move-column-to-workspace-up = [ ];
|
|
|
|
# Workspace Movement (Entire Workspace)
|
|
"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 Wheel Scrolling ---
|
|
"Mod+WheelScrollDown" = {
|
|
action.focus-workspace-down = [ ];
|
|
cooldown-ms = 150;
|
|
};
|
|
"Mod+WheelScrollUp" = {
|
|
action.focus-workspace-up = [ ];
|
|
cooldown-ms = 150;
|
|
};
|
|
"Mod+Ctrl+WheelScrollDown" = {
|
|
action.move-column-to-workspace-down = [ ];
|
|
cooldown-ms = 150;
|
|
};
|
|
"Mod+Ctrl+WheelScrollUp" = {
|
|
action.move-column-to-workspace-up = [ ];
|
|
cooldown-ms = 150;
|
|
};
|
|
|
|
"Mod+WheelScrollRight".action.focus-column-right = [ ];
|
|
"Mod+WheelScrollLeft".action.focus-column-left = [ ];
|
|
"Mod+Ctrl+WheelScrollRight".action.move-column-right = [ ];
|
|
"Mod+Ctrl+WheelScrollLeft".action.move-column-left = [ ];
|
|
|
|
"Mod+Shift+WheelScrollDown".action.focus-column-right = [ ];
|
|
"Mod+Shift+WheelScrollUp".action.focus-column-left = [ ];
|
|
"Mod+Ctrl+Shift+WheelScrollDown".action.move-column-right = [ ];
|
|
"Mod+Ctrl+Shift+WheelScrollUp".action.move-column-left = [ ];
|
|
|
|
# --- Workspace Indices ---
|
|
"Mod+1".action.focus-workspace = 1;
|
|
"Mod+2".action.focus-workspace = 2;
|
|
"Mod+3".action.focus-workspace = 3;
|
|
"Mod+4".action.focus-workspace = 4;
|
|
"Mod+5".action.focus-workspace = 5;
|
|
"Mod+6".action.focus-workspace = 6;
|
|
"Mod+7".action.focus-workspace = 7;
|
|
"Mod+8".action.focus-workspace = 8;
|
|
"Mod+9".action.focus-workspace = 9;
|
|
|
|
"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;
|
|
"Mod+Ctrl+4".action.move-column-to-workspace = 4;
|
|
"Mod+Ctrl+5".action.move-column-to-workspace = 5;
|
|
"Mod+Ctrl+6".action.move-column-to-workspace = 6;
|
|
"Mod+Ctrl+7".action.move-column-to-workspace = 7;
|
|
"Mod+Ctrl+8".action.move-column-to-workspace = 8;
|
|
"Mod+Ctrl+9".action.move-column-to-workspace = 9;
|
|
|
|
# --- Column/Window Reshaping & Organization ---
|
|
"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 = [ ];
|
|
|
|
"Mod+R".action.switch-preset-column-width = [ ];
|
|
"Mod+Shift+R".action.switch-preset-window-height = [ ];
|
|
"Mod+Ctrl+R".action.reset-window-height = [ ];
|
|
"Mod+F".action.maximize-column = [ ];
|
|
"Mod+Shift+F".action.fullscreen-window = [ ];
|
|
"Mod+M".action.maximize-window-to-edges = [ ];
|
|
"Mod+Ctrl+F".action.expand-column-to-available-width = [ ];
|
|
"Mod+C".action.center-column = [ ];
|
|
"Mod+Ctrl+C".action.center-visible-columns = [ ];
|
|
|
|
"Mod+Minus".action.set-column-width = "-10%";
|
|
"Mod+Equal".action.set-column-width = "+10%";
|
|
"Mod+Shift+Minus".action.set-window-height = "-10%";
|
|
"Mod+Shift+Equal".action.set-window-height = "+10%";
|
|
|
|
"Mod+V".action.toggle-window-floating = [ ];
|
|
"Mod+Shift+V".action.switch-focus-between-floating-and-tiling = [ ];
|
|
"Mod+W".action.toggle-column-tabbed-display = [ ];
|
|
|
|
# --- Screenshots ---
|
|
"Print".action.screenshot = [ ];
|
|
"Ctrl+Print".action.screenshot-screen = [ ];
|
|
"Alt+Print".action.screenshot-window = [ ];
|
|
|
|
# --- System & Session ---
|
|
"Mod+Escape" = {
|
|
action.toggle-keyboard-shortcuts-inhibit = [ ];
|
|
allow-inhibiting = false;
|
|
};
|
|
|
|
"Mod+Shift+E".action.quit = [ ];
|
|
"Ctrl+Alt+Delete".action.quit = [ ];
|
|
"Mod+Shift+P".action.power-off-monitors = [ ];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|