binds {

    // ────────────── Keybindings ──────────────
    // https://github.com/YaLTeR/niri/wiki/Configuration:-Key-Bindings

    // ─── noctalia-shell keybinds ───
    // https://docs.noctalia.dev/getting-started/keybinds/

    Mod+Shift+ESCAPE                     { show-hotkey-overlay; }
    Mod+Shift+S	{ spawn-sh "flameshot gui"; }

    // ─── Applications ───
    Mod+Return                          hotkey-overlay-title="Open Terminal: Alacritty" { spawn "alacritty"; }
    Mod+CTRL+Return                     hotkey-overlay-title="Open App Launcher: noctalia launcher" { spawn-sh "qs -c noctalia-shell ipc call launcher toggle"; }
    Mod+Space                     hotkey-overlay-title="Open App Launcher: noctalia launcher" { spawn-sh "qs -c noctalia-shell ipc call launcher toggle"; }
    Mod+B                               hotkey-overlay-title="Open Browser: helium" { spawn "helium-browser"; }
    Mod+ALT+L                           hotkey-overlay-title="Lock Screen: noctalia lock" { spawn-sh "qs -c noctalia-shell ipc call lockScreen lock"; }
    Mod+Shift+Q                        hotkey-overlay-title="Session Menu: noctalia sessionMenu" { spawn-sh "qs -c noctalia-shell ipc call sessionMenu toggle"; }

    // Please choose your own file manager.
    Mod+E                               hotkey-overlay-title="File Manager: Nautilus" { spawn "nautilus"; }

    // ─── Media Controls ───
    XF86AudioRaiseVolume                allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call volume increase"; }
    XF86AudioLowerVolume                allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call volume decrease"; }
    XF86AudioMute                       allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call volume muteOutput"; }
    XF86AudioMicMute                    allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call volume muteInput"; }
    XF86AudioNext                       allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call media next"; }
    XF86AudioPrev                       allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call media previous"; }
    XF86AudioPlay                       allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call media playPause"; }
    XF86AudioPause                      allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call media playPause"; }

    // ─── Brightness Controls ───
    XF86MonBrightnessUp                 allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call brightness increase"; }
    XF86MonBrightnessDown               allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call brightness decrease"; }

    // ─── Window Movement and Focus ───
    Mod+Q                               { close-window; }

    Mod+Left                            { focus-column-left; }
    Mod+H                               { focus-column-left; }
    Mod+Right                           { focus-column-right; }
    Mod+L                               { focus-column-right; }
    Mod+Up                              { focus-window-up; }
    Mod+K                               { focus-window-up; }
    Mod+Down                            { focus-window-down; }
    Mod+J                               { focus-window-down; }

    Mod+CTRL+Left                       { move-column-left; }
    Mod+CTRL+H                          { move-column-left; }
    Mod+CTRL+Right                      { move-column-right; }
    Mod+CTRL+L                          { move-column-right; }
    Mod+CTRL+UP                         { move-window-up; }
    Mod+CTRL+K                          { move-window-up; }
    Mod+CTRL+Down                       { move-window-down; }
    Mod+CTRL+J                          { move-window-down; }

    Mod+Home                            { focus-column-first; }
    Mod+End                             { focus-column-last; }
    Mod+CTRL+Home                       { move-column-to-first; }
    Mod+CTRL+End                        { move-column-to-last; }

    Mod+Shift+Left                      { focus-monitor-left; }
    Mod+Shift+Right                     { focus-monitor-right; }
    Mod+Shift+UP                        { focus-monitor-up; }
    Mod+Shift+Down                      { focus-monitor-down; }

    Mod+Shift+CTRL+Left                 { move-column-to-monitor-left; }
    Mod+Shift+CTRL+Right                { move-column-to-monitor-right; }
    Mod+Shift+CTRL+UP                   { move-column-to-monitor-up; }
    Mod+Shift+CTRL+Down                 { move-column-to-monitor-down; }

    // ─── Workspace Switching ───
    Mod+WheelScrollDown                 cooldown-ms=150 { focus-workspace-down; }
    Mod+WheelScrollUp                   cooldown-ms=150 { focus-workspace-up; }
    Mod+CTRL+WheelScrollDown            cooldown-ms=150 { move-column-to-workspace-down; }
    Mod+CTRL+WheelScrollUp              cooldown-ms=150 { move-column-to-workspace-up; }

    Mod+WheelScrollRight                { focus-column-right; }
    Mod+WheelScrollLeft                 { focus-column-left; }
    Mod+CTRL+WheelScrollRight           { move-column-right; }
    Mod+CTRL+WheelScrollLeft            { move-column-left; }

    Mod+Shift+WheelScrollDown           { focus-column-right; }
    Mod+Shift+WheelScrollUp             { focus-column-left; }
    Mod+CTRL+Shift+WheelScrollDown      { move-column-right; }
    Mod+CTRL+Shift+WheelScrollUp        { move-column-left; }

    Alt+1                               { focus-workspace 1; }
    Alt+2                               { focus-workspace 2; }
    Alt+3                               { focus-workspace 3; }
    Alt+4                               { focus-workspace 4; }
    Alt+5                               { focus-workspace 5; }
    Alt+6                               { focus-workspace 6; }
    Alt+7                               { focus-workspace 7; }
    Alt+8                               { focus-workspace 8; }
    Alt+9                               { focus-workspace 9; }

    Alt+Shift+1                          { move-column-to-workspace 1; }
    Alt+Shift+2                          { move-column-to-workspace 2; }
    Alt+Shift+3                          { move-column-to-workspace 3; }
    Alt+Shift+4                          { move-column-to-workspace 4; }
    Alt+Shift+5                          { move-column-to-workspace 5; }
    Alt+Shift+6                          { move-column-to-workspace 6; }
    Alt+Shift+7                          { move-column-to-workspace 7; }
    Alt+Shift+8                          { move-column-to-workspace 8; }
    Alt+Shift+9                          { move-column-to-workspace 9; }

    Mod+TAB                             { focus-workspace-previous; }

    // ─── Layout Controls ───
    Mod+CTRL+F                          { expand-column-to-available-width; }
    Mod+C                               { center-column; }
    Mod+CTRL+C                          { center-visible-columns; }
    Mod+Minus                           { set-column-width "-10%"; }
    Mod+Equal                           { set-column-width "+10%"; }
    Mod+Shift+Minus                     { set-window-height "-10%"; }
    Mod+Shift+Equal                     { set-window-height "+10%"; }

    // ─── Modes ───
    Mod+T                               { toggle-window-floating; }
    Mod+F                               { fullscreen-window; }
    Mod+W                               { toggle-column-tabbed-display; }

    // ─── Screenshots ───
    CTRL+Shift+1                        { screenshot; }
    CTRL+Shift+2                        { screenshot-screen; }
    CTRL+Shift+3                        { screenshot-window; }

    // ─── Emergency Escape Key ───
    // Use this when a fullscreen app blocks your keybinds.
    // It disables any active keyboard shortcut inhibitor, restoring control.
    Mod+ESCAPE                          allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; }

    // ─── Exit / Power ───
    CTRL+ALT+Delete                     { quit; } // Also quits Niri
    Mod+Shift+P                         { power-off-monitors; } // Turn off screens (useful for OLED or privacy)
    Mod+O                               repeat=false { toggle-overview; }
}
