2023-10-23 13:43:10 -04:00
|
|
|
# This script uses information from /dev/screen to place windows where
|
|
|
|
# they should go. It should be invoked automatically by riostart-custom
|
2023-10-16 22:21:05 -04:00
|
|
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2023-10-23 13:43:10 -04:00
|
|
|
{
|
2023-10-16 22:21:05 -04:00
|
|
|
# calculate screen dimensions
|
2023-10-23 13:43:10 -04:00
|
|
|
scr_width = $4
|
|
|
|
scr_height = $5
|
2023-10-16 22:21:05 -04:00
|
|
|
|
|
|
|
# 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"
|
|
|
|
}
|