3 ms·
If you're on linux, rofi[1] is a very versatile fuzzy-search graphical application. One of the typical ways to use it is to invoke it in script mode (see man ro
by flylikeabanana 4y ago
If you're on linux, rofi[1] is a very versatile fuzzy-search graphical application. One of the typical ways to use it is to invoke it in script mode (see man rofi-script) with a shell script, where if called without arguments it invokes rofi against that script's stdout, and if called with arguments it runs a different command with that argument. This is nice because I don't have to switch to/open a new terminal or emacs, it's bound to a key I can invoke from anywhere in the graphical session. The kill process script is pretty simple (I filter out the path names from the nix store since I'm using nix)
if [[ -z "$@" ]]; then
echo -e "\0prompt\x1fKill Process"
ps -ax | awk '{$2 = "" ; $3 = ""; $4 = ""; print $0}' | tail -n +2 | sed 's/\/nix\/store\/[^\/]*//'
else
kill $1
fi
[1] https://github.com/davatorium/rofi https://github.com/davatorium/rofi
- tmtvl 4y agoRofi didn't work very well for me on Wayland, but there is a wlroots counterpart imaginatively named Wofi: https://cloudninja.pw/docs/wofi.html https://cloudninja.pw/docs/wofi.html
- flylikeabanana 4y agoThere's a patched fork of rofi that supports wayland that I'm actually using, but linked the upstream in my OP for general reference: https://github.com/lbonn/rofi#wayland-support https://github.com/lbonn/rofi#wayland-support