Commit Graph

3862 Commits

Author SHA1 Message Date
Tomas Janousek
860f80a6d3 X.H.Focus: Adapt docs to the new activation interface
Fixes: https://github.com/xmonad/xmonad-contrib/issues/396
Related: https://github.com/xmonad/xmonad-contrib/pull/192
Related: https://github.com/xmonad/xmonad-contrib/pull/128
2021-10-20 14:51:23 +01:00
Tomas Janousek
79b130b9d6 Add some docs references for workspace filtering 2021-10-20 14:51:23 +01:00
Tomas Janousek
08ec79eec1 X.H.EwmhDesktops: Improve interface for hooking window activation
https://github.com/xmonad/xmonad-contrib/pull/192 introduced a breaking change:

  * `XMonad.Hooks.EwmhDesktops`

    `ewmh` function will use `logHook` for handling activated window. And now
    by default window activation will do nothing.

This breaking change can be avoided if we designed that a bit
differently. #192 changed `ewmhDesktopsEventHook` to invoke `logHook`
instead of focusing the window that requested activation and now
`logHook` is supposed to invoke a `ManageHook` through `activateLogHook`
which consults a global `NetActivated` extensible state to tell if it's
being invoked from `ewmhDesktopsEventHook`. This seems convoluted to me.

A better design, in my opinion, is to invoke the `ManageHook` directly
from `ewmhDesktopsEventHook`, and we just need a way to configure the
hook. Luckily, we now have `X.U.ExtensibleConf` which makes this
straightforward. So we now have a `setEwmhActivateHook`, and the
activation hook defaults to focusing the window, undoing the breaking
change.

Fixes: https://github.com/xmonad/xmonad-contrib/issues/396
Related: https://github.com/xmonad/xmonad-contrib/pull/110
Related: https://github.com/xmonad/xmonad-contrib/pull/192
Related: https://github.com/xmonad/xmonad-contrib/pull/128
2021-10-20 14:51:23 +01:00
Tomas Janousek
3175f276be X.A.WorkspaceNames: Adapt EwmhDesktops integration to the new interface
Related: https://github.com/xmonad/xmonad-contrib/pull/105
Related: https://github.com/xmonad/xmonad-contrib/pull/122
Related: f271d59c34 ("X.A.WorkspaceNames: Provide workspaceListTransform for EwmhDesktops")
2021-10-20 14:50:17 +01:00
Tomas Janousek
fe933c3707 X.H.EwmhDesktops: Improve interface for custom workspace sorting, filtering and renaming
Now that we have `XMonad.Util.ExtensibleConf`, users can comfortably use
the `ewmh` combinator and still customize workspace ordering, filter out
scratchpads and expose altered workspace names.

To make this all work nicely, we introduce not one, but two
configuration options: a sort/filter function and a rename function.
This is because renaming and sorting in one go makes it hard (perhaps
even impossible) to decide which workspace to switch to upon receipt of
a _NET_CURRENT_DESKTOP request from a pager or wmctrl/xdotool. (The only
reason this wasn't a problem before is because one could pass the
renaming function to `ewmhDesktopsLogHookCustom` only, not
`ewmhDesktopsEventHookCustom`, which is a confusing hack as can be seen
in the related closed pull requests.)

Related: https://github.com/xmonad/xmonad-contrib/pull/238
Related: https://github.com/xmonad/xmonad-contrib/pull/105
Related: https://github.com/xmonad/xmonad-contrib/pull/122
2021-10-20 14:50:17 +01:00
Tomas Janousek
6b9520b03b X.H.EwmhDesktops: Mostly cosmetic, mostly docs cleanups 2021-10-20 14:48:41 +01:00
Tomas Janousek
6358683058 X.H.UrgencyHook: Add askUrgent and doAskUrgent
These are useful when one blocks some _NET_ACTIVE_WINDOW requests but
still wants to somehow show that a window requested focus.

