Rename t to tmux-sessionizer

This matches ThePrimeagen's script that mine is based on and that I'll
probably switch to in the future.

I've added to the Nix store as custom-tmux-sessionizer so it doesn't
conflict with the tmux-sessionzer packages that's already in the store.
This commit is contained in:
Oliver Davies 2024-12-06 12:38:40 +00:00
parent 5a9353ad17
commit 930473a896
9 changed files with 51 additions and 8 deletions

View file

@ -19,6 +19,15 @@
;
})
(import ./tmux-sessionizer.nix {
inherit
config
lib
pkgs
self
;
})
./bat.nix
./bin.nix
./bluetuith.nix

View file

@ -0,0 +1,32 @@
{
config,
lib,
pkgs,
...
}:
{
options.features.cli.tmux-sessionizer.enable = lib.mkEnableOption "Enable tmux-sessionizer";
config = lib.mkIf config.features.cli.tmux-sessionizer.enable {
home.packages = with pkgs; [ custom-tmux-sessionizer ];
home.file.".tmux-sessionizer".source = "${
pkgs.writeShellApplication {
name = ".tmux-sessionizer";
runtimeInputs = with pkgs; [
tmux
];
text = ''
set +o nounset
tmux new-window -d -n scratch
nvim
clear
'';
}
}/bin/.tmux-sessionizer";
};
}

View file

@ -72,8 +72,7 @@ in
set-option -g pane-active-border-style "fg=#1f2335"
set-option -g pane-border-style "fg=#1f2335"
bind-key -r f run-shell "tmux new-window t"
bind-key -r f run-shell "tmux new-window custom-tmux-sessionizer"
if-shell "[ -f ~/.tmux.conf.local ]" 'source ~/.tmux.conf.local'
'';

View file

@ -56,7 +56,7 @@
zstyle ":completion:*" matcher-list "" "m:{a-zA-Z}={A-Za-z}" "r:|=*" "l:|=* r:|=*"
autoload -Uz compinit && compinit
bindkey -s ^f "t\n"
bindkey -s ^f "custom-tmux-sessionizer\n"
bindkey -s ^v "nvim\n"
clear-ls-all() {