## Terminal window measurements.
case "$term" in
- pterm) t_wd=503 t_lineht=13 t_vextra=23 geom=-geometry;;
+ pterm) t_wd=504 t_lineht=13 t_vextra=23 geom=-geometry;;
Eterm) t_wd=504 t_lineht=13 t_vextra=23 geom=-g;;
xterm) t_wd=507 t_lineht=13 t_vextra=27 geom=-geometry;;
esac
}
###--------------------------------------------------------------------------
+### Requesters.
+
+req () {
+ declare title=$1 hist=$2; shift 2
+ cmd=$(xgetline -t "$title" -p "Command:" -Hl "$HOME/$hist") &&
+ exec "$@" "$cmd"
+}
+
+###--------------------------------------------------------------------------
### Final waiting.
atom=XINIT_COMMAND$atomtag
xmsg -I -t "xinitrc help" -d "xinitrc commands" - <<EOF &
:help
:emacs :xterms :window-manager :clients
+:ask-run :ask-command
:init
:terminal
! SHELL-COMMAND
info "restarting xinitrc"
exec "$0" wait nostart
;;
+ :ask-run)
+ req "Shell command" .cmd.hist xcatch -FMiscFixed6x13 -- sh -c&
+ ;;
+ :ask-command)
+ req "xinit command" .xinit.hist xatom set XINIT_COMMAND$atomtag&
+ ;;
:*)
xmsg -E -t "xinitrc error" "Unknown command \`$line'" &
;;