Commit Graph

101 Commits

Author SHA1 Message Date
Don Stewart
0226ba3441 Polish core layout code. Lifts limitation on nmaster > 1. it may be 0 now 2007-06-03 06:43:06 +00:00
Don Stewart
84f22f7102 heads up: polish config.hs. moves tiling-local values into lexical scope. removes wide' as an explicit mode (it's mirror tall') 2007-06-03 05:47:40 +00:00
Jason Creighton
a6098f6010 only grab button{1,2,3} for click-to-focus (scrollwheel shouldn't focus) 2007-06-02 05:26:05 +00:00
Jason Creighton
72a50ead89 make mouse bindings configurable 2007-06-02 04:06:47 +00:00
Don Stewart
0be589ae8c commented out implementation state logging. if someone has a client, we can enable this 2007-06-01 08:56:26 +00:00
Jason Creighton
b46a449baf ignore numlock/capslock on mouse bindings 2007-06-01 01:51:37 +00:00
Don Stewart
9669c26fdc now we handle transients properly, and restack windows, refresh from focus is ok 2007-06-01 02:23:29 +00:00
glasser
ddffd109ce Rename withWorkspace to withWindowSet. 2007-06-01 00:13:25 +00:00
Don Stewart
7246a9e2d2 comments on why fullscreen tiling doesn't work with `implicit' floating 2007-05-31 09:05:37 +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
46b04b3fa5 forgot to set focus in 'focus'. this restores the old behaviour 2007-05-28 13:45:47 +00:00
Don Stewart
0b8c9c407e don't refresh on focus events
leads to a race. this will affect how gaps are redrawn when moving to a
new screen with the mouse.
2007-05-28 13:31:27 +00:00
Don Stewart
abdbc23551 apply gap to each screen 2007-05-28 04:47:22 +00:00
Don Stewart
0cca848c54 be sure to reset the gap list on rescreen 2007-05-28 03:18:35 +00:00
Don Stewart
c613073cb6 support per-screen gap settings. you can have different gaps on individual screens now 2007-05-28 03:15:01 +00:00
Don Stewart
1d2c5ca35a Use (Int,Int,Int,Int) for arbitrary gaps on any side of the screen 2007-05-28 02:51:35 +00:00
Don Stewart
c7655df3cb refactor only 2007-05-27 15:43:53 +00:00
Don Stewart
25616c3b9f comments on alternative gap movement policies 2007-05-27 15:32:11 +00:00
Don Stewart
d16d751207 when focus is called from an event, better refresh too, since it might have switched workspaces (so gap follows screen focus) 2007-05-27 15:19:42 +00:00
Don Stewart
2231879268 only set gap on current physical screen 2007-05-27 15:08:05 +00:00
Don Stewart
77f59efcc6 revert raiseWindow in focus. Leads to some funny races with pop ups. Harmless with status bar support now 2007-05-27 13:45:05 +00:00
Don Stewart
bb4bd97c87 mod-b, toggle on or off the status bar gap 2007-05-27 12:59:28 +00:00
Don Stewart
a64c9f1856 Add new config value, defaultMenuGap, for specifying a gap for a status bar
By default, it is 0 (set in Config.hs), but set this to a pixel count to
get a permanent gap at the top of the screen. You can then at startup
launch dzen, and it will run in this gap, and not be obscured by other
windows.

Perfect for a persistant status bar.
2007-05-27 12:27:02 +00:00
Don Stewart
e5e4b46ffa raiseWindow when settings focus. The focused window should always be raised, I think 2007-05-27 09:41:05 +00:00
Don Stewart
7be0a2103d Be a bit more conservative with -O flags, and GC. Hope to avoid runtime GC bug 2007-05-27 07:44:38 +00:00
Don Stewart
ee2c2c311b refactor code smell in Operation.hs 2007-05-27 07:21:35 +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
bobstopper
bcf305cd1e add swapLeft and swapRight 2007-05-22 05:00:08 +00:00
Spencer Janssen
865939b660 Wibble 2007-05-22 04:38:44 +00:00
Spencer Janssen
07a354e5a3 Add preliminary randr support 2007-05-22 04:02:28 +00:00
Spencer Janssen
e300df5425 Remove the magic '2' 2007-05-21 23:45:35 +00:00
Spencer Janssen
ff975f6d40 Move special case 'view' code into 'windows'.
This is ugly right now -- I promise to clean it up later.
2007-05-21 21:56:46 +00:00
Spencer Janssen
c8cfc1faca Remove redundant fromIntegrals 2007-05-21 16:51:23 +00:00
Spencer Janssen
b59d4d1dc0 Make screen info dynamic: first step to supporting randr 2007-05-21 15:27:59 +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
02073c547b s/workspace/windowset/ 2007-05-21 04:03:30 +00:00
Jason Creighton
b757a526db only hide old workspace on view if the old workspace is not visible (Xinerama) 2007-05-21 03:14:35 +00:00
Spencer Janssen
2e5084319a Be explicit about suspicious System.Mem import 2007-05-20 16:57:41 +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
Jason Creighton
4206c4bae9 variable number of windows in master area 2007-05-16 03:14:37 +00:00
Spencer Janssen
810c19d7f2 Use camelCase, please. 2007-05-16 01:44:54 +00:00
David Roundy
3cc55de0f4 beautify tile 2007-05-15 15:40:11 +00:00
David Roundy
21cbab3f06 put doLayout in the X monad. 2007-05-12 21:53:01 +00:00
Spencer Janssen
f03ca10714 Make 'index' return Nothing, rather than error 2007-05-08 15:12:00 +00:00
Spencer Janssen
70fe61971b Redundant parens 2007-05-08 15:04:12 +00:00
Don Stewart
7a56422491 since we just ignore type errors, no need to derive Show 2007-05-04 09:41:43 +00:00
Don Stewart
0928bb484a Constrain layout messages to be members of a Message class
Using Typeables as the only constraint on layout messages is a bit
scary, as a user can send arbitrary values to layoutMsg, whether they
make sense or not: there's basically no type feedback on the values you
supply to layoutMsg.

Folloing Simon Marlow's dynamically extensible exceptions paper, we use
an existential type, and a Message type class, to constrain valid
arguments to layoutMsg to be valid members of Message.

That is, a user writes some data type for messages their layout
algorithm accepts:

  data MyLayoutEvent = Zoom
                     | Explode
                     | Flaming3DGlassEffect
                     deriving (Typeable)

and they then add this to the set of valid message types:

  instance Message MyLayoutEvent

Done. We also reimplement the dynamic type check while we're here, to
just directly use 'cast', rather than expose a raw fromDynamic/toDyn.

With this, I'm much happier about out dynamically extensible layout
event subsystem.
2007-05-04 08:16:49 +00:00
Spencer Janssen
72e7bed426 Handle empty layout lists 2007-05-04 04:56:44 +00:00
Don Stewart
d0ef78e5c3 refactoring, style, comments on new layout code 2007-05-04 02:36:18 +00:00