From f31a89ca87c3c1ed1853209e1ba09237ccefc876 Mon Sep 17 00:00:00 2001 From: jlamothe Date: Mon, 23 Oct 2023 17:43:10 +0000 Subject: [PATCH] calculate screen dimensions based on output from /dev/screen --- build-windows.awk | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/build-windows.awk b/build-windows.awk index 2d1f635..90ecd38 100644 --- a/build-windows.awk +++ b/build-windows.awk @@ -1,6 +1,5 @@ -# 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. +# This script uses information from /dev/screen to place windows where +# they should go. It should be invoked automatically by riostart-custom BEGIN { # constants @@ -15,10 +14,10 @@ BEGIN { cascade_size = 50 # the amount of offset for a window cascade } -/ refwin$/ { +{ # calculate screen dimensions - scr_width = $5 - scr_height = $6 + scr_width = $4 + scr_height = $5 # status window print "window -minx 0 -miny 0 -dx", stat_width, "-dy", stat_height, "stats -lmisce"