{ ... }: {
  flake.lib.niriBinds =
    { pkgs, dmsEnabled ? false, dmsIpcBinds }:
    let
      lib = pkgs.lib;
    in
    {
      "Mod+T"."spawn-sh" = lib.getExe pkgs.kitty;
      "Mod+Control+T"."spawn-sh" = "konsole";
      "Mod+D"."spawn-sh" = "rofi -show drun";
      "Mod+Control+O"."spawn-sh" = "rofi -show window";
      "Mod+E"."spawn-sh" = "nemo";
    }
    // lib.optionalAttrs dmsEnabled {
      "Mod+Space"."spawn-sh" = dmsIpcBinds.spotlight;
      "Mod+V"."spawn-sh" = dmsIpcBinds.clipboard;
      "Mod+N"."spawn-sh" = dmsIpcBinds.notepad;
      "Mod+Shift+N"."spawn-sh" = dmsIpcBinds.notifications;
      "Mod+M"."spawn-sh" = dmsIpcBinds.processlist;
      "Mod+B"."spawn-sh" = dmsIpcBinds.barToggle;
      "Mod+Shift+B"."spawn-sh" = dmsIpcBinds.barToggleBar2;
      "Mod+A"."spawn-sh" = dmsIpcBinds.ephemera;
      "Mod+numbersign"."spawn-sh" = dmsIpcBinds.wallpaperCarousel;
      "Mod+L"."spawn-sh" = dmsIpcBinds.lock;
    }
    // {
      "Mod+Q"."close-window" = _: { };
      "Mod+F"."maximize-column" = _: { };
      "Mod+Shift+F"."fullscreen-window" = _: { };
      "Mod+O"."toggle-overview" = _: { };
      "Mod+Shift+NumberSign"."show-hotkey-overlay" = _: { };
      "Mod+Shift+E".quit = _: { };

      "Mod+Left"."focus-column-or-monitor-left" = _: { };
      "Mod+Down"."focus-window-or-monitor-down" = _: { };
      "Mod+Up"."focus-window-or-monitor-up" = _: { };
      "Mod+Right"."focus-column-or-monitor-right" = _: { };

      "Mod+Shift+WheelScrollDown"."focus-workspace-down" = _: { };
      "Mod+Shift+WheelScrollUp"."focus-workspace-up" = _: { };

      "Mod+WheelScrollDown"."focus-column-or-monitor-right" = _: { };
      "Mod+WheelScrollUp"."focus-column-or-monitor-left" = _: { };

      "Mod+Shift+Left"."move-column-left-or-to-monitor-left" = _: { };
      "Mod+Shift+Down"."move-window-down" = _: { };
      "Mod+Shift+Up"."move-window-up" = _: { };
      "Mod+Shift+Right"."move-column-right-or-to-monitor-right" = _: { };
      "Mod+Page_Up"."focus-workspace-up" = _: { };
      "Mod+Page_Down"."focus-workspace-down" = _: { };
      "Mod+Shift+Page_Up"."move-column-to-workspace-up" = _: { };
      "Mod+Shift+Page_Down"."move-column-to-workspace-down" = _: { };
      "Mod+R"."switch-preset-column-width" = _: { };
      "Mod+BracketLeft"."consume-or-expel-window-left" = _: { };
      "Mod+BracketRight"."consume-or-expel-window-right" = _: { };
      "Mod+Comma"."consume-window-into-column" = _: { };
      "Mod+Period"."expel-window-from-column" = _: { };
      "Mod+Alt+Space"."toggle-window-floating" = _: { };

      "Mod+1"."focus-workspace" = 1;
      "Mod+2"."focus-workspace" = 2;
      "Mod+3"."focus-workspace" = 3;
      "Mod+4"."focus-workspace" = 4;
      "Mod+5"."focus-workspace" = 5;
      "Mod+6"."focus-workspace" = 6;
      "Mod+7"."focus-workspace" = 7;
      "Mod+8"."focus-workspace" = 8;
      "Mod+9"."focus-workspace" = 9;
      "Mod+Ctrl+1"."move-column-to-workspace" = 1;
      "Mod+Ctrl+2"."move-column-to-workspace" = 2;
      "Mod+Ctrl+3"."move-column-to-workspace" = 3;
      "Mod+Ctrl+4"."move-column-to-workspace" = 4;
      "Mod+Ctrl+5"."move-column-to-workspace" = 5;
      "Mod+Ctrl+6"."move-column-to-workspace" = 6;
      "Mod+Ctrl+7"."move-column-to-workspace" = 7;
      "Mod+Ctrl+8"."move-column-to-workspace" = 8;
      "Mod+Ctrl+9"."move-column-to-workspace" = 9;

      "XF86AudioRaiseVolume".spawn = [
        "wpctl"
        "set-volume"
        "@DEFAULT_AUDIO_SINK@"
        "0.05+"
      ];
      "XF86AudioLowerVolume".spawn = [
        "wpctl"
        "set-volume"
        "@DEFAULT_AUDIO_SINK@"
        "0.05-"
      ];
      "XF86AudioMute".spawn = [
        "wpctl"
        "set-mute"
        "@DEFAULT_AUDIO_SINK@"
        "toggle"
      ];
      "XF86MonBrightnessUp".spawn = [ "brightnessctl" "set" "+5%" ];
      "XF86MonBrightnessDown".spawn = [ "brightnessctl" "set" "5%-" ];

      Print.screenshot = _: { };
      "Ctrl+Print"."screenshot-screen" = _: { };
      "Alt+Print"."screenshot-window" = _: { };
    };
}
