Fix dmenu_run
This commit is contained in:
parent
d3c91e81bd
commit
3c0a4e549f
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
config_file="$HOME/.config/dmenu/aliases"
|
||||
[[ -e "$config_file" ]] && source "$config_file"
|
||||
[ -e "$config_file" ] && source "$config_file"
|
||||
|
||||
cachedir="${XDG_CACHE_HOME:-"$HOME/.cache"}"
|
||||
cache="$cachedir/dmenu_run"
|
||||
|
14
dmenu_run
14
dmenu_run
@ -1,8 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
# dmenu_path | dmenu "$@" | ${SHELL:-"/bin/sh"} &
|
||||
|
||||
config_file="$HOME/.config/dmenu/aliases"
|
||||
cmd="$(dmenu_path | dmenu "$@")"
|
||||
|
||||
[[ -e "$config_file" ]] && flags="--rcfile $config_file"
|
||||
[ $? -ne 0 ] && exit 1
|
||||
|
||||
dmenu_path | dmenu "$@" | echo "unset HISTFILE; $(cat)" | /usr/bin/env bash $flags -i >/dev/null 2>&1
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user