This implements window swallowing on top of SubLayouts; the matched
windows are simply tabbed together instead of one actually being
swallowed. This provides an improved experience for people using
SubLayouts, as the parent window is still accessible.
Done as part of ZuriHac 2021.
Related: https://github.com/xmonad/xmonad-contrib/issues/416#issuecomment-777400194
Before https://github.com/xmonad/xmonad/commit/383ffb7 this would
bind all unbound keys to toggle struts; after it, it would bind no
keys at all. With this commit, it will check for this case and use
the default keybinding instead.
Users who intend no key to be bound should probably use `withSB`
instead, especially in light of aforementioned commit.
Due to differences between random-1.1 and random-1.2, on newer systems
stringToRatio returns numbers outside [0, 1] range, which breaks
colorRangeFromClassName colorizers.
This commit fixes the issue by using randomR to directly generate the random number.
Also this fixes the compilation warning (genRange and next are deprecated in random-1.2).
This adds a new logHook, nsHideOnFocusLoss, that hides the given
scratchpads when they lose focus. This is akin to the functionality
provided by a lot of dropdown terminals.
This exports the `withRecentsIn` function, as it's quite useful when
using X.H.RefocusLast in other modules as a library.
It is already possible (RecentsMap is fully exported) to completely
define this function outside of the module, so we are not exposing any
more internals than we were before.
By deprecating everything except `WSIs` and adding constructors to
logically combine `WSType` values, we can have a more flexible interface.
Adding anything to the old interface would mean going through `WSIs`, and
all old constructors can be implemented of terms of `WSIs`.
When we applied hlint hints in bd5b969d9b,
the definition of desktopLayoutModifiers got (via the hint to eta
reduce) changed from
desktopLayoutModifiers layout = avoidStruts layout
to
desktopLayoutModifiers = avoidStruts
While the former is general enough to infer the type signature
LayoutClass l a => l a -> ModifiedLayout AvoidStruts l a
the latter just sees the usage site of
, layoutHook = desktopLayoutModifiers $ layoutHook def
in the desktopConfig function and thus—through the magic of
MonomorphismRestriction—infers the specialized type
Choose Tall (Choose (Mirror Tall) Full) Window
-> ModifiedLayout AvoidStruts
(Choose Tall (Choose (Mirror Tall) Full)) Window
This obviously completely falls apart once someone wants to change the
layout and still uses desktopLayoutModifiers (unaware that it is just
avoidStruts at the moment). The easy fix is to give things type
signatures, so nothing needs to be inferred.
The _actual_ solution would be, in my opinion, to completely deprecate
X.C.Desktop and remove it in a future release, as well as to completely
rewrite the provided Example.hs. This needs more deliberation though.
Fixes: https://github.com/xmonad/xmonad-contrib/issues/560
Related: bd5b969d9b
This is for disambiguation purposes. Otherwise, there is no way to
decide whether
message +s 17 jul 12
wants to schedule the note for the 17th of july at 12:00, or for
the 17th of july in the year 12. The easiest way around this is to
stipulate that people want to make these notes for the future more
often than not and to simply prohibit note before the year 25 (as that
is where the valid times end).
Instead of trying to find a prefix and then killing the rest of the
word, actually see whether it at least fits the pattern. This means
that
message +s saturated
will no longer parse as a scheduled item for saturday, while
message +s satur
still will.
If we have a URL in the clipboard and we use `orgPromptPrimary`, it
would be nice if
message +s 11 jan 2013
would result in
* TODO [[_URL_][message]]
SCHEDULED: <2013-01-11 Fri>
instead of the current
* TODO message
SCHEDULED: <2013-01-11 Fri>
_URL_
This has the advantage that if one shows scheduled or deadlines items in
the org-agenda, it is possible to immediately follow this link with
`C-c C-o` or similar functionality.
The URL detection is very rudimentary right now. One use `parseURI`
from `network-uri`, but that would be an additional dependency that I
didn't think was worth it.
This implements whitespace pruning at the end of a sheduled item or
deadline. If we have a message like
This is a message +s today
it is expected that we created a heading of just "This is a message",
without the extra whitespace.
This is a function that takes a pretty-printer and makes it aware of
copies of the currently focused window. This is particularly nice when
using it with a StatusBarConfig.
Related: https://github.com/xmonad/xmonad-contrib/pull/463