From 0ea572352fa2c88bfe4376f8835966aca30f1b11 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Thu, 31 Mar 2022 17:10:51 +0300 Subject: [PATCH] Fuzzy process finding --- tmux/.tmux.conf | 1 + tmux/.tmux/functions.zsh/tmux-fzf-procs | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 tmux/.tmux/functions.zsh/tmux-fzf-procs diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index ed4e3ed..4d2d238 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -67,6 +67,7 @@ bind-key t display-menu \ bind-key o display-menu \ find o "display-popup -E -w 100% \"~/.tmux/bin/fzf.zsh find '#{pane_current_path}'\"" \ + procs p "display-popup -E -w 100% -h 100% \"~/.tmux/bin/fzf.zsh procs '#{pane_current_path}'\"" \ git-files g "display-popup -E -w 100% \"~/.tmux/bin/fzf.zsh git-files '#{pane_current_path}'\"" \ git-branches b "display-popup -E -w 100% \"~/.tmux/bin/fzf.zsh git-branches '#{pane_current_path}'\"" \ git-commits c "display-popup -E -w 100% \"~/.tmux/bin/fzf.zsh git-commits '#{pane_current_path}'\"" diff --git a/tmux/.tmux/functions.zsh/tmux-fzf-procs b/tmux/.tmux/functions.zsh/tmux-fzf-procs new file mode 100644 index 0000000..8a77bdf --- /dev/null +++ b/tmux/.tmux/functions.zsh/tmux-fzf-procs @@ -0,0 +1,4 @@ +pgrep -l -f . | +fzf -m --no-sort --keep-right --delimiter " " \ + --preview="procstat -c {1} ; procstat -s {1} ; procstat -r {1} ; procstat -f {1}" | +perl -lane 'print $F[0]' -- 2.44.0