Related: https://github.com/xmonad/xmonad-contrib/pull/110
Related: https://github.com/xmonad/xmonad-contrib/pull/128
Related: https://github.com/xmonad/xmonad-contrib/pull/192
2021-10-20 14:46:52 +01:00
Tomas Janousek
3a72dd5355 X.U.ExtensibleConf: Add high-level idioms for non-Semigroup, but Default types
For configuration values that don't compose well using a Semigroup
instance, provide a high-level API allowing arbitrary modification of
the value, taking its Default if absent. This API is only usable for
separate configuration data and cannot be used to guard addition of hook
using `once`.
2021-10-20 14:46:52 +01:00
Tomas Janousek
3dbdc51158 X.U.ExtensibleConf: Perform 'add' before modifying in once(M)
This better matches the documentation.

It is still, however, considered bad practice to rely on the order of
these operations. `f` isn't meant to touch any extensible configuration.
If it happens to do so anyway, it no longer loops. :-)
2021-10-19 22:57:50 +01:00
Yecine Megdiche
e0c7e35b3d Merge pull request #613 from TheMC47/update-dynamiclog-docs
Update `X.H.DynamicLog` references
2021-10-19 21:54:01 +02:00
slotThe
8e0e8a605d X.A.Search: Make (!>) right associative
Unless specified otherwise, operators in Haskell associative to the
left.  However, the ergonomics of (!>) heavily lean towards the left
operand being a "single" search engine, not a combined one.

This causes trouble when not using `multi` or defining search engines
with a right fold, but (following the documentation) writing something
like

    multiEngine = intelligent (wikipedia !> mathworld !> (prefixAware google))

instead.  This particular definition would force the user to write
`wikipedia/mathworld:wikipedia:search-term` instead of just
`wikipedia:search-term` to access the first search engine.

Simply giving (!>) an explicit associativity fixes these problems.
2021-10-19 18:48:47 +02:00
Yecine Megdiche
53adf02b38 X.A.Prefix: Update X.H.DynamicLog references 2021-10-19 07:56:11 +02:00
Yecine Megdiche
a5b335469a Update X.H.DynamicLog references 2021-10-19 07:56:11 +02:00
Yecine Megdiche
8defd7f4c8 xmonadpropread.hs: Update X.H.DynamicLog references 2021-10-19 07:56:11 +02:00
Yecine Megdiche
c2f45b49ff X.A.WorkspaceNames: Update X.H.DynamicLog references 2021-10-19 07:56:11 +02:00
Yecine Megdiche
45a07b0e1b X.U.L.NamedScratchpad: Update X.H.DynamicLog references 2021-10-19 07:56:11 +02:00
Yecine Megdiche
8b3ed5224a X.U.WorkspaceCompare: Update X.H.DynamicLog references 2021-10-19 07:56:11 +02:00
Yecine Megdiche
2cbb342adc X.A.DynamicWorkspaceOrder: Update X.H.DynamicLog references 2021-10-19 07:56:11 +02:00
Yecine Megdiche
74f3b6206f X.H.DynamicBars: Deprecate in favor of X.H.StatusBar 2021-10-19 07:56:11 +02:00
Yecine Megdiche
76bab07eb9 X.A.WindowNavigation: Added bind example 2021-10-19 07:56:11 +02:00
Yecine Megdiche
6ca1e334eb X.U.Loggers: Update X.H.DynamicLog references 2021-10-19 07:56:11 +02:00
Yecine Megdiche
0e3001681d X.U.NamedScratchpad: Update X.H.DynamicLog references 2021-10-19 07:56:11 +02:00
Yecine Megdiche
3f2210206f X.L.IndependentScreens: Update X.H.DynamicLog references 2021-10-19 07:56:11 +02:00
Yecine Megdiche
9151492c6e X.U.Loggers: Update X.H.DynamicLog references 2021-10-19 07:56:11 +02:00
Yecine Megdiche
5e7085661e X.H.FloatNext: Update X.H.DynamicLog references 2021-10-19 07:56:11 +02:00
Yecine Megdiche
cfe7533c42 X.H.UrgencyHook: Update X.H.DynamicLog references 2021-10-19 07:56:11 +02:00
Yecine Megdiche
ac6705a144 X.A.WorkspaceCursors: Update X.H.DynamicLog references 2021-10-19 07:56:11 +02:00
Yecine Megdiche
6ddde878ec X.L.LayoutModifier: Update X.H.DynamicLog reference 2021-10-19 07:56:11 +02:00
Yecine Megdiche
2932a8e2f8 X.H.ToggleHook: Update X.H.DynamicLog references 2021-10-19 07:56:11 +02:00
Yecine Megdiche
7ec3a4e034 X.A.TopicSpace: Update X.H.DynamicLog references 2021-10-19 07:56:11 +02:00
Tomas Janousek
586416b0f9 X.H.Rescreen: XConfig (a ⇒ l)
It's a layout, `a` is misleading.
2021-10-18 10:30:41 +01:00
Tomas Janousek
087526dee3 X.H.Rescreen: Fix typo in haddocks 2021-10-18 10:30:41 +01:00
Tomas Janousek
0de958e09c X.H.Rescreen: import X.Prelude
A race condition between merging the Prelude PR and the Rescreen PR. :-)
2021-10-18 10:30:41 +01:00
brandon s allbery kf8nh
fa3536b40b Merge pull request #624 from alternateved/add-usage-section
X.H.DynamicProperty: Add usage section
2021-10-14 13:50:09 -04:00
alternateved
ab98b40034 Add X.H.DynamicProperty usage section 2021-10-14 19:28:33 +02:00
Yecine Megdiche
50996809aa Merge pull request #623 from alternateved/fix-missing-information
X.A.CycleWS: Fix missing type names in documentation
2021-10-14 18:02:59 +02:00
alternateved
2a9ccf3002 X.A.CycleWS: Fix names in example 2021-10-14 17:57:00 +02:00
Tomáš Janoušek
5085e72217 Merge pull request #622 from alternateved/fix-missing-export
X.A.Search: Fix missing export
2021-10-13 20:38:39 +02:00
alternateved
374293c179 Fix missing export 2021-10-13 19:23:40 +02:00
Tomáš Janoušek
3b4a262658 Merge pull request #621 from slotThe/dynamic-workspaces-nub
X.A.DynamicWorkspaces: Remove duplicates when melding
2021-10-13 16:51:05 +02:00
slotThe
bb5b64a198 Update CHANGES.md: Fix X.A.DynamicWorkspaces freeze 2021-10-13 14:29:56 +02:00
slotThe
929a6a3f6f X.A.DynamicWorkspaces: Remove duplicates when melding
When removing a workspace and distributing its windows, it's important
to remove any duplicates that may be there due to, for example, usage of
X.A.CopyWindow.  X will only draw one of these window, leading to some
artifacts.

