Compare commits
No commits in common. "35ddc6a33ccc4e1335fe508a053f1f99e4341809" and "56044695dfdd0abd780257392343c26d267bb786" have entirely different histories.
35ddc6a33c
...
56044695df
4 changed files with 10 additions and 41 deletions
|
@ -64,19 +64,6 @@ in
|
||||||
gpg.enable = true;
|
gpg.enable = true;
|
||||||
navi.enable = true;
|
navi.enable = true;
|
||||||
tmux.enable = true;
|
tmux.enable = true;
|
||||||
tmux.keybinds = {
|
|
||||||
prefix = {
|
|
||||||
"-" = "split-window -v";
|
|
||||||
"|" = "split-window -h";
|
|
||||||
"C-l" = "send-keys C-l";
|
|
||||||
"R" = "source-file $XDG_CONFIG_HOME/tmux/tmux.conf \\; display-message 'Reloaded tmux.conf'";
|
|
||||||
};
|
|
||||||
copy-mode-vi = {
|
|
||||||
"v" = "send -X begin-selection";
|
|
||||||
"V" = "send -X select-line";
|
|
||||||
"C-v" = "send -X rectangle-toggle";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,6 @@ in
|
||||||
promise-async
|
promise-async
|
||||||
vim-fugitive
|
vim-fugitive
|
||||||
vim-lion
|
vim-lion
|
||||||
vim-tmux-navigator
|
|
||||||
] ++ pluginsWithConfig;
|
] ++ pluginsWithConfig;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -26,6 +26,14 @@ require("which-key").register({
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- fast window move
|
||||||
|
require("which-key").register({
|
||||||
|
["<C-h>"] = { "<C-w>h", "Move window left" },
|
||||||
|
["<C-j>"] = { "<C-w>j", "Move window down" },
|
||||||
|
["<C-k>"] = { "<C-w>k", "Move window up" },
|
||||||
|
["<C-l>"] = { "<C-w>l", "Move window right" },
|
||||||
|
})
|
||||||
|
|
||||||
-- tab
|
-- tab
|
||||||
require("which-key").register({
|
require("which-key").register({
|
||||||
["<tab>"] = {
|
["<tab>"] = {
|
||||||
|
|
|
@ -9,7 +9,7 @@ let
|
||||||
runtimeInputs = with pkgs; [ tmux findutils coreutils procps fd ];
|
runtimeInputs = with pkgs; [ tmux findutils coreutils procps fd ];
|
||||||
text = ''
|
text = ''
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
options=$(fd -HIg '.git' ~/ --min-depth 1 --max-depth 5 --type d --prune --exec dirname {} | fzf --filter "''$*")
|
options=$(fd -HIg '.git' ~/ --min-depth 1 --max-depth 5 --type d --prune --exec dirname {} | fzf --filter "''$*")
|
||||||
|
|
||||||
if [[ -z $options ]]; then
|
if [[ -z $options ]]; then
|
||||||
|
@ -43,22 +43,6 @@ in
|
||||||
options.my.programs.tmux = {
|
options.my.programs.tmux = {
|
||||||
enable = mkEnableOption "tmux";
|
enable = mkEnableOption "tmux";
|
||||||
autoAttach = mkEnableOption "autoAttach";
|
autoAttach = mkEnableOption "autoAttach";
|
||||||
keybinds = mkOption {
|
|
||||||
type = with types; attrsOf (attrsOf string);
|
|
||||||
default = { };
|
|
||||||
description = "Keybinds for tmux";
|
|
||||||
example = literalExample ''
|
|
||||||
{
|
|
||||||
prefix = {
|
|
||||||
"-" = "split-window -v";
|
|
||||||
"|" = "split-window -h";
|
|
||||||
};
|
|
||||||
copy-mode-vi = {
|
|
||||||
"v" = "send -X begin-selection";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
@ -78,18 +62,8 @@ in
|
||||||
plugins = with pkgs.tmuxPlugins; [
|
plugins = with pkgs.tmuxPlugins; [
|
||||||
sensible
|
sensible
|
||||||
tmux-fzf
|
tmux-fzf
|
||||||
vim-tmux-navigator
|
|
||||||
yank
|
yank
|
||||||
];
|
];
|
||||||
extraConfig =
|
|
||||||
let
|
|
||||||
mkKeybind = table: mapAttrsToList (keybind: value: "bind-key -T ${table} '${keybind}' ${value}");
|
|
||||||
keybinds = flatten (mapAttrsToList mkKeybind cfg.keybinds);
|
|
||||||
in
|
|
||||||
''
|
|
||||||
# Keybinds
|
|
||||||
${concatStringsSep "\n" keybinds}
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
fzf.tmux.enableShellIntegration = true;
|
fzf.tmux.enableShellIntegration = true;
|
||||||
fish.interactiveShellInit =
|
fish.interactiveShellInit =
|
||||||
|
@ -106,6 +80,7 @@ in
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue