Commit Graph

87 Commits

Author SHA1 Message Date
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
Jason Creighton
7a89f431b1 added mirrorLayout to mirror arbitrary layouts 2007-05-04 01:46:53 +00:00
Spencer Janssen
a5e0e2458d Fix layout switching order 2007-05-03 23:56:32 +00:00
Spencer Janssen
5b7c6c8631 Avoid the unsafe pattern match, in case Config.hs has no layouts 2007-05-03 21:40:07 +00:00
David Roundy
ea1134db26 add support for extensible layouts. 2007-05-03 14:47:50 +00:00
Don Stewart
f0df95da72 comments. and stop tracing events to stderr 2007-05-03 07:58:21 +00:00
Spencer Janssen
3586379ecc Make border width configurable 2007-04-30 16:35:15 +00:00
Spencer Janssen
08e514b28f Add Config.hs-boot, remove defaultLayoutDesc from XConf 2007-04-30 16:26:47 +00:00
Spencer Janssen
5d086df912 Add XConf for values that don't change. 2007-04-30 05:47:15 +00:00
Spencer Janssen
5c1982cc35 Control.Arrow is suspicious, add an explicit import 2007-04-30 05:36:23 +00:00
Jason Creighton
bdbca84bcd configurable border colors
This also fixes a bug where xmonad was assuming a 24-bit display, and just
using, eg, 0xff0000 as an index into a colormap without querying the X server
to determine the proper pixel value for "red".
2007-04-30 04:38:59 +00:00
Jason Creighton
2a5be03dd1 force window border to 1px 2007-04-23 05:08:24 +00:00
Jason Creighton
0d47f6299f use prefixed record names in latest X11-extras 2007-04-19 03:22:44 +00:00
Spencer Janssen
2b6a5d25b6 WindowSet is better than WorkSpace 2007-04-19 01:54:30 +00:00
Don Stewart
b765cc9706 Parameterise StackSet by two index types, rather than breaking abstraction 2007-04-19 01:27:05 +00:00