hm: isolate tmux-sessionizer configuration

This commit is contained in:
Primrose 2025-06-04 19:18:25 +02:00
parent 539e0ec5cc
commit 57e9ef2070
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA
3 changed files with 33 additions and 14 deletions

View file

@ -163,6 +163,8 @@ in
../homeModules/common/tealdeer.nix
../homeModules/common/user-nixconf.nix
../homeModules/extra/tmux-fish-integration.nix
#
# Extern modules
#

View file

@ -12,20 +12,7 @@ in {
./aliasesAbbrs.nix
];
#
# tmux sessionizer
#
home.sessionVariables = lib.mapAttrs (_: path: config.home.homeDirectory + "/${path}") {
REPO_PATH = "r";
PLAYGROUND_PATH = "pg";
WORKTREE_PATH = "wt";
};
programs.direnv.config.whitelist.prefix = [(config.home.sessionVariables.REPO_PATH + "/leana8959")];
programs.tmux.extraConfig = lib.mkBefore ''
# sessionizer binds
bind -n C-f run-shell "tmux new-window tmux-sessionizer"
bind s run-shell "tmux-last"
'';
# TODO: do not set this here
programs.kitty.settings.shell = ''${fishExe}'';
#

View file

@ -0,0 +1,30 @@
# This module integrates tmux with fish
{pkgs, lib, config, ...}: {
assertions = [
{ assertion = config.programs.fish.enable;
message = "Should have fish enabled";
}
{ assertion = config.programs.tmux.enable;
message = "Should have tmux enabled";
}
];
home.sessionVariables = lib.mapAttrs (_: path: config.home.homeDirectory + "/${path}") {
REPO_PATH = "r";
PLAYGROUND_PATH = "pg";
WORKTREE_PATH = "wt";
};
programs.direnv.config.whitelist.prefix = [(config.home.sessionVariables.REPO_PATH + "/leana8959")];
programs.tmux.extraConfig = lib.mkBefore ''
# sessionizer binds
bind -n C-f run-shell "tmux new-window tmux-sessionizer"
bind s run-shell "tmux-last"
'';
home.packages = with pkgs; [
tmux-sessionizer
];
}