diff --git a/dotfiles/lib/bin/rofi_command.sh b/dotfiles/lib/bin/rofi_command.sh new file mode 100755 index 00000000..b5dc5a1a --- /dev/null +++ b/dotfiles/lib/bin/rofi_command.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +function get_all_commands { + IFS=: + for exec_path in $PATH; do + test -r "$exec_path" && \ + find "$exec_path" -maxdepth 1 -executable ! -type d -printf "%f\n" + done +} + +selected=$(get_all_commands | rofi -dmenu -i) +"$selected"