Re: How can I start urxvt as fullscreen ?

Christopher Roy Bratusek <zanghar freenet de> writes:

> I added both to sawfish (with options in sawfish-ui of
> course), what about writing two more: new-viewport and
> fullscreen-xinerama? ;)

Sure; glad I can help.  :)

I don't use xinerama so I can't test it, but fullscreen-xinerama seems
straightforward -- just a matter of adding it to after-add-window in
maximize.jl.  So:

(define-match-window-setter 'fullscreen-xinerama
  (lambda (w prop value)
    (declare (unused prop))
    (when value
      (window-put w 'queued-fullxinerama-maximize t))))

And here's a diff on maximize.jl:

diff --git a/lisp/sawfish/wm/state/maximize.jl b/lisp/sawfish/wm/state/maximize.jl
index 394abcf..069b05b 100644
--- a/lisp/sawfish/wm/state/maximize.jl
+++ b/lisp/sawfish/wm/state/maximize.jl
@@ -554,19 +554,26 @@ unmaximized."
   (define (after-add-window w)
     (let ((vert (window-get w 'queued-vertical-maximize))
          (horiz (window-get w 'queued-horizontal-maximize))
-         (full (window-get w 'queued-fullscreen-maximize)))
-      (when (or vert horiz full)
+         (full (window-get w 'queued-fullscreen-maximize))
+         (fullxinerama (window-get w 'queued-fullxinerama-maximize)))
+      (when (or vert horiz full fullxinerama)
        (when vert
          (window-put w 'queued-vertical-maximize nil))
        (when horiz
          (window-put w 'queued-horizontal-maximize nil))
        (when full
          (window-put w 'queued-fullscreen-maximize nil))
-       (if full
-           (maximize-window-fullscreen w t)
+        (when fullxinerama
+          (window-put w 'queued-fullxinerama-maximize nil))
+       (cond
+        (full
+         (maximize-window-fullscreen w t))
+        (fullxinerama
+         (maximize-window-fullxinerama w t))
+        (t
          (maximize-window w (cond ((and vert horiz) nil)
                                   (vert 'vertical)
-                                  (horiz 'horizontal)))))))
+                                  (horiz 'horizontal))))))))
   (add-hook 'after-add-window-hook after-add-window)

But I'm not sure how to do the new-viewport one because I'm not sure how
to check to see if a given viewport is empty.  I may be missing the
proper way to do it, but the closest I've seen to get that info would be
the window-order function.  The problem is that that would involve
switching viewports to each viewport to check, which seems excessive. ;)
Perhaps I could brute-force it by cycling through all windows and
checking their dimensions and location, but if that info is more
available on the C side of things a new function for that might be

Another question here would be what to do if there is no empty viewport
in the current workspace.  Settle on the current (non-empty) viewport,
or switch to a new workspace?  My hunch is the former, but I'm not sure
if that would match what folks would expect.

Jeremy Hankins <nowan nowan org>
PGP fingerprint: 748F 4D16 538E 75D6 8333  9E10 D212 B5ED 37D0 0A03

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]