Move tmux-sessionizer configuration
All checks were successful
/ check (push) Successful in 1m34s

This commit is contained in:
Oliver Davies 2025-07-24 23:16:16 +01:00
parent 64b158ed2a
commit eb516819fa
8 changed files with 79 additions and 89 deletions

View file

@ -0,0 +1,30 @@
{
flake.modules.homeManager.base =
{ config, pkgs, ... }:
{
home.file.".tmux-sessionizer".source = "${
pkgs.writeShellApplication {
name = ".tmux-sessionizer";
runtimeInputs = with pkgs; [
tmux
];
text = ''
set +o errexit
set +o nounset
if [[ "$PWD" == "${config.xdg.userDirs.extraConfig.XDG_REPOS_DIR}/os" || "$PWD" == "${config.xdg.userDirs.extraConfig.XDG_REPOS_DIR}/personal" || "$PWD" == "${config.xdg.userDirs.extraConfig.XDG_REPOS_DIR}/work" ]]; then
clear
return
fi
tmux new-window -d -n scratch
nvim .
clear
'';
}
}/bin/.tmux-sessionizer";
};
}