X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/8e08f81479e23b3450c872432545290b3b2cd7f9..4b1d5c25be95f829cce99d3c7986f698fa180fc7:/xinitrc diff --git a/xinitrc b/xinitrc index 60a11e6..1de812b 100755 --- a/xinitrc +++ b/xinitrc @@ -91,6 +91,9 @@ initialize () { run init xset r rate 500 50 run init xset m 2 1 + ## Key mappings. + xmodmap -e 'keysym BackSpace = BackSpace BackSpace' + ## Gnome settings. case $vnc in no) run bginit gnome-settings-daemon ;; esac } @@ -113,6 +116,8 @@ start-window-manager () { ###-------------------------------------------------------------------------- ### Random useful clients. +start-clients-local () { :; } + start-clients () { ## Mail notification. run bginit mail-notification @@ -130,6 +135,9 @@ start-clients () { ## Panel. case $vnc in no) run bginit gnome-panel ;; esac + + ## Local clients. + start-clients-local } ###-------------------------------------------------------------------------- @@ -200,7 +208,7 @@ start-emacs () { 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" @@ -208,9 +216,9 @@ start-xterms () { 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. @@ -234,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 @@ -250,6 +267,7 @@ xwait () { xmsg -I -t "xinitrc help" -d "xinitrc commands" - <