44 Commits

Author SHA1 Message Date
Tomas Janousek
6b20dbca42 Apply hlint 3.5 hints 2023-01-02 20:45:19 +01:00
Adam Plaice
ca866229f6 Fix most remaining broken inter-module docs links
The links were broken due to:

1. Incorrect quotes (' instead of " for module links and occasionally
vice-versa).

2. Changes in the name of the "target" module not reflected in the
"source" docs.

3. Typos to begin with.

4. Use of `<foo>` in the docs is rendered as just `foo` with a link to
`/foo`.

5. Similarly for `"Foo"` if it starts with a capital letter (and hence
could be a module).

6. Markup inside `@` code blocks still being applied.

e.g. `@M-<arrow-keys>@` is rendered as `M-arrow-keys` with a spurious
hyperlink from arrow-keys to `/arrow-keys`, which is confusing.

Three links from XMonad.Util.Run have been removed outright, since
they're no longer examples of the usage of 'runProcessWithInput'.
WmiiActions has been gone since 2008, while XMonad.Prompt.Directory
and XMonad.Layout.WorkspaceDir haven't been using
'runProcessWithInput' since 2020 and 2012, respectively.

In some cases the `<foo>` were surrounded with @, especially in the
case of key definitions, for consistency.  (This wasn't done
everywhere, because it looks ugly in the source.)

MoreManageHelpers has never been in xmonad-contrib.  ManageHelpers
seems to fill the expected role.

In the case of the module description for X.H.ManageDebug the quotes
were simply removed because none of the likely options to make the
link work were successful.
2022-11-01 19:35:55 +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
0a6048c66d X.U.EZConfig: Force readKeySequence to consume the whole input
When users specify non-existent keys, it seems most intuitive to just
abort the parse and not try to take the "longest" input that still
works.  For example, given the "key" `M-10` we should signal a parse
error (by returning `Nothing`) instead of parsing `M-1` and ignoring
the rest of the input.  The old EZConfig parser accounted for this but
when the module was rewritten to use X.U.Parser in [1], this was
forgotten about.

Fixes: https://github.com/xmonad/xmonad/issues/361

[1]: 8abeb81fd0693bd4ee914b522c0a2a2cfcfaf0dd
2022-01-05 15:06:17 +01:00
slotThe
520c51817a X.U.EZConfig: Add simple unit tests
Add very basic unit tests for EZConfig to see if it can parse all of the
keys (and key combinations) that it promises to parse.

The long-term goal here should be to write a pretty-printer for EZConfig
and to check whether that's a proper inverse (either in the normal sense
or in the inverse semigroup sense), as the tests for X.P.OrgMode do.
2021-12-13 16:11:57 +01:00
slotThe
8abeb81fd0 X.U.EZConfig: Use X.U.Parser
Using X.U.Parser works almost as a drop-in replacement for ReadP here.
In some places (like `parseSpecial`) we need to be a little bit more
careful when constructing the parser, but this is offset a much simpler
`readKeySequence`.
2021-12-13 16:11:57 +01:00
Artem Smaznov
e82a8b8849 X.U.EZConfig: Add modifier keys' KeySyms 2021-11-15 14:16:01 -05: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
Tomas Janousek
07040cbd58 Use xmessage from core
Related: https://github.com/xmonad/xmonad/pull/318
2021-08-17 10:56:14 +01:00
slotThe
bd5b969d9b Apply hlint hints
All hints are applied in one single commit, as a commit per hint would
result in 80+ separate commits—tihs is really just too much noise.

Related: https://github.com/xmonad/xmonad-contrib/issues/537
2021-06-06 18:59:05 +02:00
slotThe
2469269119 New module: XMonad.Prelude
This is a convenience module in order to have less import noise.  It
re-exports the following:

  a) Commonly used modules in full (Data.Foldable, Data.Applicative, and
     so on); though only those that play nicely with each other, so that
     XMonad.Prelude can be imported unqualified without any problems.
     This prevents things like `Prelude.(.)` and `Control.Category.(.)`
     fighting with each other.

  b) Helper functions that don't necessarily fit in any other module;
     e.g., the often used abbreviation `fi = fromIntegral`.
