You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
|
|
|
|
while :; do
|
|
|
|
case "$1" in
|
|
|
|
-h|--help)
|
|
|
|
LESS=-FEXR less <<HELP
|
|
|
|
fztop SEARCH
|
|
|
|
|
|
|
|
USAGE:
|
|
|
|
at runtime a the following keybinds are available:
|
|
|
|
|
|
|
|
ctrl-x
|
|
|
|
will send SIGTERM to the selected process
|
|
|
|
F9
|
|
|
|
will send SIGKILL to the selected process
|
|
|
|
HELP
|
|
|
|
exit ;;
|
|
|
|
*) break
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
exec fzf \
|
|
|
|
--reverse \
|
|
|
|
--header-lines=1 \
|
|
|
|
--query="!fzf $*" \
|
|
|
|
--preview='echo {}' \
|
|
|
|
--preview-window=down:4:wrap \
|
|
|
|
--bind='change:reload:ps xjf' \
|
|
|
|
--bind='ctrl-r:reload:ps xjf' \
|
|
|
|
--bind='ctrl-x:execute(kill {2})+reload(ps xjf)' \
|
|
|
|
--bind='F9:execute:(kill -9 {2})+reload(ps xjf)' < <(ps xjf)
|