dmenu/dmenu_run

15 lines
290 B
Plaintext
Raw Normal View History

#!/usr/bin/env bash
2022-08-28 03:11:10 -07:00
2023-09-02 23:08:54 -07:00
cmd="$(dmenu_path | dmenu "$@")"
2022-08-28 03:11:10 -07:00
2023-09-02 23:08:54 -07:00
[ $? -ne 0 ] && exit 1
2022-08-28 03:11:10 -07:00
2023-09-02 23:08:54 -07:00
config_file="${XDG_CONFIG_HOME:-"${HOME}/.config"}/dmenu/aliases"
[ -f "$config_file" ] && source_cmd="source '$config_file'"
exec bash <<EOF
shopt -s expand_aliases
$source_cmd
alias exec='exec '
exec $cmd
EOF