Remove the features directory
This commit is contained in:
parent
6585022138
commit
0f31678c52
57 changed files with 6 additions and 8 deletions
41
nix/modules/home-manager/cli/tmux-sessionizer.nix
Normal file
41
nix/modules/home-manager/cli/tmux-sessionizer.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
options.homeManagerModules.tmux-sessionizer.enable = mkEnableOption "Enable tmux-sessionizer";
|
||||
|
||||
config = mkIf config.homeManagerModules.tmux-sessionizer.enable {
|
||||
home.packages = with pkgs; [ tmux-sessionizer ];
|
||||
|
||||
home.file.".tmux-sessionizer".source = "${
|
||||
pkgs.writeShellApplication {
|
||||
name = ".tmux-sessionizer";
|
||||
|
||||
runtimeInputs = with pkgs; [
|
||||
tmux
|
||||
];
|
||||
|
||||
text = ''
|
||||
set +o errexit
|
||||
set +o nounset
|
||||
|
||||
if [[ "$PWD" == "$REPOS/os" || "$PWD" == "$REPOS/personal" ]]; then
|
||||
clear
|
||||
|
||||
return
|
||||
fi
|
||||
|
||||
tmux new-window -d -n shell
|
||||
nvim
|
||||
clear
|
||||
'';
|
||||
}
|
||||
}/bin/.tmux-sessionizer";
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue