diff --git a/flake.lock b/flake.lock index 27ee762..047e9e2 100644 --- a/flake.lock +++ b/flake.lock @@ -257,15 +257,16 @@ "nixos-m1": { "flake": false, "locked": { - "lastModified": 1665528527, - "narHash": "sha256-BEnPCtrSB8F7AgvsK/QZuAIJizXMAh5eEEDBMZBFYGk=", - "owner": "tpwrules", + "lastModified": 1665963056, + "narHash": "sha256-u8l1IqAqm02zYrBXZBFphBZiF3sLGeFnILEoUAIozrg=", + "owner": "natsukagami", "repo": "nixos-m1", - "rev": "267f23b3b79614edaa87b05d5253fc78acfb054c", + "rev": "ce00f9e1e0073763214409375f07461ed7454e4f", "type": "github" }, "original": { - "owner": "tpwrules", + "owner": "natsukagami", + "ref": "enable-uinput", "repo": "nixos-m1", "type": "github" } diff --git a/flake.nix b/flake.nix index b79cc60..cb3da4b 100644 --- a/flake.nix +++ b/flake.nix @@ -29,7 +29,7 @@ kakoune.flake = false; kak-lsp.url = github:kak-lsp/kak-lsp; kak-lsp.flake = false; - nixos-m1.url = github:tpwrules/nixos-m1; + nixos-m1.url = github:natsukagami/nixos-m1/enable-uinput; nixos-m1.flake = false; # --- diff --git a/home/modules/programs/my-kitty/tabs.nix b/home/modules/programs/my-kitty/tabs.nix new file mode 100644 index 0000000..3524bd9 --- /dev/null +++ b/home/modules/programs/my-kitty/tabs.nix @@ -0,0 +1,30 @@ +{ config, pkgs, lib, ... }: + +let + cfg = config.programs.my-kitty; + cmd = cfg.cmd; +in +with lib; +{ + programs.kitty.keybindings = mkIf cfg.enableTabs { + "${cmd}+t" = "new_tab_with_cwd"; + "${cmd}+shift+t" = "new_tab"; + "${cmd}+shift+o" = "launch --cwd=current --location=vsplit"; + "${cmd}+o" = "launch --cwd=current --location=hsplit"; + "${cmd}+shift+r" = "layout_action rotate"; + ## Move the active window in the indicated direction + "${cmd}+shift+h" = "move_window left"; + "${cmd}+shift+k" = "move_window up"; + "${cmd}+shift+j" = "move_window down"; + "${cmd}+shift+l" = "move_window right"; + ## Switch focus to the neighboring window in the indicated direction + "${cmd}+h" = "neighboring_window left"; + "${cmd}+k" = "neighboring_window up"; + "${cmd}+j" = "neighboring_window down "; + "${cmd}+l" = "neighboring_window right"; + ## Detach window to its own tab + "${cmd}+d" = "detach_window new-tab"; + ## Change layout to fullscreen (stack) and back + "${cmd}+f" = "toggle_layout stack"; + }; +}