Commit Graph

4122 Commits

Author SHA1 Message Date
Tomas Janousek
3adb47235f Apply hlint 3.4 hints 2022-05-02 00:06:59 +01:00
Tomas Janousek
154388aa20 ci: Drop hlint -XCPP workaround
https://github.com/ndmitchell/hlint/issues/1360 is fixed and the fix
released.
2022-05-01 23:25:08 +01:00
Tony Zorman
716c634dc9 Merge pull request #715 from Ahanaf-Ether/master
X.A.PerLayoutKeys: Fix typo
2022-05-01 08:51:03 +02:00
Ether
51907ad59e X.A.PerLayoutKeys: Fix typo 2022-05-01 08:49:54 +02:00
L. S. Leary
fa498ca728 flake.nix: Provide a NixOS module corresponding to that of the
xmonad (core) flake.
2022-04-25 02:02:11 +12:00
L. S. Leary
b4b4d9b7c8 flake.nix: Expose hoverlay for use with fromHOL. 2022-04-25 01:51:24 +12:00
L. S. Leary
12cd1b9c6e flake.nix: Erase the noise with xmonad.lib.fromHOL. 2022-04-25 01:38:39 +12:00
Tomas Janousek
0e106ccfbe ci: Discard old caches to fix build failures
We're getting "undefined reference" errors during linking, suggesting
some build artifacts in the cache are stale and need to be rebuilt.
2022-04-18 23:39:01 +02:00
brandon s allbery kf8nh
b6d62fe9d3 migrate build scripts from xmonad-testing
The testing repo was not a good location for them, and is now
deprecated. They are now in `scripts/build`, and will be documented
in the main repo's `INSTALL.md`.
2022-04-18 17:30:51 -04:00
Tony Zorman
965c4052fb Merge pull request #705 from kozlov721/repeat-action
added Actions.RepeatAction
2022-04-17 10:37:29 +02:00
Martin Kozlovsky
3f590b86c6 New module: XMonad.Actions.RepeatAction
Closes: https://github.com/xmonad/xmonad-contrib/issues/489
2022-04-17 10:25:47 +02:00
brandon s allbery kf8nh
80776d8969 buggy boolean blindness
`ManageDebug` was continuing to report in the `logHook` even after
the `manageHook` was done. In diagnosing this, I discovered that
the original code was using a tuple of `Bool`s and not even a
comment about which meant what.

The code now uses a proper pair type, and dedicated `data`s for
the two flags that make it clear what each means. This also fixed
the bug, so apparently I had the `Bool`s confused somewhere.

I also took the chance to clarify the documentation a little (a
misleading "persistent", since it doesn't use persistent XS) and
a few more cleanups. Also, it now logs all `manageHook` runs
before the `logHook` in case multiple windows are opened.
2022-04-15 14:17:50 -04:00
Tony Zorman
923c5a2548 Merge pull request #704 from amenonsen/master
Fix missing prompt configuration in DynamicProjects example
2022-04-12 09:06:27 +02:00
Abhijit Menon-Sen
cf3a2be6d9 Fix missing prompt configuration in DynamicProjects example 2022-04-12 12:25:44 +05:30
Yecine Megdiche
b7799c1e5b Merge pull request #701 from PRESFIL/fix-synopsis-typo
Fix synopsis typo
2022-04-09 10:18:14 +02:00
PRESFIL
f43bd08728 Fix synopsis typo
Removes a repeating word in a package synopsis
2022-04-09 10:05:38 +03:00
brandon s allbery kf8nh
0833c347e7 Missed a reference to bindOn
The perils of making 1-line changes to another module….

Co-authored-by: Tomáš Janoušek <tomi@nomi.cz>
2022-04-06 13:13:55 -04:00
brandon s allbery kf8nh
84caf89894 new module XMonad.Actions.PerLayoutKeys 2022-04-06 13:13:55 -04:00
slotThe
78dce3d85b X.U.NamedScratchpad: Fix docs regarding dynamic NSPs
The documentation and usage example still had the old names.

Related: https://github.com/xmonad/xmonad-contrib/issues/699
2022-04-05 16:13:08 +02:00
Tomáš Janoušek
737f8040cb Merge pull request #694 from slotThe/ci/update-ghcs
ci: Update supported GHC versions
2022-04-05 12:31:27 +01:00
slotThe
e3ffbf63f6 ci: Update supported GHC versions
+ Prefer GHC 8.10.7 to 8.10.4, as versions seem to have stabilised now.
+ Add support for Stackage LTS 19, which ships with GHC 9.0.2.
+ Since a new version of 9.2 has been released, prefer 9.2.2 over 9.2.1.

Also, explicitly pass -XCPP to hlint; see [1].

[1]: https://github.com/ndmitchell/hlint/issues/1360
2022-04-05 12:18:12 +01:00
Tony Zorman
533e17135e Merge pull request #690 from slotThe/scratchpads
X.U.NamedScratchpads: Add dynamic scratchpad capabilities
2022-04-01 08:40:37 +02:00
slotThe
4c350b9a65 X.U.NamedScratchpad: Use a map for internal state 2022-04-01 08:28:55 +02:00
slotThe
bc2aaf41af X.U.DynamicScratchpads: Deprecate 2022-04-01 08:28:55 +02:00
slotThe
f6334b6af6 X.U.NamedScratchpad: Create a `Deprecations' section
Since users should not use these functions, anyways, separating them out
seems like a good idea.  Plus, one now does not need to scroll over them
to get to the dynamic scratchpad functionality (people may stop when
seeing "DEPRECATED" signs everywhere).
2022-04-01 08:28:55 +02:00
slotThe
bf064710d0 X.U.NamedScratchpad: Add support for dynamic scratchpads
With the extensible state machinery in place[1], we are now able to
seamlessly integrate dynamic scratchpad functionality into
X.U.NamedScratchpad.  This is one step into the direction of having a
single scratchpad implementation that can "do anything".

Related: https://github.com/xmonad/xmonad-contrib/issues/591
Related: https://github.com/xmonad/xmonad-contrib/pull/662

[1]: 70d08b82f43057447e8e2479aa515b6db0d199e4
     (X.U.NamedScratchpad: Use ExtensibleState to store scratchpads)
2022-04-01 08:28:55 +02:00
slotThe
3fc830aa09 X.U.NamedScratchpad: Use ExtensibleState to store scratchpads
Instead of using the scratchpads that the user specifies (as this will
realistically just be "all of them"), create some extensible state for
the scratchpads to reside in.

To ensure that this is done in a backwards compatible way, function
signatures did not change and they instead just ignore the list of
scratchpads given to them and the initialisation is done in the
manageHook, which users already have to use anyways.
2022-04-01 08:28:55 +02:00
Tony Zorman
0f788a9d92 Merge pull request #697 from xmonad/696-add-SessionStart-ref
Have `X.U.SpawnOnce` point to `X.U.SessionStart`
2022-03-25 08:07:00 +01:00
brandon s allbery kf8nh
fad1411995 Have X.U.SpawnOnce point to X.U.SessionStart
Just a simple doc change, but should make `X.U.SessionStart` more discoverable.

Closes #696.
2022-03-24 20:18:49 -04:00
Tony Zorman
8693654bdd Merge pull request #695 from a5ob7r/fix_typo_in_doc
Fix typo on the 'XMonad.Hooks.Rescreen' doc
2022-03-23 20:18:27 +01:00
a5ob7r
9128342f25 Fix typo on the 'XMonad.Hooks.Rescreen' doc 2022-03-22 11:21:53 +09:00
slotThe
8a28fbb29e cabal: Remove NIX.md from extra-source-files
We do not ship the nix flake in the release tarball, so it does not make
sense to include NIX.md in there either; at least for now.

Fixes: 4ca46c2414 (Add NIX.md)
2022-03-14 20:22:12 +01:00
slotThe
dcd5918d3a X.L.ThreeColumns: Resize screenshot
Fixes: https://github.com/xmonad/xmonad-contrib/issues/530
2022-03-06 20:23:15 +01:00
Tony Zorman
974c10dca7 Merge pull request #589 from IvanMalison/customizableNixDevelop
Provide a mechanism by which users can customize the nix devShell
2022-03-06 18:21:12 +01:00
slotThe
4ca46c2414 Add NIX.md
There are multiple ways one could use XMonad with nix, so a separate
file for documenting all of this seems appropriate.  E.g., when it
contains the respective installation instructions (e.g, "normally" as
instructed in the NixOS wiki, via stack, via flake, ...) we could link
to it from INSTALL.md.

For now it's a good place to document the new `develop.nix`
functionality.

Co-authored-by: Ivan Malison <IvanMalison@gmail.com>
2022-03-05 09:50:58 +01:00
Ivan Malison
f1ea1e533d Provide a mechanism by which users can customize the nix devShell 2022-03-05 09:50:58 +01:00
Tony Zorman
ca25b36aa0 Merge pull request #689 from slotThe/X.H.ShowWName
Add XMonad.Hooks.ShowWName
2022-02-28 08:55:59 +01:00
slotThe
fba22a7366 Add XMonad.Hooks.ShowWName
This is a reimplementation of X.L.ShowWName as a logHook, using the new
simpleWindow interface from 86b816ec50.

Fixes: https://github.com/xmonad/xmonad-contrib/issues/612
2022-02-28 08:53:22 +01:00
Yecine Megdiche
6a46ff449f Merge pull request #684 from TheMC47/feature/workspace-screen
Export `WindowScreen` type and add a new module: `X.H.WorkspaceScreen`
2022-02-24 20:08:00 +01:00
Yecine Megdiche
eb8da2dcb2 New Module: XMonad.Hooks.WorkspaceScreen
In a multi-head setup, it might be useful to have screen information of the
visible workspaces combined with the workspace name, for example in a status
bar. This module provides utility functions to do just that.
2022-02-24 20:00:46 +01:00
Yecine Megdiche
2d33f18dec XMonad.Prelude: add the WindowScreen type
`WindowScreen` is a type synonym for the specialized `Screen` type, that
results from the `WindowSet` definition in XMonad.Core. Having this type
defined and exported in a central module saves extension developers from
trying to reconstruct it, whenever the general `Screen i l a sid sd` is
not suitable.

Note: this should be moved to `XMonad.Core` in the next core release.
2022-02-24 20:00:46 +01:00
Tomáš Janoušek
d2b174f269 Merge pull request #688 from liskin/dynamic-workspaces-nub-refresh-loop
X.H.ManageDocks: Avoid unnecessary refresh (loop) for decorations

This started as an investigation of the root cause of
<https://github.com/xmonad/xmonad-contrib/issues/565>, which was
addressed by <https://github.com/xmonad/xmonad-contrib/pull/621> without
having a full understanding of why xmonad ends up in a busy loop.

What was going on:

* X.L.SubLayouts group update algorithm assumes no duplicities in the
  Stack, and results in multiplying those duplicities otherwise. Note
  that this is a reasonable assumption—duplicities in a Stack have no
  defined behaviour in xmonad (X11 can't place a window on a screen
  twice), so "fixing" this algorithm is a waste of time.

* X.L.Decoration creates windows which X.H.ManageDocks treats as
  possible docks, resulting in extra refresh whenever they appear.

* The extra refresh causes X.L.SubLayouts to multiply the duplicities,
  X.L.Decoration to create new decoration windows, and these invalidate
  the X.H.ManageDocks strut cache, leading to yet another refresh, and
  an endless loop of these.

Having concluded that the no-duplicities assumption is a reasonable one,
there's nothing really to fix here after
<https://github.com/xmonad/xmonad-contrib/pull/621>. Still, the extra
refresh might be causing extra flicker in decorated layouts, and we can
easily avoid it, so I do that here. Plus a bit of documentation for
X.L.SubLayouts.
2022-02-20 18:24:59 +00:00
Tomas Janousek
253b952814 X.L.SubLayouts: Document assumptions/pre-conditions of toGroupStack
This started as an investigation/fix of xmonad freezing when a bug in
X.A.DynamicWorkspaces caused duplicate Windows in a single Workspace
Stack, but I soon(-ish) realized that trying to make SubLayouts robust
enough to handle duplicities in a Stack is futile. Any code that creates
duplicities in a Stack is buggy, and must be fixed; the rest can assume
there aren't any.

Instead, let's just document that this is a pre-condition, and that (and
how) stuff will misbehave.

Related: https://github.com/xmonad/xmonad-contrib/issues/565
2022-02-20 18:22:19 +00:00
Tomas Janousek
a6c048899c X.L.SubLayouts: Use ScopedTypeVariables as intended years ago
We don't need to support GHC 6.8.2 any more. :-)
2022-02-20 18:22:19 +00:00
Tomas Janousek
6a6e4bcce8 X.H.ManageDocks: Avoid unnecessary refresh (loop) for decorations
Windows created by X.U.XUtils.createNewWindow have _NET_WM_WINDOW_TYPE =
_NET_WM_WINDOW_TYPE_DESKTOP, which caused checkDock to match them and an
UpdateDocks event to be sent, causing an additional layout refresh
whenever a decoration window appeared.

This could in theory lead to a refresh loop with a layout (modifier)
that dropped and recreated its decoration windows on every
runLayout—which isn't entirely unreasonable, X.L.MouseResizableTile does
it, just luckily happens to not mark its windows as
_NET_WM_WINDOW_TYPE_DESKTOP.

In practice, such a refresh loop could be triggered when buggy
X.A.DynamicWorkspaces (before 929a6a3f6f) duplicated a Window in a
single workspace's Stack, and buggy X.L.SubLayouts then kept duplicating
the duplication (2 → 4 → 8 → …), triggering the creation of new
decoration window in each iteration.

Fixes: https://github.com/xmonad/xmonad-contrib/issues/565
2022-02-20 18:22:19 +00:00
slotThe
e98d666447 X.U.XUtils: Fix alignment in showSimpleWindow 2022-02-19 11:52:44 +01:00
Tony Zorman
ee3ea2402d Merge pull request #685 from slotThe/ezconfig-property-tests
X.U.EZConfig: Add property tests
2022-02-13 16:16:54 +01:00
slotThe
153d46fd90 tests: Add property tests for X.U.EZConfig
Adds property tests in both directions for the parser in X.U.EZConfig.
As with the tests for X.P.OrgMode, these (modulo `Maybe` noise) take the
shape of the operation of an inverse semigroup:

    pp ∘ p ∘ pp ≡ pp        and        p ∘ pp ∘ p = p,

where pp is pretty-printing and p is parsing.
2022-02-13 15:00:21 +01:00
slotThe
7d91a1bf85 X.Prelude: Improve keyToString output
The keysymToString function prints the key names in pure ASCII; e.g.,
`keysymToString 250` returns "uacute" instead of "ú".  This is
undesirable when printing these keysyms in places like visualSubmap.

Thus, move all of the key infrastructure (heh) from X.U.EZConfig to
X.Prelude and look up the name of the key if possible.  For better
composability, slightly change the signature for `regularKeys` and the
associated parser.
2022-02-13 14:49:02 +01:00
slotThe
e6b50c5dd6 X.Prelude: Concat modifier keys instead of unwording
Instead of printing "M- S- C-", print "M-S-C".
2022-02-13 14:46:23 +01:00