[Top][All Lists]

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

Re: EWMH package, please review.

From: Miles Bader
Subject: Re: EWMH package, please review.
Date: Sun, 12 Oct 2003 18:54:59 -0400
User-agent: Mutt/1.3.28i

On Mon, Oct 13, 2003 at 12:17:35AM +0200, Kim F. Storm wrote:
> Maybe in general, the functions should be named
>         x-ewmh-toggle-...
> to emphasize that their default operation is to toggle the hint.

If they _only_ toggle, they could be called `...toggle...', but it seems
wrong to call them that if they just usually toggle.

In general the set and naming of functions seems kind of clumsy; how about
having just a single `x-ewmh-maximize' that can do both horizontal and
vertical maximization based on an optional argument?  Interactively, I'd
like something like:

   just    `M-x x-ewmh-maximize' toggles (full screen) maximization
   C-u     `M-x x-ewmh-maximize' toggles vertical maximization
   C-u C-u `M-x x-ewmh-maximize' toggles horizontal maximization
   C-u -1  `M-x x-ewmh-maximize' un-maximizes
   C-u 1   `M-x x-ewmh-maximize' (full screen) maximizes

[Of course normally you'd bind it to a key.  I chose vertical maximization
for the single-C-u because I find myself doing that _far_ more often than
horizontal maximization.]

Implementation-wise, this would probably be something like:

(defun x-emwh-maximize (arg &optional axis frame)
   "... ARG nil, toggle, ARG < 0, un-maximize, ARG > 0, maximize ...
   If AXIS is `horizontal', maximiaze horizontally, if `vertical',
   maximiaze vertically, otherwise, both. ..."
    (cond ((equal current-prefix-arg '(4)) '(nil vertical))
          ((equal current-prefix-arg '(16)) '(nil horizontal))
          (t (list (prefix-numeric-value current-prefix-arg)))))

That seems simpler and more convenient for both users and for programs.

Freedom's just another word, for nothing left to lose   --Janis Joplin

reply via email to

[Prev in Thread] Current Thread [Next in Thread]