77 Commits

Author SHA1 Message Date
Don Stewart
0ada17c34a HEADS UP: (logging format change). use a custom pretty printer, for an easier format to parse, than 'show' produces 2007-06-09 13:17:16 +00:00
Don Stewart
d3632eb8fe whitespace only 2007-06-05 00:07:23 +00:00
Spencer Janssen
2a6d6d4ed7 -Wall police 2007-06-04 21:15:31 +00:00
l.mai
1c609288dd realign guard 2007-06-04 18:20:45 +00:00
Spencer Janssen
68a63688ad swapUp/Down are also mirrored 2007-06-04 18:35:35 +00:00
Spencer Janssen
6b8e9570c2 Remove redundant cases in swapUp/Down 2007-06-04 18:33:44 +00:00
Spencer Janssen
85e57cfa47 focusUp/Down are the same, in reversed order 2007-06-04 18:31:43 +00:00
Spencer Janssen
89a31eaf52 Simplify focusUp/Down 2007-06-04 18:22:28 +00:00
Spencer Janssen
fc70307325 Integral implies Eq 2007-06-04 18:07:45 +00:00
Spencer Janssen
f9110c999b Comment typo. 2007-06-04 18:05:54 +00:00
Spencer Janssen
1912feee50 Use the new integrate function 2007-06-04 06:26:53 +00:00
Spencer Janssen
cad36baa19 Add integrate 2007-06-04 06:25:01 +00:00
Don Stewart
777cf28bdf clean up mouse code a bit 2007-05-31 08:53:08 +00:00
Jason Creighton
3cb64d7461 first shot at a floating layer
This is a first attempting at a floating layer:

mod-button1: move window
mod-button2: swapMaster
mod-button3: resize window

mod-t: make floating window tiled again

Moving or resizing a window automatically makes it floating.

Known issues:

Hard to manage stacking order. You can promote a window to move it to the top,
(which you can do with mod-button2) but it should be easier than that.

Moving a window by dragging it to a different Xinerama screen does not move it
to that workspace.

Code is ugly.
2007-05-31 04:47:33 +00:00
Don Stewart
60f4f4e5e4 HEADS UP: change key binding for swapLeft/Right and IncMaster
The use of arrow keys for swapLeft/Right clash with firefox's back
button. Use the more intuitive mod-shift-jk for this. (It's a movement
operation, after all).

This clashes with IncMaster, so we use mod+comma and mod+period for
these (i.e. the keys mod < and mod > , to move windows to and from the
master area).

While we're here, replace the use of the terms 'left' and 'right' for
navigation, in comments and identifiers, with 'up' and 'down' instead.
Hence mod-j == focusDown. Far more intuitive for people (dons) who live
in fullscreen mode and have vim movement wired into their central
nervous system.

Principle of least VI surprise: movement down or up means using j and k.
2007-05-26 11:14:53 +00:00
Don Stewart
6346e11ff6 type sig for abort. 2007-05-26 06:14:50 +00:00
Neil Mitchell
a5aa4b1686 Add an abort function, called for deliberate and intentional errors 2007-05-23 23:32:12 +00:00
Rob
f8caf7f982 Deleting a window should not affect focus
This fixes a bug whereby deleting a window will first move focus to
that window before deleting it without moving focus back afterwards.

The fix generalises the remove inner function to delete a window from
the stack whether it's in focus or not. If the window is in focus,
behaviour remains as it was.
2007-05-25 02:41:18 +00:00
bobstopper
bcf305cd1e add swapLeft and swapRight 2007-05-22 05:00:08 +00:00
Spencer Janssen
127fd0b309 Read instance for StackSet 2007-05-21 18:45:04 +00:00
Don Stewart
b1345e037c modify 2007-05-21 11:57:50 +00:00
Don Stewart
ea80d2a71f Move xinerama current/visible/hidden workspace logic into StackSet directly. 2007-05-21 05:52:53 +00:00
Jason Creighton
5c44fa79fd focusWindow: always view the containing workspace first 2007-05-21 03:55:51 +00:00
Don Stewart
d28d4251e0 explicit export list for StackSet 2007-05-21 02:52:50 +00:00
Don Stewart
d3d058345d comment only 2007-05-20 09:08:46 +00:00
Don Stewart
77e46027ed HEADS UP: Rewrite StackSet as a Zipper
In order to give a better account of how focus and master interact, and
how each operation affects focus, we reimplement the StackSet type as a
two level nested 'Zipper'. To quote Oleg:

    A Zipper is essentially an `updateable' and yet pure functional
    cursor into a data structure. Zipper is also a delimited
    continuation reified as a data structure.

That is, we use the Zipper as a cursor which encodes the window which is
in focus. Thus our data structure tracks focus correctly by
construction! We then get simple, obvious semantics for e.g. insert, in
terms of how it affects focus/master. Our transient-messes-with-focus
bug evaporates. 'swap' becomes trivial.

By moving focus directly into the stackset, we can toss some QC
properties about focus handling: it is simply impossible now for focus
to go wrong. As a benefit, we get a dozen new QC properties for free,
governing how master and focus operate.

The encoding of focus in the data type also simplifies the focus
handling in Operations: several operations affecting focus are now
simply wrappers over StackSet.

For the full story, please read the StackSet module, and the QC
properties.

Finally, we save ~40 lines with the simplified logic in Operations.hs

For more info, see the blog post on the implementation,

    http://cgi.cse.unsw.edu.au/~dons/blog/2007/05/17#xmonad_part1b_zipper
2007-05-20 07:00:53 +00:00
Spencer Janssen
f9af744b1e Read is not needed for StackSet 2007-05-16 05:42:33 +00:00
David Roundy
54ee507cca keep focus stack. 2007-05-10 13:16:37 +00:00
Spencer Janssen
c5c958dc2c Remove unsafe fromJust 2007-05-08 16:38:22 +00:00
Neil Mitchell
97141b9a07 Work around the fact that Yhc gets defaulting a bit wrong 2007-05-08 12:49:49 +00:00
Spencer Janssen
a846eb18ff Remove unsafe use of head 2007-05-08 15:21:16 +00:00
Spencer Janssen
f03ca10714 Make 'index' return Nothing, rather than error 2007-05-08 15:12:00 +00:00
Spencer Janssen
ba9e15e772 Use 'drop 1' rather than tail, skip equality check. 2007-05-08 15:09:43 +00:00
Spencer Janssen
1276edc861 StackSet.view: ignore invalid indices 2007-05-08 14:39:51 +00:00
Neil Mitchell
27f1f50071 Change the swap function so its Haskell 98, by using list-comps instead of pattern-guards. 2007-05-08 12:31:58 +00:00
David Roundy
ab27c7d48d make quickcheck tests friendlier to read. 2007-05-05 17:54:15 +00:00
Spencer Janssen
bedc069143 Add -fglasgow-exts for pattern guards. Properties.hs doesn't complain anymore 2007-05-03 21:42:21 +00:00
Spencer Janssen
1dff21001c First steps to adding floating layer 2007-05-02 19:59:17 +00:00
Don Stewart
df7d1d95fa remove redundant call to 'delete' in 'shift' 2007-04-30 03:11:51 +00:00
Don Stewart
8265cae8a8 clean 'delete' a little 2007-04-30 02:53:19 +00:00
Don Stewart
a07f0778ad shrink 'swap' 2007-04-30 02:48:13 +00:00
Don Stewart
9fafa995c7 shrink 'rotate' a little 2007-04-30 02:45:25 +00:00
Don Stewart
966da43176 move size into Properties.hs 2007-04-30 02:17:58 +00:00
Don Stewart
a839238483 don't need 'size' operation on StackSet 2007-04-30 01:59:27 +00:00
Don Stewart
9b80a36cf8 move fromList into Properties.hs, -17 loc 2007-04-29 03:58:04 +00:00
Spencer Janssen
ea94892e1c Remove toList 2007-04-26 00:57:13 +00:00
Don Stewart
bf0f487ca4 add 8 new QC tests, including tests of the layout algorithm 2007-04-19 04:08:33 +00:00
Spencer Janssen
c858e0be4e Remove useless pragma 2007-04-19 01:52:39 +00:00
Don Stewart
b765cc9706 Parameterise StackSet by two index types, rather than breaking abstraction 2007-04-19 01:27:05 +00:00
Don Stewart
cf2c9f7328 tweak loc count to match count_lines script 2007-04-18 22:47:25 +00:00