4144 Commits

Author SHA1 Message Date
L. S. Leary
edf8e2526d flake.nix:
* Support comp.nix.
  * Re-order overlays and modules dependency-last for sanity.
  * Re-export `xmonad.modernise`.
NIX.md:
  * Document comp.nix.
  * Simplify example system flake, removing direct dependency on the
    xmonad flake.
  * Advise sane module ordering.
  * Include and document `modernise` workaround.
  * Clarify user-substituted `<foo>` values.
.gitignore:
  * Include nix 'result' symlink.
2022-09-05 20:57:17 +12:00
Tomas Janousek
d0d222e974 Bump version to 0.17.1.9 and prepare CHANGES.md sections 2022-09-03 16:25:12 +01:00
Tony Zorman
c688975625 CHANGES: Fix date for 0.17.1 release
Derp.
2022-09-03 16:50:41 +02:00
Tony Zorman
afd6824ce0 Bump version to 0.17.1 v0.17.1 2022-09-03 14:54:32 +02:00
brandon s allbery kf8nh
f5de0fc764 Document WNConfig
And rearrange the documentation slightly so it makes more sense.
Also document the defaults, and clean up the existing markup a bit.
2022-08-28 01:56:32 -04:00
Tony Zorman
c701a75002 X.P.OrgMode: Require whitespace before priority
By being a bit less greedy with consuming whitespace in the date/time
parsers, we can make the `prop_{encode,decode}Preservation` properties
well-defined again.
2022-08-28 07:41:08 +02:00
Tony Zorman
f77fb802eb X.P.OrgMode: Mention more resources
Specifically, a blog post by yours truly featuring some animated GIFs,
which might be more digestible than a wall of text.
2022-08-27 12:43:28 +02:00
Tony Zorman
063d97f8d3
Merge pull request #735 from PRESFIL/x-p-unicode-unidescriptions
`X.P.Unicode`: `BS` -> `String` to support Unicode descriptions
2022-08-24 15:09:49 +02:00
PRESFIL
c187dfde4c X.P.Unicode: BS -> String to support Unicode descriptions
Switch the underlying UnicodeData data type from the current ByteString
implementation to String.  This is in order to facilitate descriptions
Unicode descriptions of the Unicode characters themselves.  We chose
String instead of Text because it does not incur an extra dependency.

Fixes: https://github.com/xmonad/xmonad-contrib/issues/733
2022-08-24 15:08:07 +02:00
Tony Zorman
766667d8fa X.U.Loggers: Make logTitlesOnScreen default to correct value
To keep the behaviour of the old code, we want to fall back to the
unfocused format here, not the identity.

Fixes: cfc6a5293537a7cd61b9992c337279df5dba7628
2022-08-24 14:55:11 +02:00
Tony Zorman
113dda4389
Merge pull request #747 from slotThe/org-mode/priorities
X.P.OrgMode: Add ability to specify priorities
2022-08-24 14:36:35 +02:00
Tony Zorman
888a1e4f12 X.P.Pass: Add note about enabling fuzzy matching
Instead of providing these as default values, as originally planned,
just add a note for users who wish to customise that part of the prompt.
We simply get the user config in mkPassPrompt and so overriding that
with a custom searchPredicate and sorter seems unwise.

Closes: https://github.com/xmonad/xmonad-contrib/issues/746
2022-08-23 21:32:34 +02:00
Tony Zorman
4d11a372c9 tests/OrgMode: Generate arbitrary priorities
Add the trivial Arbitrary instance for Priority, extend the Arbitrary
instance of OrgMsg, as well as some plumbing.  Also work in some unit
tests for regression testing.
2022-08-23 18:49:38 +02:00
Tony Zorman
68b5a12f96 X.P.OrgMode: Add ability to specify priorities
Add the ability to specify alphabetic (`#A`, `#B`, and `#C`) org-mode
priorities[1] at the end of the input note.

