Commit Graph

3816 Commits

Author SHA1 Message Date
Yecine Megdiche
8ef05975c7 X.H.DynamicIcons: Add X.H.StatusBar support 2021-10-05 21:45:42 +02:00
Yecine Megdiche
f470f18cf0 X.H.DynamicIcons: tweak docs example 2021-10-04 18:03:58 +02:00
slotThe
9ff7f89664 Merge pull request #608 from slotThe/ez-prefix
X.A.Prefix: Use EZConfig parser for usePrefixKey
2021-10-04 16:33:40 +02:00
slotThe
82f0a7ad57 X.A.FloatKeys: Use Int for offset deltas
So far, we have used the `D` tuple, as defined in X.Operations, for
these.  However, `D` uses `Word32` for its components, which are not
supposed to carry negative values.

Fixes: https://github.com/xmonad/xmonad-contrib/issues/578
2021-10-03 17:35:07 +02:00
slotThe
967cc9a869 X.A.FloatKeys: Use fi
Instead of fromIntegral, use the somewhat more concise and often used fi
alias.
2021-10-03 17:24:54 +02:00
slotThe
30c139e298 X.A.Prefix: Use EZConfig parser for usePrefixKey
Utilise EZConfig's Emacs style syntax for entering the prefix key.

The syntax has been well-established for use in configuration files;
especially in this case it can be a bit awkward having to specify a
function that takes a config just for a single keybinding.
2021-10-03 08:55:31 +02:00
slotThe
3058d1ca22 Merge pull request #609 from slotThe/fun-with-descriptions
Add Description string to modules
2021-09-30 15:10:07 +02:00
slotThe
38c11c1e3c Add "Description" field to module headers
Fixes: https://github.com/xmonad/xmonad-contrib/issues/592
2021-09-26 14:15:54 +02:00
slotThe
4d1f76f7d8 X.D.Extending: Add missing modules
X.D.Extending claims to index all of the contrib library, but this was
not really the case.  While most modules where indeed indexed, some
notable ones were missing from this list.  Since we're pointing users to
this quite prominently, this is something that needs to be fixed.
2021-09-26 14:14:44 +02:00
slotThe
20fdcbad01 Merge pull request #606 from alternateved/remove-outdated-search-engines
* X.A.Search: Update/Remove outdated URLs, add GitHub

  - The `codesearch`, `openstreetmap`, and `thesaurus` searches were
    using old URLs; update those.
  - Remove the now defunct isoHunt serach.
  - Add a search for GitHub.

* X.A.Search: Change http to https
2021-09-23 12:30:00 +02:00
slotThe
7f49fe3b4d X.A.Search: Change http to https
It really is time.
2021-09-23 12:16:29 +02:00
alternateved
732a3b6e75 X.A.Search: Update/Remove outdated URLs, add GitHub
- The `codesearch`, `openstreetmap`, and `thesaurus` searches were
    using old URLs; update those.
  - Remove the now defunct isoHunt serach.
  - Add a search for GitHub.
2021-09-23 12:16:29 +02:00
slotThe
948c048832 Merge pull request #602 from ssbothwell/master
X.A.WithAll: Add killOthers
2021-09-22 16:51:51 +02:00
Solomon Bothwell
7a2001cfa2 X.A.WithAll: Add killOthers
This adds the function `killOthers`, which kills all unfocused windows
on the current workspace.

As discussed in the PR itself [1], the module suffix `WithAll` is not
quite optimal at this point, as we are acting on window _groups_ and not
necessarily just all window on a workspace.  However, in order to keep
this commit atomic, this consideration is postponed until another day.

[1]: https://github.com/xmonad/xmonad-contrib/pull/602
2021-09-22 16:45:37 +02:00
slotThe
0c6fdf4e75 Merge pull request #601 from ssbothwell/feature/custom-xmonad-prompt-title
Add custom title to xmonad prompts
2021-09-09 21:49:37 +02:00
Solomon Bothwell
b79fbf6975 X.P.XMonad: Add xmonadPromptCT
Currently when creating an XMonad Prompt one is stuck with "XMonad:" as
the title for the prompt.  However, sometimes it is nice to be able to
create a prompt with custom commands that has a particular title.

This changes the internals of X.P.XMonad to facilitate this and adds
xmonadPromptCT as a user facing function.
2021-09-09 21:43:43 +02:00
slotThe
81339f2044 Merge pull request #598 from slotThe/spacing-docs
Update X.L.Spacing documentation
2021-08-30 10:48:02 +02:00
slotThe
34af6ebed1 X.L.Spacing: Extend documentation
Users are having trouble with this module all the time.  Now that
certain helper functions are undeprecated, we should tell users how they
may use them.  It is also worth explaining the scary-looking
`spacingRaw` command a bit further.

Related: https://github.com/xmonad/xmonad-contrib/pull/597
2021-08-29 10:10:49 +02:00
slotThe
4a63999df6 X.L.Spacing: Reorder export list 2021-08-29 10:03:01 +02:00
slotThe
64e67d5749 CHANGES.md: Mention X.L.Spacing undeprecations
Related: https://github.com/xmonad/xmonad-contrib/pull/597
2021-08-29 10:03:01 +02:00
slotThe
d8f4f841a0 X.L.Spacing: Remove link to backwards compatibility section
This has been removed already, so remove the link and move the
undeprecated functions out of there.

Related: https://github.com/xmonad/xmonad-contrib/pull/597 (cadb178819)
2021-08-29 09:37:28 +02:00
slotThe
04eadeb5ed Merge pull request #597 from IvanMalison/unDeprecateSpacingFunctions
Undeprecate spacing convenience functions
2021-08-28 10:49:21 +02:00
Ivan Malison
cadb178819 Undeprecate spacing convenience functions
These should be undeprecated for several reasons:

  - The suggestion to use spacingRaw is pretty ridiculous; the interface
    to spacingRaw is very general and flexible, which is great, but I
    think that most people probably do not need all of that flexibility,
    and one of these convenience functions may suit their needs better.

  - There is precendent for having convenience functions like
    these (like X.L.Magnifier)

These were deprecated in a rewrite to make X.L.Spacing support a
non-uniform border length, but from a usability perspective wrappers
should always be preferred to such a general interface with rather shaky
documentation.

Related: https://github.com/xmonad/xmonad-contrib/pull/243 (2c53d507ee)
2021-08-28 10:45:00 +02:00
slotThe
04713d2e9c Merge pull request #596 from slotThe/logTitlesOnScreen
X.U.Loggers: Add `logTitlesOnScreen`
2021-08-19 08:40:01 +02:00
slotThe
0935fd26e0 Update CHANGES.md: Add logTitlesOnScreen 2021-08-18 08:05:14 +02:00
slotThe
1cab211bf0 X.U.Loggers: Add logTitlesOnScreen
This works like logTitles, but gets an explicit screen to log the window
titles on.  This may be useful when having status bars for each screen
that show all windows on their respective visible workspaces.
2021-08-17 12:26:34 +02:00
Tomáš Janoušek
a9ad56be11 Merge pull request #585 from liskin/xmessage
Use xmessage from core
2021-08-17 11:01:29 +01:00
Tomas Janousek
07040cbd58 Use xmessage from core
Related: https://github.com/xmonad/xmonad/pull/318
2021-08-17 10:56:14 +01:00
Tomas Janousek
8d557c6954 github: Drop FUNDING.yml
Replaced with https://github.com/xmonad/.github/blob/main/FUNDING.yml,
which points to xmonad's funding platforms instead of mine.

Related: https://github.com/xmonad/xmonad/pull/295
Related: https://github.com/xmonad/xmonad-contrib/pull/544
2021-08-15 22:29:27 +01:00
Tomas Janousek
89ecfe72a1 ci: Hackage release automation
Tested on https://github.com/xmonad/X11/releases/tag/1.10.1 so we can
deploy this here as well now.