Related: https://github.com/xmonad/xmonad-contrib/issues/565

Co-authored-by: Tomas Janousek <tomi@nomi.cz>
2021-10-13 12:05:52 +02:00
slotThe
f821a2ec0c Merge pull request #617 from slotThe/runorraise-dir-exe
X.P.RunOrRaise: Disambiguate directories and executables
2021-10-11 20:42:59 +02:00
slotThe
5bdc5993f9 X.P.RunOrRaise: Disambiguate directories and executables
When there is a directory and a file in $PATH of the same name `foo`, we
display `foo`, as well as `foo/` in the prompt, but selecting either one
of them will invariably run or raise the directory, as this test is done
beforehand.

Since directories already carry a trailing forward slash from the shell
prompt's `getShellCompl`, this is easily disambiguated by incorporating
an additional check.

It is duly noted that the same problem also exists for files in the
current directory.  This could be fixed in a similar way (adding a
unique suffix to files and checking for that), but since this would
involve changing `getShellCompl` and no-one has complained about this so
far, it was deemed "not worth it" for now.

Fixes: https://github.com/xmonad/xmonad-contrib/issues/616
2021-10-11 20:41:57 +02:00
Tomáš Janoušek
b331821275 Merge pull request #618 from aartamonau/master
EwmhDesktops: Advertise _NET_WM_STATE_DEMANDS_ATTENTION.
2021-10-10 11:09:37 +02:00
Aliaksey Artamonau
2b1febb40b EwmhDesktops: Advertise _NET_WM_STATE_DEMANDS_ATTENTION.
XMonad.Hooks.UrgencyHook knows how to understand this hint, but it's
not advertised as supported via _NET_SUPPORTED. This prevents certain
applications (e.g. kitty terminal emulator) from using it.
2021-10-09 16:12:04 -07:00
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