This commit is contained in:
parent
a0575bdb2a
commit
703bf836de
210 changed files with 1 additions and 1 deletions
30
modules/tmux-sessionizer/default.nix
Normal file
30
modules/tmux-sessionizer/default.nix
Normal 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";
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue