4107 Commits

Author SHA1 Message Date
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
Yecine Megdiche
8b2594a526 New Module: XMonad.Util.Grab
Based on the draft by L. S.
Leary.  (https://gist.github.com/LSLeary/6741b0572d62db3f0cea8e6618141b2f).
2022-06-28 22:27:29 +02:00
brandon s allbery kf8nh
6e1a1fe0df
Stray def in additionalNav2DKeysP documentation 2022-06-24 19:47:14 -04:00
Tony Zorman
4287bab252 XMonad.Util.Run: Add quote
This is quite convenient in arguments; e.g.,

    progn [ "fun1" <> asString "string"
          , "fun2" <> quote "symbol"
          ]
2022-06-22 17:23:45 +02:00
Tony Zorman
2643528945
Merge pull request #725 from emptyflask/emptyflask/centered-if-single
CenteredIfSingle allow resizing in both dimensions
2022-06-21 13:22:29 +02:00
Jon Roberts
accea5b1d8 X.L.CenteredIfSingle: Allow specifying ratio in both dimensions
While monitors are, more often than not, wider than they are high,
specifying a ratio in the vertical direction can also make sense; e.g.,
when flipping a monitor by 90 degrees.  Thus, we should definitely
support both.
2022-06-21 13:16:50 +02:00
Tomas Janousek
0d5a952035 ci: Prevent scheduled workflows from being auto-disabled by GitHub 2022-06-19 17:14:24 +01:00
brandon s allbery kf8nh
f998cc2d2e Complete #708 by updating _NET_SUPPORTED. 2022-05-29 20:24:47 -04:00
Tony Zorman
a88d6328fe
Merge pull request #718 from slotThe/spawn-external
Extend X.U.Run with an EDSL for spawning processes
2022-05-24 08:18:57 +02:00
Tony Zorman
b6be0dca40 X.U.Run: Add examples to Haddocks 2022-05-23 20:12:57 +02:00
Tony Zorman
e466d9b1dc X.Prelude: Add mkAbsolutePath 2022-05-23 20:12:57 +02:00
Tony Zorman
473dc41afb X.U.Run: Improve and add documentation
This adds documentation for the new EDSL, as well as small fixes to
existing docs.

Importantly, I've added myself as a maintainer of the file (even though
we don't really care about this at this point) and updated the
copyright; the changes seem large enough to warrant this.
2022-05-23 20:12:57 +02:00
Tony Zorman
2b48f3ff09 X.U.Run: Add an EDSL to spawn external programs
Extend X.U.Run with an EDSL for spawning (external) processes.  For
example:

    do url <- getSelection  -- from XMonad.Util.XSelection
       proc $ inEmacs
          >-> withEmacsLibs [ElpaLib "dash", ElpaLib "s", OwnFile "arXiv-citation"]
          >-> asBatch
          >-> execute (elispFun $ "arXiv-citation" <> asString url)

is essentially equivalent to (line breaks mine)

    /usr/bin/sh -c "emacs -L /home/slot/.config/emacs/elpa/dash-20220417.2250
                          -L /home/slot/.config/emacs/elpa/s-20210616.619
                          -l /home/slot/.config/emacs/lisp/arXiv-citation.el
                          --batch
                          -e '(arXiv-citation \"<url-in-the-primary-selection>\")'"
2022-05-23 20:11:29 +02:00
brandon s allbery kf8nh
67243cbf7c
the rest of the fix for #719
It's just two more exports.
2022-05-08 09:27:56 -04:00
brandon s allbery kf8nh
41674386a6
Export shrinkText
Closes #719.
(This being a trivial one-line change and the description being already bigger than the change, I'm committing it directly.)
2022-05-08 09:06:18 -04:00
Tony Zorman
616222c9f0 stack: Bump default resolver to 19.6
No impact on CI, just makes it easier for contributors to use the latest
9.0 GHC.
2022-05-07 09:39:19 +02:00
Tony Zorman
21e613e242
Merge pull request #717 from Pachin0/desktop-viewport
X.H.EwmhDesktops: Add `_NET_DESKTOP_VIEWPORT` support
2022-05-06 08:51:33 +02:00
Jose Antonio Martinez Vidaurre
2291d3a009 X.H.EwmhDesktops: Add _NET_DESKTOP_VIEWPORT support
Some panels—such as polybar—require _NET_DESKTOP_VIEWPORT support in
order to know which workspace is on which monitor.  They are then able
to only show workspaces defined on the same output as the bar with just
X11 properties.

Fixes: https://github.com/xmonad/xmonad-contrib/issues/708
2022-05-06 08:12:13 +02:00
Tony Zorman
6c787204aa Update my name 2022-05-05 21:07:27 +02:00
Tony Zorman
4a982e54c9
Merge pull request #711 from LSLeary/flake-module
Apply Patch in Nix Flake; Enable Configuration (Contrib Edition)
2022-05-04 20:53:31 +02:00
L. S. Leary
6ab69e97d3 NIX.md: Document the NixOS modules provided by the core and contrib flakes.
flake.nix: Assume maintainership.
2022-05-04 19:20:13 +12:00
Tony Zorman
0e14e13845
Merge pull request #716 from johnli360/master
Replace <+> with <>
2022-05-02 17:52:01 +02:00
John Lind
a7fd31d233 Replace <+> with <> 2022-05-02 08:28:36 +02:00
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