2021-05-13 17:44:47 +02:00
slotThe
226b385729 X.U.EZConfig: Simplify removeKeys, removeMouseBindings
We're not parsing anything (as opposed to the respective `P` functions)
and so there's no need to create a dummy map with units as values and
then take the difference; we can simply remove the relevant keys from
the map.
2021-04-24 09:23:02 +02:00
Robbie Harwood
04ccc4d972 EZConfig: Learn about XF86Bluetooth 2020-07-22 16:14:38 -04:00
Martin Zeller
abfeff5db7
Export EZConfig parsers 2020-06-22 13:01:48 +02:00
Brent Yorgey
057af44998 X.U.EZConfig: include Latin1 keys 2017-03-26 22:02:48 -05:00
Amaury Gauthier
2831378f8f Fix type of additionalKeys and removeKeys functions 2016-06-08 00:35:25 +02:00
Adam Vogt
c115650d0d add XF86AudioMicMute to EZConfig (#582) 2014-12-22 04:53:06 +00:00
Daniel Wagner
daa2731d3d eliminate references to defaultConfig 2013-05-28 00:58:25 +00:00
Adam Vogt
c00dd7b51b U.EZConfig allow removing more than one mouse binding. 2011-09-23 12:39:07 +00:00
Daniel Schoepe
f27e89a2ff Add XF86TouchpadToggle to the list of multimedia keys in X.U.EZConfig 2011-09-17 15:14:19 +00:00
Brent Yorgey
9e5a712929 fix warnings in X.U.EZConfig 2011-09-08 13:32:46 +00:00
Daniel Wagner
8705542d1d bugfix: removeKeys should remove all keys in the provided list 2010-03-27 19:25:41 +00:00
Adam Vogt
65d1309cf1 Bypass more of stringToKeysym in U.Paste 2009-11-14 22:37:26 +00:00
Wirt Wolff
f98c0c83a1 U.EZConfig: Correct additionalKeysP M2-M5 values
Was 8,9,10,11,12 rather than needed 8,16,32,64,128
2009-09-06 07:05:03 +00:00
Adam Vogt
d13dc2ff48 U.NamedActions: align the descriptions for each section, refactor its integration with EZConfig 2009-07-26 03:20:03 +00:00
Adam Vogt
a3ba5f1503 Add U.NamedActions: present a list of keybindings including submaps 2009-05-04 02:40:17 +00:00
Adam Vogt
cc84480c99 Correct many typos in the documentation, consistent US spellingg 2009-06-18 00:37:29 +00:00
wirtwolff
15217548ab U.EZConfig: add xK_Print <Print> to special keys
Many setups are expecting xK_Print rather than
xK_Sys_Req, so make it available in additionalKeysP.
2009-03-02 23:07:41 +00:00
Joachim Breitner
b66d1aae33 minor typo in XMonad/Util/EZConfig.hs 2009-02-08 19:22:24 +00:00
Khudyakov Alexey
07793c1bc3 Multimedia keys support for EZConfig 2009-02-07 17:33:30 +00:00
Brent Yorgey
22ea09d747 X.U.EZConfig: expand documentation 2009-01-16 15:31:43 +00:00
brian
2dc1b0c5f7 allow function keys up to F24 2008-06-26 04:05:16 +00:00
Lukas Mai
1c18687ec4 XMonad.Util.EZConfig: add keypad bindings 2008-06-15 14:37:02 +00:00
Lukas Mai
4dc9baca48 XMonad.Util.EZConfig: minor cleanups 2008-05-28 16:54:50 +00:00
Brent Yorgey
5acc881930 EZConfig: add documentation and a warning, so no one repeats my silly hard-to-track-down mistake. 2008-03-11 17:26:10 +00:00
Brent Yorgey
40b636aea5 EZConfig: additional documentation 2008-02-27 16:46:02 +00:00
Brent Yorgey
3cbddabe3d EZConfig: add an emacs-style keybinding parser!
Now, instead of writing out incredibly dull things like

  ((modMask conf .|. controlMask .|. shiftMask, xK_F2), ...)

you can just write

  ("M-C-S-<F2>", ...)

Hooray!
2008-02-26 22:27:23 +00:00
Spencer Janssen
4f7764ca8b Prune more imports 2007-12-07 23:51:16 +00:00
Shachaf Ben-Kiki
6302d0b0b9 Miscellaneous spell-checking 2007-11-18 23:03:19 +00:00
Andrea Rossato
622ddfc38b EZConfig.hs: haddock fixes 2007-11-14 19:11:09 +00:00
"Valery V. Vorotyntsev"
20e92a5d40 CustomKeys.hs: moved into `Util' directory
I still wonder why do we need all those configuration examples. :)
2007-11-14 15:34:18 +00:00
Devin Mullins
5f6a80ca7a fix EZConfig documentation 2007-11-14 12:04:42 +00:00
Spencer Janssen
25849e68e0 EZConfig: update for kind change in XConfig 2007-11-11 21:53:14 +00:00
Devin Mullins
a96b55ecfe add helper module for writing configs
Looking for suggestions on this module. Does it belong here? Is there a better
name? Should the additional* functions pass the modMask to their second
argument? etc.
2007-11-11 07:52:22 +00:00