Commit Graph

3615 Commits

Author SHA1 Message Date
Tomas Janousek
f127cf55f4 X.H.DynamicIcons: Improve configuration of output formatting
Make it possible to keep workspace id in the output (iconsFmtAppend) and
to wrap icons even if there's just one, or zero.

Also, change the default to use curly brackets to avoid confict with
brackets/parentheses used by default PPs in DynamicLog.

Related: https://github.com/xmonad/xmonad-contrib/pull/450
2021-03-25 10:08:37 +00:00
slotThe
c9a9cabcce Merge pull request #495 from slotThe/magnifier-cleanup
X.L.Magnifier: Add `magnifierczOff` and `magnifierczOff'`
2021-03-24 18:48:07 +01:00
slotThe
3aadb487ed Update CHANGES.md 2021-03-24 18:33:47 +01:00
slotThe
bb205e9205 X.L.Magnifier: Strictify and document Magnifier type 2021-03-24 18:33:47 +01:00
slotThe
1726bdb67b Merge pull request #349 from sergeykish/master
Use XFT fonts if available
2021-03-24 12:44:09 +01:00
Sergey Kish
619d0819af Use XFT fonts if available
The silent error `user error (createFontSet)` would break certain
modules (like the prompt) by simply not showing anything.

Pango 1.44 dropped support for FreeType in favor of HarfBuzz, losing
support for traditional BDF/PCF bitmap fonts.  Hence, some distributions
don't ship `xorg-fonts-misc` anymore.

Fixes https://github.com/xmonad/xmonad-contrib/issues/348
2021-03-24 12:29:18 +01:00
slotThe
b49ebdf2e0 X.L.Magnifier: Add magnifierczOff and magnifierczOff'
Instead of exporting the internal constructor, define a few more
functions for people who like their magnifier to start of in the Off
position.

Closes: https://github.com/xmonad/xmonad-contrib/issues/168
2021-03-24 10:08:10 +01:00
slotThe
5fbfcaada0 X.L.Magnifier: Implement magnifier['] in term of magnifiercz['] 2021-03-24 10:08:10 +01:00
Tomáš Janoušek
cd24f84774 Merge pull request #490 from liskin/pr/hacks-trayer
X.U.Hacks: Add "Stacking trays (trayer) above panels (xmobar)"
2021-03-23 21:55:19 +00:00
Tomáš Janoušek
06dafe3772 Merge pull request #492 from liskin/pr/managedocks-override-redirect
X.H.ManageDocks: React to strut updates of override_redirect docks
2021-03-23 21:55:07 +00:00
Tomas Janousek
ec14617123 X.H.ManageDocks: React to strut updates of override_redirect docks
We only requested PropertyChange events from docks in the `manageDocks`
manageHook, but that only gets called for normal windows, not
override_redirect ones. Therefore, xmobar in its default configuration
wouldn't get its struts refreshed on changes. This resulted in gaps not
updating after xmobar repositions itself on xrandr changes.

If one wanted to handle that repositioning in xmonad, it was possible to
configure xmobar with `overrideRedirect = False`, which is meant for
window managers with proper EWMH stacking order support [1], so in
xmonad it resulted in xmobar covering fullscreen windows. That can be
worked around by adding `checkDock --> doLower` to manageHook, but it
starts to smell of too many workarounds.

[1]: https://specifications.freedesktop.org/wm-spec/wm-spec-1.5.html#STACKINGORDER

The fix is to request PropertyChange events for all windows that we
treat as docks.

Related: https://github.com/xmonad/xmonad-contrib/pull/490
2021-03-23 14:24:30 +00:00
Tomas Janousek
88b9c80618 X.H.ManageDocks: Refactor strut cache
This is primarily a cleanup to make it easier to use `setDocksMask` from
the on-demand cache init (see further commits), but it makes the code
nicer:

- the logic to refresh and cache a strut is now concentrated in
  `updateStrut` instead of being spread over `updateStrutCache` and
  `docksEventHook`

- the logic to initialize the cache if not yet initialized is now
  concentrated in `maybeInitStrutCache` instead of being spread over
  `initStrutCache` and `getStrutCache`, so the dual-purpose return type
  of `getStrutCache` is no more

- the logic to detect changes and refresh is now always handled by
  `XS.modifiedM` instead of an additional `||`

