* All the backwards-compatibility functions now accept `Int` rather than
`Integer`: `spacing`, `spacingWithEdge`, `smartSpacing`,
`smartSpacingWithEdge`, `setSpacing`, and `incSpacing`. Work done by
@LSLeary.
* Introduce the new functions `setScreenWindowSpacing`,
`incScreenWindowSpacing`, `decScreenWindowSpacing`. Unlike their
original `setSpacing`, `incSpacing` counterparts, these refresh no
more than once. Requires `sendMessages` from my PR of
`XMonad.Actions.MessageFeedback`. Suggestion by @LSLeary and
implemented so any combination of messages can be sent without
triggering unnecessary refreshes.
The layout now maintains a list of windows that never have borders, and
a list of windows that always have borders. Use 'BorderMessage' to
manage these lists and the accompanying event hook ('borderEventHook')
to remove destroyed windows from them. Also provides the 'hasBorder'
manage hook.
Two new conditions have been added to 'Ambiguity': 'OnlyLayoutFloat' and
'OnlyLayoutFloatBelow'; 'OnlyFloat' was renamed to 'OnlyScreenFloat'.
See the documentation for more information.
There's no reason to return a rectangle for any window that is totally
obscured by a full-screen window, and not doing so has the nice property that
when hidden windows' borders overlap with a full-screen window's, the user
will not be confused by overlapping partially-drawn borders. It also makes the
Fullscreen modifiers combine much better with smartBorders.
Both screen and window borders can now be disabled. Implement missing
messages. The layout now handles windows that are displayed but not part
of the stack, such as those created by 'XMonad.Layout.Decoration'.
Several additional fixes.
The 'smartBorder' now depends on the window/rectangle list resulting
from 'runLayout' rather than the stack, which means that the child
layout will always be called with the screen border. If only a single
window is displayed, it will be expanded into the original layout
rectangle.
The `group3` addition I made in a previous commit enabled one to go so
far, but then quickly hit some walls due to non-exported symbols from
`XMonad.Layout.Groups`.
This commit removes `group3`, as it would hardly be useful to anybody,
and introduces a new `ModifyX` message that allows the modifying
function to return a `Groups` layout inside the `X` monad. Here's an
example on why this is useful:
Say you have a master layout with tabbed sub-layouts, and you have
terminal windows sprinkled around these sub-layouts. You now want to
gather all of them into a single tabbed sub-layout, effectively
implementing a "tabbed terminal" (or browser, or editor, etc). With
functionality like this, `XMonad` can become a unified multi-window
application manager: one does not need tabbed browsers, terminals,
etc.
In order for this to be possible, however, the modifier function needs
to be able to query for things like the window class name with
`runQuery`, and that in turn means it has to operate inside the `X`
monad. This is only possible if `Groups` accepts the modifier
introduced in this commit.
I bet many other uses for a `ModifierX` message can be found. I have
the functionality of the example I gave implemented and working with
this change, since it was my motivation to get it done (and I must say
it is quite sweet to have tabbed window unification).
This is similar to 'Column' layout with some differences.
- Add/remove windows keeps window bounds.
- Enforce minimum window size.
- Negative scale can be used to increase the size of the last window
instead of the master window.
This is as per the work done in
http://lynnard.me/blog/2013/12/30/more-xmonad-goodies/, where the
functionality is explained in detail.
This also fixes#214. The original suggestion in that bug report is
not enough. Even if we export `gen` and `Uniq`, we would still have to
export the `Groups` type constructor. I thought it better to simply
allow the user to create a three-dimensional group instead.
These layout have different applications but their names could cause some
confusion since the module names could just as well be swapped. To support this claim,
what we call "spacing" is named "gaps" in i3wm (i3-gaps). Therefore hyperlinks have
been added to inform the reader of the existence of the other module.
Before this fix, when using layoutHintsToCenter together with
MultiColumns, in certain situations XMonad would render the border of
the focused window below a border of unfocused windows. This looks odd
and is here fixed by changing MultiColumns to always place the focused
window in front (even though they should not really overlap) and making
LayoutHints preserve the order returned from the underlying layout,
except for the focused window that is placed on top.
This is a good idea since layoutHintsToCenter requires the focused
window to be on top for good rendering, even if that is not really
required when the underlying layout is used on its own. This way
layoutHintsToCenter requires less of the layout that is modified and
MultiColumns is more compatible with future layout modifiers that are
not so considerate.
* Use global state instead of per-layout - so now window is minimized on
all workspaces (EWMH requires that windows with _NET_WM_STATE_HIDDEN
set should be minimized on any workspace but previously they were not)
* Use `windows` instead of `modify`. That should fix bugs related to
actions that should be done by `windows` and not done by
`modify` (fixes#46)
* Mark module X.H.RestoreMinimized as deprecated
ImpredicativeTypes is practically unsupported extension
on it's way to be removed from GHC:
https://mail.haskell.org/pipermail/ghc-devs/2016-September/012826.html
GHC-8.0.2-rc1 already fails to build xmonad-contrib as:
XMonad/Layout/Groups/Helpers.hs:181:22: error:
• Couldn't match type ‘G.WithID l0 Window
-> XMonad.Util.Stack.Zipper (G.Group l0 Window)
-> XMonad.Util.Stack.Zipper (G.Group l0 Window)’
with ‘G.ModifySpec’
Expected type: (G.WithID l0 Window
-> XMonad.Util.Stack.Zipper (G.Group l0 Window)
-> XMonad.Util.Stack.Zipper (G.Group l0 Window))
-> G.GroupsMessage
Actual type: G.ModifySpec -> G.GroupsMessage
• In the second argument of ‘(.)’, namely ‘G.Modify’
In the expression: sendMessage . G.Modify
In an equation for ‘wrap’: wrap = sendMessage . G.Modify
The workaround is simple: add explicit types to applications
or open-code direct application (this change).
Bug: https://github.com/xmonad/xmonad-contrib/issues/123
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
X.L.LayoutBuilderP is nearly identical to X.L.LayoutBuilder. Originally
I wanted to add the ability to dynamically resize the layout boxes so it
make a lot of sense to join these two modules together so I wouldn't
have to do it in both. Even though I never got around to that I still
think it's a good idea to merge these two modules into one.
I believe I was able to merge these without creating any
backward-compatibility issues. I've been sitting on these changes since
2015 and they work for me without having to change older parts of my
config (relating to X.L.LayoutBuilder).
If anyone wants to work on dynamically resizing layout boxes the issue I
created for it is #36.
Commits d638dc8b and a5e87e38 introduced a per-AvoidStruts-instance
strut cache that
a) didn't get initialized at startup,
b) didn't get reinitialized after layout reset and
c) didn't get updates if it wasn't the active layout, for example when
layoutHook = avoidStruts tall ||| avoidStruts (mirror tall)
a) + b) could be fixed by using the docksStartupHook introduced in
28e9f8bc, although this wasn't documented and having to call
docksStartupHook after setLayout is far from obvious.
By moving the strut cache from AvoidStruts instances to a global state,
b) and c) are fixed. One still has to invoke the docksStartupHook for
a), and this will be addressed in the next commit.
This is a fix I have applied locally to make sure that when I use decorated layouts like tabbed in groups, XMonad does not leave bogus decoration windows lying around.
I think that the issue fixed is that the set of groups to send `Hide` to is determined by subtracting the extant groups from `l`, but `l` has already been put through `readapt` and so some groups may have been removed (if they are empty), so they don't get the Hide message.
The comparison should therefore be between `_l` and the new groups.