tmux-sessionizer: nix-store find + fzf
This commit is contained in:
parent
1e55be7fae
commit
2c548b4ac3
1 changed files with 3 additions and 1 deletions
|
@ -28,12 +28,14 @@ in
|
||||||
pgrep = "${pkgs.procps}/bin/pgrep";
|
pgrep = "${pkgs.procps}/bin/pgrep";
|
||||||
basename = "${pkgs.coreutils}/bin/basename";
|
basename = "${pkgs.coreutils}/bin/basename";
|
||||||
tr = "${pkgs.coreutils}/bin/tr";
|
tr = "${pkgs.coreutils}/bin/tr";
|
||||||
|
fzf = "${pkgs.fzf}/bin/fzf";
|
||||||
|
find = "${pkgs.findutils}/bin/find";
|
||||||
in
|
in
|
||||||
lib.mkDefault (pkgs.writeShellScriptBin "tmux-sessionizer" ''
|
lib.mkDefault (pkgs.writeShellScriptBin "tmux-sessionizer" ''
|
||||||
if [[ $# -eq 1 ]]; then
|
if [[ $# -eq 1 ]]; then
|
||||||
selected=$1
|
selected=$1
|
||||||
else
|
else
|
||||||
selected=$(find "$(readlink -f ~/projects)" ~/ ~/.config ~/.suckless/ -mindepth 1 -maxdepth 1 -type d | fzf)
|
selected=$(${find} "$(readlink -f ~/projects)" ~/ ~/.config ~/.suckless/ -mindepth 1 -maxdepth 1 -type d | ${fzf})
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $selected ]]; then
|
if [[ -z $selected ]]; then
|
||||||
|
|
Loading…
Reference in a new issue