Related: https://github.com/xmonad/xmonad-contrib/pull/406
2021-03-23 14:24:10 +00:00
Tomas Janousek
37fbf24ba7 X.U.ExtensibleState: Add modifiedM for effectful modifications 2021-03-23 14:23:55 +00:00
Tomas Janousek
04be5fc22e X.H.ManageDocks: Fix typo in deleteFromStructCache
Fixes: c48d81e378 ("Fix caching issues in ManageDocks")
2021-03-23 14:22:36 +00:00
Tomas Janousek
74e55421d3 Update CHANGES 2021-03-23 14:15:34 +00:00
Tomas Janousek
6d42c540a5 X.U.Hacks: Add "Stacking trays (trayer) above panels (xmobar)" 2021-03-23 14:15:34 +00:00
slotThe
c3fa5138f9 Merge pull request #479 from slotThe/topic-history
X.A.TopicSpace: Deprecate internal history
2021-03-23 07:51:16 +01:00
Tomas Janousek
46f24bb27e X.A.TreeSelect: Fix swapped green/blue in foreground when using Xft
Closes: https://github.com/xmonad/xmonad-contrib/pull/486
Co-authored-by: Joan Milev <joantmilev@gmail.com>
2021-03-22 15:30:03 +00:00
Tomas Janousek
b6bd6f6d9d X.U.Hacks: Minor cleanup
Improve diffability of module exports; fix haddock.
2021-03-22 10:29:27 +00:00
slotThe
bebcb605a8 Merge pull request #185 from aplaice/master
Improve conversion of Char to KeySym in XMonad.Util.Paste
2021-03-22 07:35:33 +01:00
Tomáš Janoušek
0d93820160 Merge pull request #470 from liskin/pr/notifications-obscured-by-floats
Apply two xmonad core fixes to float moving/resizing in various contrib modules
2021-03-21 21:31:01 +00:00
slotThe
43d68bd451 Update CHANGES.md 2021-03-21 08:01:19 +01:00
slotThe
3c4f42d2da X.A.TopicSpace: More aggressively use X.H.WorkspaceHistory
Ever since ce5aae5403 TopicSpace uses the
history implementation of X.H.WorkspaceHistory instead of something
hand-rolled.  This, however, did not go far enough; at this point, we
can deprecate essentially all of TopicSpace's redundant history handling
and explicitly tell users to use the more modular X.H.WorkspaceHistory
instead.
2021-03-21 08:00:44 +01:00
slotThe
280c1a8ed5 X.H.WorkspaceHistory: Fix hlint nits, strictness
There is no reason why the used maps should not be strict, as we are
definitely traversing.
2021-03-21 08:00:44 +01:00
slotThe
62e9941d3d X.H.WorkspaceHistory: Add ability to exclude workspaces 2021-03-21 08:00:44 +01:00
Tomáš Janoušek
ab60361c5b Merge pull request #487 from slotThe/old-time->time
Use time instead of old-time and old-locale
2021-03-21 00:02:12 +00:00
slotThe
e3a13a57e8 Merge pull request #471 from liskin/pr/spawnpipe-dynamiclog-encoding
Fix encoding issues in spawnPipe/dynamicLogString/xmonadPropLog
2021-03-20 18:18:35 +01:00
Tomas Janousek
63e31ccd8d X.H.DynamicLog: Move UTF8 encoding from dynamicLogString to xmonadPropLog'
For many (10+) years, we had a cascade of ugly workarounds:

 * X.U.Run.spawnPipe returned a binary handle, so the String passed to
   it must have been encoded by C.B.UTF8.String.encodeString

 * X.H.DynamicLog.dynamicLogString therefore returned such an encoded
   String, so one could use it directly in a hPutStrLn, but literal
   Strings wouldn't work

 * xmonadPropLog' also expected an encoded String to make it easier to
   use together with dynamicLogString, again breaking usage with String
   literals and other normal unicode Strings

Then in 1d0eaddc25 Sibi fixed spawnPipe to return a handle usable with
normal Strings, which then obviously broke the entire cascade. But,
instead of using the opportunity to remove all the ugly workarounds, he
decided to add some more on top, so now spawnPipe with dynamicLogString
outputs doubly encoded UTF-8 and xmobar has a hack to strip this double
encoding (https://github.com/jaor/xmobar/pull/482), which only works
when XFT is in use and breaks on some long unicode codepoints. :-(

There is a better way: make everything just use normal Strings and only
encode when it goes out the wire. This means dynamicLogString can be
freely mixed with String literals, manual uses of xmonadPropLog' don't
need encodeString, and everything just works nicely.

This obviously breaks configs that used some of these pieces in
isolation (like mine), but that's a small price to pay. After all, right
now all users of spawnPipe/dynamicLogString are getting doubly encoded
UTF-8 which might or might not work in xmobar and probably breaks
horribly everywhere else, so this fix should be a clear improvement. :-)

Fixes: 1d0eaddc25 ("Make spawnPipe to use system's locale encoding")
Fixes: https://github.com/xmonad/xmonad-contrib/issues/377
Fixes: https://github.com/jaor/xmobar/issues/476
Related: https://github.com/xmonad/xmonad-contrib/pull/334
Related: https://github.com/jaor/xmobar/pull/482
2021-03-20 18:11:33 +01:00
Tomas Janousek
21fb9dfc43 X.U.Run: Clean up spawnPipes a bit
This makes it easier to see the differences between these functions,
makes it less likely someone will change one and not the others, etc.
More importantly, the documentation doesn't contain circular references
any more. :-)

