initial commit
This commit is contained in:
commit
dac3811c06
|
@ -0,0 +1,49 @@
|
|||
# This script uses wloc on the (maximised) refwin window to calculate
|
||||
# the screen size and produce the commands necessary to build the
|
||||
# initial windows for my Plan9 session.
|
||||
|
||||
BEGIN {
|
||||
# constants
|
||||
stat_width = 235
|
||||
stat_height = 176
|
||||
cat_width = 150
|
||||
cat_height = 300
|
||||
term_width = 903
|
||||
term_height = 612
|
||||
com_height = 300
|
||||
acme_overlap = 100 # how much acme should overlap com
|
||||
cascade_size = 50 # the amount of offset for a window cascade
|
||||
}
|
||||
|
||||
/ refwin$/ {
|
||||
# calculate screen dimensions
|
||||
scr_width = $5
|
||||
scr_height = $6
|
||||
|
||||
# status window
|
||||
print "window -minx 0 -miny 0 -dx", stat_width, "-dy", stat_height, "stats -lmisce"
|
||||
|
||||
# cat clock
|
||||
cat_x = scr_width - cat_width
|
||||
print "window -minx", cat_x, "-miny 0 -dx", cat_width, "-dy", cat_height, "games/catclock"
|
||||
|
||||
# acme editor
|
||||
acme_x = stat_width
|
||||
acme_width = scr_width - stat_width - cat_width
|
||||
acme_height = scr_height - com_height + acme_overlap
|
||||
print "window -minx", acme_x, "-miny 0 -dx", acme_width, "-dy", acme_height, "acme -a"
|
||||
|
||||
# terminal window
|
||||
term_y = stat_height
|
||||
print "window -minx 0 -miny", term_y, "-dx", term_width, "-maxy", scr_height, "termwin"
|
||||
|
||||
# commode chat
|
||||
com_x = term_width
|
||||
com_y = scr_height - com_height
|
||||
print "window -minx", com_x, "-miny", com_y, "-maxx", scr_width, "-maxy", scr_height, "-scroll comwin"
|
||||
|
||||
# original terminal
|
||||
orig_x = cascade_size
|
||||
orig_y = stat_height + cascade_size
|
||||
print "window -minx", orig_x, "-miny", orig_y, "-dx", term_width, "-dy", term_height, "-hide /usr/sdf/lib/9legacy/first.window"
|
||||
}
|
Loading…
Reference in New Issue
Block a user