mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 06:39:14 +00:00
hm: isolate tmux-sessionizer configuration
This commit is contained in:
parent
539e0ec5cc
commit
57e9ef2070
3 changed files with 33 additions and 14 deletions
|
|
@ -163,6 +163,8 @@ in
|
|||
../homeModules/common/tealdeer.nix
|
||||
../homeModules/common/user-nixconf.nix
|
||||
|
||||
../homeModules/extra/tmux-fish-integration.nix
|
||||
|
||||
#
|
||||
# Extern modules
|
||||
#
|
||||
|
|
|
|||
|
|
@ -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}'';
|
||||
|
||||
#
|
||||
|
|
|
|||
30
nix/homeModules/extra/tmux-fish-integration.nix
Normal file
30
nix/homeModules/extra/tmux-fish-integration.nix
Normal 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
|
||||
];
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue