tmux-sessionizer: paths option

main
Zynh Ludwig 2024-08-07 04:31:21 -07:00
parent 20d33b0483
commit c85f5e013b
1 changed files with 14 additions and 1 deletions

View File

@ -11,6 +11,19 @@ in
snowhawk.tmux.sessionizer = { snowhawk.tmux.sessionizer = {
enable = lib.mkEnableOption "tmux-sessionizer home-manager module"; enable = lib.mkEnableOption "tmux-sessionizer home-manager module";
paths = lib.mkOption {
type = with lib.types; listOf str;
description = ''
list of paths to select with tmux-sessionizer
'';
default = [ ];
example = [
"~"
"~/projects"
"~/src"
];
};
pkg = lib.mkOption { pkg = lib.mkOption {
type = lib.types.package; type = lib.types.package;
description = '' description = ''
@ -35,7 +48,7 @@ in
if [[ $# -eq 1 ]]; then if [[ $# -eq 1 ]]; then
selected=$1 selected=$1
else else
selected=$(${find} -L ~/projects ~/ ~/.config ~/src -mindepth 1 -maxdepth 1 -type d | ${fzf}) selected=$(${find} -L ${lib.escapeShellArgs cfg.paths} -mindepth 1 -maxdepth 1 -type d | ${fzf})
fi fi
if [[ -z $selected ]]; then if [[ -z $selected ]]; then