summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
6c3d0b2)
This requires a very shiny version of xscsize.
## Obtain the screen dimensions.
case ",$XWIDTH,$XHEIGHT," in
## Obtain the screen dimensions.
case ",$XWIDTH,$XHEIGHT," in
- *,,*) eval $(xscsize -bx) ;;
+ *,,*) eval $(xscsize -bx; xscsize -bmx) ;;
-info "screen size = $XWIDTH x $XHEIGHT"
+case ",$XNSCR," in
+ ,,)
+ XNSCR=1 XSCR0_X=0 XSCR0_Y=0 XSCR0_WIDTH=$XWIDTH XSCR0_HEIGHT=XHEIGHT
+ ;;
+esac
+i=0; while (( i < XNSCR )); do
+ eval "x=\$XSCR${i}_X y=\$XSCR${i}_Y
+ wd=\$XSCR${i}_WIDTH ht=\$XSCR${i}_HEIGHT"
+ info "screen #$i = ${wd}x${ht}+${x}+${y}"
+ i=$(( i + 1 ))
+done
initialize () {
## Load the X resource database.
initialize () {
## Load the X resource database.
## and the toolbar, so we add on some rows which are later mysteriously
## subtracted.
## and the toolbar, so we add on some rows which are later mysteriously
## subtracted.
-declare -i ecols="(xbound - t_wd - e_hextra)/e_colwd"
-if (( ecols < 2 && xbound > e_colwd * 2 + e_hextra )); then
- ecols=2
-elif (( ecols < 1 )); then
- ecols=1
+declare -i lim=XSCR0_WIDTH
+if (( lim > xbound )); then lim=xbound; fi
+declare -i ecols="(lim - t_wd - e_hextra)/e_colwd"
+if (( ecols < 2 && lim > 2*e_colwd + e_hextra )); then ecols=2
+elif (( ecols < 1 )); then ecols=1
- emacsx="ecols * e_colchars + e_cextra" \
+ emacsx="ecols*e_colchars + e_cextra" \
emacsy="(XHEIGHT - e_vextra)/e_lineht"
start-emacs () {
emacsy="(XHEIGHT - e_vextra)/e_lineht"
start-emacs () {
start-xterms () {
## Initialize some parameters.
start-xterms () {
## Initialize some parameters.
- 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"
+ declare -i x="ecols*e_colwd + e_hextra" xb=xbound
+ declare -i n=0 pgx=0 l h y ht scr=0 ll=lim
+ declare -i hstd="35*t_lineht + t_vextra" hmin="25*t_lineht + t_vextra"
+ declare -i scrx scry scrwd scrht
+
+ eval "scrx=\$XSCR${scr}_X scry=\$XSCR${scr}_Y
+ scrwd=\$XSCR${scr}_WIDTH scrht=\$XSCR${scr}_HEIGHT"
## Do the placement.
while :; do
## Start a new iteration.
## Do the placement.
while :; do
## Start a new iteration.
- if ((x + t_wd > xb)); then
- if ((n >= 3)); then break; fi
- x="pgx + XWIDTH" pgx="pgx + XWIDTH" xb="xb + XWIDTH"
+ if ((x + t_wd > ll)); then
+ scr=$(( scr + 1 ))
+ if (( scr >= XNSCR )); then
+ if (( n >= 3 )); then break; fi
+ pgx=$(( pgx + XWIDTH )) xb=$(( xb + XWIDTH ))
+ scr=0
+ fi
+ eval "scrx=\$XSCR${scr}_X scry=\$XSCR${scr}_Y
+ scrwd=\$XSCR${scr}_WIDTH scrht=\$XSCR${scr}_HEIGHT"
+ x=$(( pgx + scrx ))
+ ll=$(( x + scrwd ))
+ if (( ll > xb )); then ll=xb; fi
while ((ht - hstd >= hmin)); do
run bgclients $term $geom 80x35+$x+$y
y="y + hstd" ht="ht - hstd" n="n + 1"
while ((ht - hstd >= hmin)); do
run bgclients $term $geom 80x35+$x+$y
y="y + hstd" ht="ht - hstd" n="n + 1"