Commit Graph

57 Commits

Author SHA1 Message Date
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
Don Stewart
f3f83af393 Promote now swaps focused window with master window
This means other windows are unaffected.
The change from the previous cycling behaviour was felt necessary, since
cycling isn't a terribly useful operation.

Some properties that hold:
    focus is unchanged by promotion
    promote is idempotent (promoting twice does nothing)
    the focused and master window will swap their positions in the stack
2007-04-18 22:42:36 +00:00
Don Stewart
48e4d5e283 test for xmonad in path first, before restarting 2007-04-16 02:55:41 +00:00
David Roundy
08ab2d994f fix typo. 2007-04-15 05:56:16 +00:00
Spencer Janssen
d8c7e69ae9 Ignore window entries while moving windows. This should fix all the focus preservation problems. 2007-04-13 08:37:02 +00:00
Don Stewart
a37193f2a6 add license headers to two missing files 2007-04-11 08:10:42 +00:00
Don Stewart
85a20da22c clean up tiling code a teensy bit, and comment on the interaction between focus, master, and cycling direction between the modes 2007-04-11 08:07:47 +00:00
Don Stewart
e9597b4899 Change semantics of 'promote'.
Previously 'promote' would move the currently focused window into the
master position in tiled mode. This was *almost* a cycle of the windows,
but not quite (depending on where the focus was, it was in fact a
cycle).

Now we do the obvious generalisation, and just cycle the current window
stack. Simpler to understand, simpler to reason about.
2007-04-11 07:34:56 +00:00
Don Stewart
c490333d12 Statically distinguish Workspace and Screen indices 2007-04-11 06:04:56 +00:00
Jason Creighton
b35bb69490 removed xinerama-enabled dmenu action
I don't think we're going to see any Xinerama support upstream, at least not
anytime soon. It doesn't make sense to ship something with xmonad that isn't
going to work out of the box. So for now Xinerama users should just use this
patch: http://www.jcreigh.com/xmonad/xinerama-dmenu.html
2007-04-11 02:47:16 +00:00
Spencer Janssen
be223c35f4 Move workspace fetching logic from Config.hs to Operations.hs 2007-04-10 06:47:14 +00:00
Jason Creighton
0c95f0c143 moved screen <-> workspace mapping from XMonad to StackSet 2007-04-10 06:27:31 +00:00
Spencer Janssen
384a30b7ae Remove redundant setFocus, setFocus is called by refresh which is called by windows 2007-04-05 21:58:32 +00:00
Don Stewart
24930dae04 -Wall police 2007-04-05 00:01:00 +00:00
Jason Creighton
0864672d54 take window borders into account when resizing (requires latest X11-extras) 2007-04-04 02:16:12 +00:00
Don Stewart
0ba47579c9 replace multiple gets with a single get and record bind 2007-04-04 01:05:24 +00:00
Spencer Janssen
3a592d2df8 Use Tall and Wide for split screen layouts. This should be less confusing. 2007-04-03 05:06:10 +00:00
Jason Creighton
3b36be5055 vertical (master area on top) tiling 2007-04-03 04:06:58 +00:00
Spencer Janssen
4a912c8613 Comment only. 2007-04-02 07:24:18 +00:00
Spencer Janssen
93be71bb88 Revert to the old layout code. 2007-04-02 04:51:14 +00:00
Alec Berryman
df4bda60ff Remove trailing spaces, no content changed 2007-04-01 14:45:39 +00:00
Jason Creighton
b22432a8b3 "dmenu" operation to spawn dmenu only on the current screen (for Xinerama)
This requires a dmenu that will accept -x and -w. Currently, This means
applying this patch: http://www.jcreigh.com/dmenu/position-options.patch (I'm
trying to see if I can get this into dmenu upstream; haven't heard anything
back yet.)
2007-04-01 01:27:12 +00:00
hughes
0bb46e09cb Cleaned up layout a little bit 2007-04-01 02:36:39 +00:00
Don Stewart
cf91d8aa53 restore dwm-style keybindings. mod-shift-{j,k} resize in vert mode 2007-04-01 02:54:33 +00:00
hughes
1909c353b7 Merged things together with dons changes. 2007-04-01 02:18:46 +00:00
hughes
10a0e21e00 Vertical/horizontal split, and resizability. 2007-04-01 01:47:06 +00:00
Don Stewart
93cf0950e8 formatting fixes. the style is getting a bit dodgy in some places... 2007-04-01 00:28:03 +00:00
Spencer Janssen
3303b4a101 Move safeFocus from Main to Operations 2007-03-31 01:00:24 +00:00
Jason Creighton
e743ef0c2d removed refocus; moved functionality to setFocus 2007-03-31 00:34:42 +00:00
Jason Creighton
207bd516e1 refactored "focus changed" code into "refocus" 2007-03-30 03:54:54 +00:00
Alec Berryman
a5e3f1daa0 Window borders
Colors taken from dwm's config.default.h and hard-coded in Operations instead
of Config because of import cycle.

Windows overlap slightly in the current tiling algorithm and sometimes prevent
the active window from being completely surrounded by a red border.
2007-03-29 18:21:59 +00:00