BREAKING CHANGE: changed where the dmenu emulation pops up

This commit is contained in:
Jabir Ali Ouassou 2024-10-10 14:25:20 +02:00
parent e4265a5ee5
commit 9efa142969
2 changed files with 5 additions and 7 deletions

View file

@ -234,12 +234,10 @@ functionality, add the following to your `tmux.conf`:
set -g @tilish-dmenu 'on'
Basically, pressing <kbd>Alt</kbd>+<kbd>d</kbd> 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 <kbd>Alt</kbd>+<kbd>Enter</kbd> and typing the command name.
This is currently only available in `tmux` v2.7+.
Pressing <kbd>Alt</kbd>+<kbd>d</kbd> 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

View file

@ -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`.'