From 9efa142969668297eabc88f49cebe9b70856a41b Mon Sep 17 00:00:00 2001 From: Jabir Ali Ouassou Date: Thu, 10 Oct 2024 14:25:20 +0200 Subject: [PATCH] BREAKING CHANGE: changed where the dmenu emulation pops up --- README.md | 10 ++++------ tilish.tmux | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 595b34c..7dd5ab2 100644 --- a/README.md +++ b/README.md @@ -234,12 +234,10 @@ functionality, add the following to your `tmux.conf`: set -g @tilish-dmenu 'on' -Basically, pressing Alt+d will then pop up a split -that lets you fuzzy-search through all executables in your system `$PATH`. -Selecting an executable runs the command in that split. When you want -to start an interactive process, this can be more convenient than -using Alt+Enter and typing the command name. -This is currently only available in `tmux` v2.7+. +Pressing Alt+d will then show a pop-up `tmux` window that +lets you fuzzy-search through all executables in your system `$PATH`. Selecting +an executable runs the command in a new window. This can be quite convenient +as a way to quickly launch interactive processes like `htop` and `ipython`. [5]: https://github.com/junegunn/fzf diff --git a/tilish.tmux b/tilish.tmux index 1e4412e..49ad3df 100755 --- a/tilish.tmux +++ b/tilish.tmux @@ -286,7 +286,7 @@ # This solution is about an order of magnitude faster than invoking `compgen`. # Based on: https://medium.com/njiuko/using-fzf-instead-of-dmenu-2780d184753f tmux $bind "${mod}${d}" \ - select-pane -t '{bottom-right}' \\\; split-pane 'sh -c "exec \$(echo \"\$PATH\" | tr \":\" \"\n\" | xargs -I{} -- find {} -maxdepth 1 -mindepth 1 -perm -111 2>/dev/null | sort -u | fzf-tmux -p 100%,100% --color 16)"' + run-shell 'app="$(echo "$PATH" | tr ":" "\n" | xargs -I{} -- find {} -maxdepth 1 -mindepth 1 -perm -111 2>/dev/null | sort -u | fzf-tmux -p 100%,100% --color 16)" && tmux new-window "$app" || exit 0' else tmux $bind "${mod}${d}" \ display 'To enable this function, install `fzf` and restart `tmux`.'