Also, let's just use hSetEncoding. The concern of this being stateful
and theoretically having something written in the wrong encoding is
pointless: nobody has the handle until we return it from `spawnPipe'`.

(This also means that spawnPipeWithNoEncoding is now a text handle that
possibly does newline translation, just with char8 encoding. There
should be no difference in practice.)

Fixes: 8b2bd3ae5c ("Add new variants of spawnPipe functions with encoding support")
2021-03-20 18:11:33 +01:00
slotThe
d32febd60d Merge pull request #392 from wygulmage/nix
Add nix packages to stack.yaml.
2021-03-20 16:53:01 +01:00
Keith
d05b934cbf Add nix packages to stack.yaml. 2021-03-20 16:46:17 +01:00
slotThe
cf9388a918 Merge pull request #481 from liskin/pr/pp-composable-rename
Extend PP with ppRename: nicer compose of WorkspaceNames, ClickableWorkspaces, …
2021-03-20 16:32:57 +01:00
slotThe
94f1e943d4 Use time instead of old-time and old-locale
Get rid of these deprecated libraries, as the new `time' library
provides a strict superset of the functionality of `old-time' and
`old-locale'.
2021-03-20 16:14:26 +01:00
slotThe
f1bd315448 Merge pull request #484 from ulrikdem/max-compl-columns
X.Prompt: Add maxComplColumns field to XPConfig
2021-03-20 08:03:22 +01:00
Tomas Janousek
dbaf0e60ce Merge branch 'AusCyberman/master' 2021-03-19 17:05:30 +00:00
Tomas Janousek
b0f5c69baf X.U.ClickableWorkspaces: Drop escaping from clickableWrap
This breaks putting <fn> tags and icons into workspace names, which some
people might like. Those few who generate workspace names dynamically
from window titles may (and should) escape it themselves.
2021-03-18 22:17:19 +00:00
Ulrik de Muelenaere
577fd81450 X.Prompt: Add maxComplColumns field to XPConfig
This allows limiting the number of columns in the completion window. The
window width is divided equally between the columns.
2021-03-18 23:09:00 +02:00
Tomáš Janoušek
fcbccc1df2 Merge pull request #480 from slotThe/prompt.pass
X.P.Pass: Update Documentation
2021-03-17 16:47:30 +00:00
Tomas Janousek
7dbedb17d6 Merge branch 'antoniotrkdz/mate-main-menu' 2021-03-17 12:04:09 +00:00
Tomas Janousek
47a0f17230 Update CHANGES 2021-03-17 12:02:45 +00:00
antoniotrkdz
670124e309 X.C.Mate: Add Main Menu keybinding
Now it is possible to use mod+d to open the Mate Main Menu.
2021-03-17 12:01:08 +00:00
Tomas Janousek
e91b0fef82 X.A.WorkspaceNames, X.L.IndependentScreens, X.U.ClickableWorkspaces: Use ppRename
Also, drop now useless integrations from X.U.ClickableWorkspaces:
workspaceNamesPP, marshallPP and clickablePP can now be composed
directly using >>= and it just works.

Related: https://github.com/xmonad/xmonad-contrib/pull/390
Related: https://github.com/xmonad/xmonad-contrib/pull/462
2021-03-17 11:53:44 +00:00
slotThe
cb86dd3c61 Fix inconsistency in CHANGES.md 2021-03-17 09:54:15 +01:00
Joan MIlev
d9a7f4388a Add fullscreenSupportBorder (#476)
Add fullscreenSupportBorder for autohiding window borders
2021-03-17 09:50:16 +01:00
Tomas Janousek
be963c0e93 X.H.ManageHelpers: Fix trailing whitespace 2021-03-16 20:24:33 +00:00
Tomas Janousek
91010f6eb9 X.H.DynamicLog: Add ppRename (composable tag augmentation)
This one is a Reader in WindowSpace, and therefore significantly
simplifies the composition of WorkspaceNames, IndependentScreens,
ClickableWorkspaces and possibly other similar modules.

Related: https://github.com/xmonad/xmonad-contrib/pull/390
Related: https://github.com/xmonad/xmonad-contrib/pull/462
2021-03-16 18:45:19 +00:00
Tomas Janousek
fc7ea97582 X.H.DynamicLog: Reindent pprWindowSet 2021-03-16 18:23:28 +00:00
slotThe
c8de3b92af X.P.Pass: Update documentation 2021-03-16 14:13:24 +01:00
slotThe
90974fd820 X.L.Magnifier: Update screenshot 2021-03-16 10:36:25 +01:00
Tomáš Janoušek
62d65d3cdd Merge pull request #459 from slotThe/prompt-spaces
X.Prompt: Correct tab completion handling
2021-03-15 18:33:04 +01:00