calculate screen dimensions based on output from /dev/screen
This commit is contained in:
parent
dac3811c06
commit
f31a89ca87
|
@ -1,6 +1,5 @@
|
||||||
# This script uses wloc on the (maximised) refwin window to calculate
|
# This script uses information from /dev/screen to place windows where
|
||||||
# the screen size and produce the commands necessary to build the
|
# they should go. It should be invoked automatically by riostart-custom
|
||||||
# initial windows for my Plan9 session.
|
|
||||||
|
|
||||||
BEGIN {
|
BEGIN {
|
||||||
# constants
|
# constants
|
||||||
|
@ -15,10 +14,10 @@ BEGIN {
|
||||||
cascade_size = 50 # the amount of offset for a window cascade
|
cascade_size = 50 # the amount of offset for a window cascade
|
||||||
}
|
}
|
||||||
|
|
||||||
/ refwin$/ {
|
{
|
||||||
# calculate screen dimensions
|
# calculate screen dimensions
|
||||||
scr_width = $5
|
scr_width = $4
|
||||||
scr_height = $6
|
scr_height = $5
|
||||||
|
|
||||||
# status window
|
# status window
|
||||||
print "window -minx 0 -miny 0 -dx", stat_width, "-dy", stat_height, "stats -lmisce"
|
print "window -minx 0 -miny 0 -dx", stat_width, "-dy", stat_height, "stats -lmisce"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user