Related: https://github.com/xmonad/xmonad/pull/308
Related: https://github.com/xmonad/xmonad-contrib/issues/393
2021-08-15 17:37:22 +01:00
slotThe
fa00fad1d9 Merge pull request #594 from IvanMalison/windowBringerFilter
X.A.WindowBringer: Add a filter function to config
2021-08-15 17:32:34 +02:00
slotThe
ee40542cb8 X.P.OrgMode: Allow specifying home dir starting with ~
It is already possible to "start" from $HOME by specifying a relative
directory (one starting without a starting slash).  However, it is often
nice to be explicit about this by writing `~/' directly—support this.
2021-08-15 17:04:21 +02:00
Ivan Malison
09b1dc1a6e X.A.WindowBringer: Add a filter function to config 2021-08-15 17:01:26 +02:00
slotThe
5417969522 X.P.OrgMode: Update documentation
Fix spelling mistakes, as well as make the existing documentation a
little bit more accurate in places.
2021-08-15 16:34:41 +02:00
Tomáš Janoušek
b4a13e6b1b Merge pull request #119 from IvanMalison/query_toggle_state
X.L.MultiToggle: Add function to query toggle state
2021-08-13 01:26:04 +01:00
Ivan Malison
3e83068e0a X.L.MultiToggle: Add function to query toggle state 2021-08-13 01:25:03 +01:00
Yecine Megdiche
a03d58cf6a Merge pull request #474 from TheMC47/fixed-aspect-ratio
New layout modifier: XMonad.Layout.FixedAspectRatio
2021-08-11 12:21:03 +01:00
Yecine Megdiche
b6b6616400 Added XMonad.Layout.FixedAspectRatio
Layout modifier for user provided per-window aspect ratios.
2021-08-11 13:15:21 +02:00
slotThe
efcc424c98 Merge pull request #587 from slotThe/fix-orgmode-parser
X.P.OrgMode: Fix behaviour of getLast
2021-08-11 07:16:52 +02:00
slotThe
e4b8b1f6f2 Tests: Add tests for OrgMode regressions
Add regression tests to make sure we keep the behaviour fixed by
97aeaf11c10a0f38b4cd1df4726a10bb9188f4ca.

Related: https://github.com/xmonad/xmonad-contrib/issues/584
2021-08-11 07:11:54 +02:00
slotThe
b42303aa6f X.P.OrgMode: Fix behaviour of getLast
So far, while parsing strings like "<ptn><more-letters>", the `getLast`
function immediately stopped on strings of the form "<ptn><whitespace>".
This may be a bit confusing given the functions name.  Strings of
the—perhaps artificial—form

    "a +d f 1 +d f 2"

would be cut short and parsed as

    Deadline "a" (Time { date = Next Friday, tod = Just 01:00 })

instead of the more intuitive

    Deadline "a +d f 1" (Time { date = Next Friday, tod = Just 02:00 }).

This is readily fixed by applying the `go` parser as often as possible,
only returning the longest list, and then pruning eventual leftovers at
the end of the string.  Since we were already invoking `dropWhileEnd` to
trim whitespace before, the added `reverse`s should not impact
performance at all.

Fixes: https://github.com/xmonad/xmonad-contrib/issues/584
2021-08-11 07:11:54 +02:00
Yecine Megdiche
e1a2bad168 Export placeRectangle 2021-08-09 12:06:19 +02:00
Tomáš Janoušek
8fab380724 Merge pull request #580 from IvanMalison/add-nix-flake
Add a flake.nix file
2021-08-09 10:57:21 +01:00
Ivan Malison
7402a7c250 Use "nix develop -c cabal v2-build -O0" to speed up the workflow
With "nix build", just the build of xmonad-contrib itself takes 3
minutes (it builds twice, the second build with profiling enabled), so
it ends up being almost 6 minutes in total, making this workflow the
slowest one.
2021-08-09 10:50:10 +01:00
Ivan Malison
7c7ff1fabd Add workflow for testing nix flake 2021-08-09 10:46:15 +01:00
Ivan Malison
3e43315def Add a flake.nix file 2021-08-09 10:46:15 +01:00
Tomáš Janoušek
6f0b9e3142 Merge pull request #577 from liskin/focus-under-pointer
X.A.UpdateFocus: Add focusUnderPointer
2021-08-09 10:20:41 +01:00
Tomas Janousek
fefebd56b2 X.A.UpdateFocus: Add focusUnderPointer
Some people like their mouse pointer to move when changing focus with
the keyboard, other people like their pointer to stay and focus to
follow. xmonad(-contrib) supports both preferences, but imperfectly:
The former requires using the XMonad.Actions.UpdatePointer contrib
module, the latter (focusFollowsMouse) only reacts to CrossingEvent; the
focus isn't updated after changing workspaces or layouts.

This adds an inverse of XMonad.Actions.UpdatePointer.updatePointer that
immediately updates the focus instead.

Fixes: https://github.com/xmonad/xmonad/issues/108
2021-08-09 10:20:00 +01:00
Tomáš Janoušek
78373349c2 Merge pull request #586 from liskin/submap-sync
X.A.Submap, X.U.Ungrab: Sync after ungrab (fixes issues with runProcessWithInput)
2021-08-09 10:12:44 +01:00
Tomas Janousek
91995df559 X.A.Submap, X.U.Ungrab: Sync after ungrab (fixes issues with runProcessWithInput)
When `runProcessWithInput` is invoked immediately after
`ungrabPointer`/`ungrabKeyboard`, we don't actually ungrab at all
because `runProcessWithInput` blocks and the ungrab requests wait in
Xlib's queue for a requests that needs a queue flush.

Common uses of `unGrab` (before `spawn`) aren't followed by a blocking
action, so the ungrab requests are flushed by xmonad's main loop, and
this is merely a timing issue—fork/exec takes a while and xmonad
probably manages to get back to its main loop in time. Uses of
`runProcessWithInput` in ordinary non-submap key bindings happen to work
because key bindings are passive grabs—the grab is released by the
user's fingers releasing the key itself, even if xmonad's ungrab
requests are stuck in a blocked queue. Submap key bindings, however,
take an active grab and therefore need to ungrab explicitly.

Easy fix—explicit `sync`.

Fixes: https://github.com/xmonad/xmonad/issues/313
2021-08-08 16:05:49 +01:00