###--------------------------------------------------------------------------
### Random useful clients.
+start-clients-local () { :; }
+
start-clients () {
## Mail notification.
run bginit mail-notification
## Panel.
case $vnc in no) run bginit gnome-panel ;; esac
+
+ ## Local clients.
+ start-clients-local
}
###--------------------------------------------------------------------------
start-xterms () {
## Initialize some parameters.
- declare -i x="ecols * e_colwd + e_hextra"
+ declare -i x="ecols * e_colwd + e_hextra" xb=xbound
declare -i n=0 pgx=0 l h y ht
declare -i hstd="35 * t_lineht + t_vextra" hmin="25 * t_lineht + t_vextra"
while :; do
## Start a new iteration.
- if ((x + t_wd > xbound)); then
+ if ((x + t_wd > xb)); then
if ((n >= 3)); then break; fi
- x="pgx + XWIDTH" pgx="pgx + XWIDTH" xbound="xbound + XWIDTH"
+ x="pgx + XWIDTH" pgx="pgx + XWIDTH" xb="xb + XWIDTH"
fi
## Make large 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
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'" &
;;
###--------------------------------------------------------------------------
### Actually start things up.
+if [ -f $HOME/.xinitrc-local ]; then
+ . $HOME/.xinitrc-local
+fi
+
case "$start" in
yes)
info "starting standard clients"