[1]: https://orgmode.org/manual/Priorities.html
2022-08-23 18:47:03 +02:00
Tony Zorman
ae7f615b60
Merge pull request #743 from alternateved/add-log-titles-variant
X.U.Loggers: Add variants of logTitle with urgent windows support
2022-08-21 17:23:48 +02:00
Tomasz Hołubowicz
cfc6a52935 X.U.Loggers: Add variants of logTitle with urgent windows support 2022-08-21 16:53:39 +02:00
brandon s allbery kf8nh
699d7d5002
Merge pull request #745 from geekosaur/prompt-pass-specify
Allow users to specify custom prompts
2022-08-21 10:44:33 -04:00
brandon s allbery kf8nh
996921528d
Merge branch 'master' into prompt-pass-specify 2022-08-21 10:26:36 -04:00
Tony Zorman
2ae1c86ceb
Merge pull request #744 from geekosaur/absolute-path
Use `mkAbsolutePath` in `doAppend` (XMonad.Prompt.AppendFile)
2022-08-21 06:53:53 +02:00
brandon s allbery kf8nh
2c5ea5f94a
change XMonad.Prompt.AppendFile to use mkAbsolutePath 2022-08-20 17:18:52 -04:00
brandon s allbery kf8nh
64eb4e46ec
modify mkAbsolutePath to support environment vars
If you want more general support, comment on PR #744.
2022-08-20 17:18:51 -04:00
brandon s allbery kf8nh
a7ed269a01
update CHANGES.md 2022-08-20 17:18:00 -04:00
brandon s allbery kf8nh
84f928068f
versions of pass functions with user-specified prompt
By request of a user on IRC
2022-08-20 17:18:00 -04:00
Tony Zorman
40171824cd
Merge pull request #742 from slotThe/sideborderdec
New module: XMonad.Layout.SideBorderDecoration
2022-08-19 09:54:03 +02:00
Tony Zorman
7185b28e09 New module: XMonad.Layout.SideBorderDecoration
New module that allows for having a configurable border position around
windows.  Originally found in a comment by L. S. Leary in [1].  Enough
people have requested this on IRC in recent memory to warrant a proper
module.

[1]: https://github.com/xmonad/xmonad/issues/152#issuecomment-362716434

Co-authored-by: L. S. Leary <LSLeary@users.noreply.github.com>
2022-08-19 09:43:02 +02:00
Tony Zorman
284463a172 X.U.Parser: Give (Parser a) an IsString instance when a ~ String
When the -XOverloadedStrings language extension is on, treat a string s
as the parser 'string' s, when appropriate.  This allows one to write
things like "a" *> otherParser instead of 'string' "a" *> otherParser.
2022-08-19 09:37:07 +02:00
Tony Zorman
df3d0aa057 X.U.Run: Use isPrefixOf in withEmacsLibs
The `lisp` and `elpa` lists will simply be the (unqualified) file names.
Thus, if we use isInfixOf and try to require a library with a very short
name (like s.el), other things may be chosen over it.  isPrefixOf,
together with the additional `-`, prevents this from happening.
2022-08-16 07:38:18 +02:00
Tony Zorman
ee97eec17d Remove all remaining occurences of defaultTConf
Data.Default deprecations were removed in
5140f5b5d06790e055eb7fb0cf3eccc4997aa736, yet some comments still refer
to defaultTConf—fix that.

Related: 6b4675e3fa85f95f808a95f8cad790e798cf6ad5
2022-08-03 10:06:23 +02:00
brandon s allbery kf8nh
6b4675e3fa
fix some deprecated and removed defaultTConfs 2022-08-02 19:37:18 -04:00
Tony Zorman
0934fe5cd7 X.U.Grab: Hide mkGrabs from XMonad
With [1] merged, the XMonad module from core now exports mkGrabs and
setNumlockMask (now cacheNumlockMask).  However, since we want
xmonad-contrib 0.17.1 to compile against xmonad 0.17.0 still, hide the
function for now and continue to use the vendored copies we have in
X.U.Grab currently.  We have to ignore the dodgy-imports warning when
-fpedantic is on, but that seems like a small price to pay.

A breaking change for this is planned for 0.18.0.

[1]: https://github.com/xmonad/xmonad/pull/405
2022-08-02 09:57:32 +02:00
Tony Zorman
8268cdde26
Merge pull request #736 from geekosaur/EWMH-windowDebug
print EWMH type and state in debugWindow
2022-07-29 09:10:02 +02:00
brandon s allbery kf8nh
607fdc2a12
print EWMH type and state in debugWindow 2022-07-28 10:18:11 -04:00
Yecine Megdiche
0a3fa0c3ed
Merge pull request #737 from geekosaur/bits-warning
silence warning about extraneous Data.Bits import
2022-07-26 12:39:20 +02:00
brandon s allbery kf8nh
1aad21e866
silence Data.Bits warning
I had missed that `(.&.)` was already being imported from
`XMonad.Prelude`.
2022-07-25 20:25:48 -04:00
Tomas Janousek
8da08b8848 scripts: Include xmonad{ctl,propread}.hs in the release tarball
Last year I thought a bit about making this an actual `executable` in
xmonad-contrib.cabal, but decided against it. Unfortunately I can't
remember why. So let's do the bare minimum to at least ship it now, and
if I remember or if anyone has any ideas, we can do the next step or
document why not.

