]> Sergey Matveev's repositories - dotfiles.git/commitdiff
Fuzzy process finding
authorSergey Matveev <stargrave@stargrave.org>
Thu, 31 Mar 2022 14:10:51 +0000 (17:10 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Thu, 31 Mar 2022 14:10:51 +0000 (17:10 +0300)
tmux/.tmux.conf
tmux/.tmux/functions.zsh/tmux-fzf-procs [new file with mode: 0644]

index ed4e3ed9cab15261d7d11cdce7814061ae09f5c6..4d2d2383a66f2408b3776d4a3624363c638d237b 100644 (file)
@@ -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 (file)
index 0000000..8a77bdf
--- /dev/null
@@ -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]'