Re: Maximizing windows, resizing windows, placement
- From: D M German <dmg uvic ca>
- To: General discussion about sawfish wm <sawfish-list gnome org>
- Subject: Re: Maximizing windows, resizing windows, placement
- Date: Thu, 28 Apr 2011 08:57:24 -0700
Jan Kasprzak twisted the bytes to say:
Jan> Hello, all!
Jan> I have the following problems, and I wonder whether I can solve them wihtout
Jan> programming in LISP :-)
Jan> 1. maximizing windows
Jan> =====================
Jan> I want to have hot-keys for maximizing windows horizontally, vertically,
Jan> and horizontally+vertically. Currently I use
Jan> Super+V for maximize-widow-vertically-toggle
Jan> Super+H for maximize-widow-horizontally-toggle
Jan> Super+M for maximize-widow-toggle
This will give you an idea. This function is used when I rotate the
screen, and the window has been maximized but it is now outside the screen.
By checking the current maximization, you can easily write your own
function that toggles in the order you want.
--dmg
----------------------------------------------------------------------
(defun dmg-remaximize-window (w )
"remaximize the given window"
(interactive "%W")
(let* (
(m (window-maximized-p w))
(h (window-maximized-horizontally-p w))
(v (window-maximized-vertically-p w))
)
(if (and m)
(progn
(unmaximize-window w)
(dmg-move-window-inside w)
(cond
((and v h)
(maximize-window w)
) ; and v h
((and v)
(maximize-window-vertically w)
) ; and v
(maximize-window-horizontally w)
)
) ; end cond
) ; end progn
(progn
(dmg-move-window-inside w)
)
) ; end let
)
Jan> This works _almost_ as I expect, except when the window is already maximized
Jan> in other direction than the requested one: I would like the window to become
Jan> maximized in and only in the requested direction in all cases,
Jan> _except_ when it is already maximized in and only in the requested direction
Jan> (it should become un-maximized then).
Jan> For example, when I do maximize-window-toggle on a vertically maximized window,
Jan> I expect it to become maximized to the whole screen. Instead, it becomes
Jan> un-maximized. Similarily, when I do maximize-window-vertically-toggle on
Jan> a fully maximized window, it becomes maximized horizontally, while I expect it
Jan> to be maximized vertically.
Jan> 2. resizing windows interactively
Jan> =================================
Jan> I would like to modify the resize-window-interactively to start resizing
Jan> window only after the cursor reaches the window border (the same way as
Jan> e.g. twm works). Currently sawfish starts resizing the window as soon as
Jan> I move the cursor.
Jan> 3. window placement
Jan> ===================
Jan> I use first-fit window placement method.
Jan> When I have a full-screen application running, I want the new window to be
Jan> placed near the cursor instead of top-left position. The rationale is,
Jan> that when working in a full-screen app, I sometimes need to open
Jan> a chat window for an incoming jabber message. My jabber client has its icon
Jan> in a bottom-edge panel, and after clicking on it, I have to traverse the whole
Jan> screen size to the top-left corner, where the new window is opened.
Jan> Thanks,
Jan> -Yenya
Jan> --
Jan> | Jan "Yenya" Kasprzak <kas at {fi.muni.cz - work | yenya.net - private}> |
Jan> | GPG: ID 1024/D3498839 Fingerprint 0D99A7FB206605D7 8B35FCDE05B18A5E |
Jan> | http://www.fi.muni.cz/~kas/ Journal: http://www.fi.muni.cz/~kas/blog/ |
Jan> Please don't top post and in particular don't attach entire digests to your
Jan> mail or we'll all soon be using bittorrent to read the list. --Alan Cox
--
--
Daniel M. German
http://turingmachine.org/
http://silvernegative.com/
dmg (at) uvic (dot) ca
replace (at) with @ and (dot) with .
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]