Fixes: https://github.com/xmonad/xmonad-contrib/issues/734
2022-07-12 22:17:36 +01:00
Tomas Janousek
a45ecd3779 scripts: Drop obsolete grabDescriptions.hs
We haven't used this for a while, and since we dropped descriptions in
X.D.Extending in favor of the haddock-generated index in
839302533bed6c6ece709a9d8508cc9b773b3975, it's useless.
2022-07-12 22:13:31 +01:00
Tomas Janousek
820a2f75de scripts: Drop obsolete generate-configs
The last time this could work was 2007
(1e35714e1e01b1148c84076de7a5998045679a08).
2022-07-12 22:10:44 +01:00
brandon s allbery kf8nh
2a6ac58c71
change a defaultGSConfig doc to a def 2022-07-12 14:25:13 -04:00
Tomáš Janoušek
ea97c3562f
Merge pull request #732 from liskin/getppidof
X.A.SpawnOn, X.H.WindowSwallowing: Fix parsing of process PPIDs
2022-07-06 09:03:20 +01:00
Tomas Janousek
fc482b8771 X.A.SpawnOn, X.H.WindowSwallowing: Fix parsing of process PPIDs
This fixes several issues related to parsing of parent PIDs:

* A process with lines or spaces or parentheses in its process name
  would confuse the code in X.A.SpawnOn and possibly lead to a
  `Prelude.read: no parse` exception.

* `X.H.WindowSwallowing.isChildOf` looked for the parent PID anywhere in
  the output of pstree, so single-digit parent PIDs would be considered
  as parents of any process with that digit anywhere in its chain of
  parent PIDs. (Note that apps in PID namespaces like in Flatpak often
  have single-digit PIDs.)

* `pstree` is no longer required in `$PATH`.

Fixes: https://github.com/xmonad/xmonad-contrib/issues/726
2022-07-06 09:00:35 +01:00
brandon s allbery kf8nh
5557944fb6 Proper fix for alpha channel mishandling
X11 only handles alpha channels in a restricted set of APIs (such as
setting `border_color`); most others throw undocumented errors and/or
produce black pixels. Document this, and mask out alpha where it
matters.

Fixes xmonad/xmonad#395, xmonad/xmonad#398.
2022-07-05 17:34:49 -04:00
Tony Zorman
ebdb079a94
Merge pull request #727 from ilya-bobyr/master
X.H.UrgencyHook: Default for DzenUrgencyHook and UrgencyConfig
2022-07-05 08:32:35 +02:00
Illia Bobyr
3e7b22fe9b X.H.UrgencyHook: Default for DzenUrgencyHook and UrgencyConfig
As the XMonad config is commonly customized by saying

    def { startupHook = ...
        , manageHook = ...
        , ...
        }

It seems consistent to allow the same for an individual hook config:

    let urgencyHook = def { suppressWhen = ...
                          , remindWhen = ...
                          }
2022-07-05 08:28:59 +02:00
Tony Zorman
839bc907ba
Merge pull request #730 from slotThe/nsp-fix
X.U.NamedScratchpad: Initialise if necessary
2022-07-03 13:32:20 +02:00
Tony Zorman
7a33639aaa X.U.NamedScratchpads: Fill NSPState when necessary
Since 3fc830aa09368dca04df24bf7ec4ac817f2de479, scratchpads are now
added in namedScratchpadManageHook.  This, however, means that we need
some kind of MapRequestEvent to happen before processing scratchpads,
otherwise the manageHook didn't run yet and our extensible state is
being left empty.  When trying to open a scratchpad right after starting
xmonad—i.e., before having opened a window—this may not be the case.

Fixes: https://github.com/xmonad/xmonad-contrib/issues/728
2022-07-03 12:24:44 +02:00
Tony Zorman
a4c73ad090
Merge pull request #729 from slotThe/modal-fixups
X.H.Modal: Add EZConfig support
2022-07-02 17:28:00 +02:00
Tony Zorman
8ddc1f48e2 X.H.Modal: Update documentation
Now that we use a slightly different setup, as well as EZConfig support,
rewrite the introduction to the module a little.
2022-07-02 17:27:33 +02:00
Tony Zorman
fe337dc6b0 X.H.Modal: Add support for EZConfig-style bindings
Add support for EZConfig-style bindings while also maintaining some
guarantees as to which type of representation we will store in the
extensible state.  This means that parsing of the keys will happen no
later than the call to `modal`.

Users can choose to use `mkKeysEz` or `mkKeysFun` to create a new
collection of keys to bind for a mode.  This is deemed more ergonomic
than exporting the respective constructors directly.
2022-07-02 17:27:33 +02:00
Tony Zorman
87a36d7d31 X.H.Modal: Cleanup
Mostly small things, like making imports line up with the provided
comments.  Also:

+ Rename mode' -> modeWithExit.  This seems like a better name for
  discoverability reasons.

+ Make the fields of Mode strict, because they have no reason not to,
  really.
2022-06-29 15:00:40 +02:00
Yecine Megdiche
0891575518 New module: XMonad.Hooks.Modal
Based on the draft by L. S.
Leary.  (https://gist.github.com/LSLeary/6741b0572d62db3f0cea8e6618141b2f).
2022-06-28 22:27:29 +02:00