dmenu_run 290 B

123456789101112131415
  1. #!/usr/bin/env bash
  2. cmd="$(dmenu_path | dmenu "$@")"
  3. [ $? -ne 0 ] && exit 1
  4. config_file="${XDG_CONFIG_HOME:-"${HOME}/.config"}/dmenu/aliases"
  5. [ -f "$config_file" ] && source_cmd="source '$config_file'"
  6. exec bash <<EOF
  7. shopt -s expand_aliases
  8. $source_cmd
  9. alias exec='exec '
  10. exec $cmd
  11. EOF