xinitrc: Update pterm width.
[profile] / xinitrc
diff --git a/xinitrc b/xinitrc
index 1d3a83c..1eed5ba 100755 (executable)
--- a/xinitrc
+++ b/xinitrc
@@ -163,7 +163,7 @@ esac
 
 ## 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
@@ -242,6 +242,15 @@ start-xterms () {
 }
 
 ###--------------------------------------------------------------------------
+### 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
@@ -258,6 +267,7 @@ xwait () {
        xmsg -I -t "xinitrc help" -d "xinitrc commands" - <<EOF &
 :help
 :emacs :xterms :window-manager :clients
+:ask-run :ask-command
 :init
 :terminal
 ! SHELL-COMMAND
@@ -277,6 +287,12 @@ EOF
        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'" &
        ;;