733 Commits

Author SHA1 Message Date
slotThe
280c1a8ed5 X.H.WorkspaceHistory: Fix hlint nits, strictness
There is no reason why the used maps should not be strict, as we are
definitely traversing.
2021-03-21 08:00:44 +01:00
Tomáš Janoušek
ab60361c5b
Merge pull request #487 from slotThe/old-time->time
Use time instead of old-time and old-locale
2021-03-21 00:02:12 +00:00
slotThe
94f1e943d4 Use time instead of old-time and old-locale
Get rid of these deprecated libraries, as the new `time' library
provides a strict superset of the functionality of `old-time' and
`old-locale'.
2021-03-20 16:14:26 +01:00
Tomas Janousek
e91b0fef82 X.A.WorkspaceNames, X.L.IndependentScreens, X.U.ClickableWorkspaces: Use ppRename
Also, drop now useless integrations from X.U.ClickableWorkspaces:
workspaceNamesPP, marshallPP and clickablePP can now be composed
directly using >>= and it just works.

Related: https://github.com/xmonad/xmonad-contrib/pull/390
Related: https://github.com/xmonad/xmonad-contrib/pull/462
2021-03-17 11:53:44 +00:00
Tomas Janousek
9451d81427 Apply two xmonad core fixes to float moving/resizing in various contrib modules
This applies fixes from
4565e2c90e
and
b9ce5b034b.

tl;dr:
When dragging, refloat and refresh to fix https://github.com/xmonad/xmonad/issues/63.
When starting dragging, raising the window is then unnecessary, and
removing it fixes https://github.com/xmonad/xmonad/issues/208.
Also remove unnecessary raises for keyboard moving/resizing which always
refloated the window.

Fixes: https://github.com/xmonad/xmonad/issues/63
Fixes: https://github.com/xmonad/xmonad/issues/208
2021-02-16 12:23:28 +00:00
Tomas Janousek
c37737bf73 Add missing ppVisibleNoWindows to workspaceNamesPP, marshallPP, clickableRenamedPP
The ppVisibleNoWindows was added in #241 but none of the modules that
rename/mangle workspace names were updated (or didn't exist at the
time). This fixes this.

Related: https://github.com/xmonad/xmonad-contrib/pull/241
Related: 670eb3bc605b ("Added pretty printer for empty visible workspaces")
2021-02-04 16:01:19 +00:00
Tomáš Janoušek
000590fa62
Merge pull request #453 from slotThe/default->def
Remove last occurences of non Data.Default defaults
2021-01-28 21:48:25 +01:00
slotThe
227a3e0aa5 X.A.TreeSelect: Deprecate tsDefaultConfig
Replace with Data.Default.def, as already happened a while ago (in
0f1b6fb7726fc54b0ef318143ab2ffc43faed8fa) in all other modules.
2021-01-28 21:39:45 +01:00
slotThe
e83081b6ef Remove mentions of defaultConfig
These were superseded, but forgotten to be updated, by Data.Default.def
in 5140f5b5d06790e055eb7fb0cf3eccc4997aa736.
2021-01-28 21:36:48 +01:00
Tomáš Janoušek
627e203bcf
Merge pull request #452 from liskin/pr/hspec
tests: Use hspec as test driver (prep for #407 #430 #440 unit tests); speed up
2021-01-27 21:05:49 +01:00
slotThe
c59805636d XMonad.Action.TreeSelect: Allow Pointer Events
If this is not done, trying to select another window with the mouse when
the treeselect window is up, the X server executes a pointer/keyboard
grab until `allowEvents' is called; which it never is and so both remain
frozen indefinitely.

C.f.:
  - xmonad/xmonad/issues/116
  - xmonad/xmonad-contrib/issues/445
2021-01-27 16:37:59 +01:00
Tomas Janousek
2691e3a490 X.A.GridSelect: Use OVERLAPPABLE, seems to help with unnecessary recompiles
Without this, any change to tests triggers a recompile of GridSelect
when invoking "stack test", adding a couple seconds. This seems to help.
2021-01-26 13:43:35 +00:00
slotThe
9d520dc880 X.Prompt: X constraint for historyCompletion[P]
This is needed because the cache directory is now a part of XConf, which
is calculated once on startup and hence any recalculation would be
fragile.

Some internal functions that are not exposed (like writeHistory) were
also changed to accept that directory as an argument.
2021-01-07 10:33:47 +01:00
Zubin Duggal
c66345467e
Export modifyProject 2020-12-19 16:42:20 +05:30
slotThe
78d526d1dd Get rid of unused imports
Starting with 5240116f3cdf169e3aa226d9f8206a5f5b99c867 we only support
GHC versions 8.4.4 and up (more precisely, the GHC version associated
with stackage lts-12 and up).  The imports in question are now in
Prelude and need not be imported explicitly.
2020-12-14 13:41:28 +01:00
Matus Goljer
d9ad93a888
Add Emacs-style Prefix handling (#159)
* Add Emacs-style Prefix handling

* Update CHANGES.md

* Add helper tests for prefix type

* Add docstrings.

* Fix handling of repeated prefix when we fall-back with no binding.

* Add a caveat about nested prefix binding
2020-11-29 22:35:52 +05:30
slotThe
8822d2ff51 Add getLastFocusedTopicsByScreen, switchNthLastFocusedByScreen 2020-11-26 12:54:55 +01:00
slotThe
ce5aae5403 Use WorkspaceHistory
Instead of defining our own (internal) history, use an already established
module.
2020-11-24 08:35:08 +01:00
slotThe
ae6c658bc4 Add switchTopicWith 2020-11-24 08:27:39 +01:00
slotThe
1400d167ad Cons on new topic before filtering the last used topics
Because the there is a hard limit on the number of items in the topic
history now, it makes sense to first cons on the topic and then filter
the result (so setLastFocusedTopic can be used to exclude certain topics
from ever entering the history).
2020-11-24 08:27:39 +01:00
slotThe
6079c61063 Use sortOn instead of sortBy comparing 2020-11-24 08:27:39 +01:00
slotThe
aa67fa5352 Respect maxTopicHistory when entering topics into the history
So far, maxTopicHistory was only used when pretty-printing the history
via pprWindowSet, which does not line up with the documentation that it
has.
2020-11-24 08:27:39 +01:00
slotThe
4c0b5330e7 Consistent indentation throughout the module
Two spaces seem to be a bit more common here, hence it was chosen over four
spaces.
2020-11-24 08:27:39 +01:00
slotThe
3c1866979d Update documentation 2020-11-24 08:27:39 +01:00
slotThe
6b22ce17c7 Add switchNthLastFocusedExclude
This may be used to exclude certain topics that one never wants to
"switch back" to, even if it was visited (for example, the named
scratchpad topic).
2020-11-24 08:27:39 +01:00
slotThe
d13a26b11e Update last focused topics when switching to a new one 2020-11-24 08:27:39 +01:00
Sibi Prabakaran
9976aa3b3c
Merge pull request #404 from slotThe/remove-default-deprecations
Remove Data.Default Deprecations
2020-11-24 12:29:13 +05:30
Tomas Janousek
f271d59c34 X.A.WorkspaceNames: Provide workspaceListTransform for EwmhDesktops
Together with ewmhDesktopsLogHookCustom this exposes workspace names to
external pagers.

Fixes: https://github.com/xmonad/xmonad-contrib/pull/105
Fixes: https://github.com/xmonad/xmonad-contrib/pull/122
Co-authored-by: Ivan Malison <IvanMalison@gmail.com>
2020-11-16 11:16:59 +00:00
Tomas Janousek
3dc6b44f86 X.A.WorkspaceNames: Kill a warning 2020-11-16 10:55:22 +00:00
slotThe
5140f5b5d0 Remove things deprecated by Data.Default 2020-11-16 10:31:02 +01:00
ivanbrennan
52c5bd61cb
use complCaseSensitivity field
Use the newly-added complCaseSensitivity field of XPConfig where
possible, rather than declaring primed function variants.
2020-09-28 22:36:05 -04:00
ivanbrennan
4de529a923
DynamicProjects: allow case-insensitive prompts
Provide a way to use case-insensitive directory completion.
2020-09-24 07:57:33 -04:00
Brent Yorgey
b5105381bf
Merge pull request #384 from ivanbrennan/rotate-some
RotateSome
2020-09-24 05:09:06 -05:00
ivanbrennan
c5ff88b87b
improve RotateSome documentation and readability
Add an example and more comments to the documentation, and make some
small code tweaks (more type signatures and a couple variable renames)
to aid readability.
2020-09-23 16:55:14 -04:00
ivanbrennan
957f4518b9
surfaceNext, surfacePrev exclude floating windows
I was naively passing the workspace to runLayout without filtering out
floating windows from its stack, like XMonad.Operations.windows does.
The fact that 'windows' does this filtering explains how layouts like
those in LimitWindows continue to behave correctly in the presence of
floating windows.

This fixes some incorrect behavior where the presence of a floating
windows caused visible windows (other than the focused one) to be
included in the surfaceRing.
2020-09-19 11:29:30 -04:00
Tom Smeets
4b65f9eef0 TreeSelect: Resolve issue #362 with origin offset being ignored
The config values `ts_originX` and `ts_originY` were not behaving like documented. They weren't doing anything at all.
This should fix that.
2020-09-18 21:31:10 +02:00
ivanbrennan
f06ee5e1ff
add XMonad.Actions.RotateSome
This module provides a pure function, 'rotateSome', as well as a pair of
X actions that use it to rotate unshown windows through the focused
stack position while leaving other windows in place. I find this useful
in combination with layouts such as LimitWindows, which determine window
visibility based on stack position.
2020-09-17 22:51:16 -04:00
ivanbrennan
e2fa1ce8a1
add XMonad.Actions.Sift (siftUp, siftDown)
Provide swap-like functions that handle the wrapping case by exchanging
the windows at either end of the stack rather than rotating the stack.

https://github.com/xmonad/xmonad/issues/234
2020-09-12 09:35:35 -04:00
Brent Yorgey
24d2f26302
Merge pull request #344 from elkowar/master
add new XMonad.Actions.TiledWindowDragging module
2020-06-01 15:36:41 -05:00
Dave
faf89612aa
Update Search.hs
Add ebay function
2020-06-01 12:00:04 -04:00
Leon Kowarschick
b2446cd633 Adjust code style to match guidelines 2020-05-27 18:01:01 +02:00
Leon Kowarschick
08b54edbf9 add new XMonad.Layout.TiledWindowDragging module 2020-05-27 17:52:58 +02:00
ivanbrennan
5aca3fb542
export recentWS
Allow consumers of this module to filter the recency list with a custom
predicate when cycling/toggling workspaces.
2020-03-06 08:31:55 -05:00
ivanbrennan
423d70593d
refactor recentWS
Instead of constructing workspaces and rearranging it with tail and
head, construct it in the desired formation directly.
2020-03-05 09:13:14 -05:00
ivanbrennan
53a59d6592
cycleRecentNonEmptyWS, toggleRecentNonEmptyWS
Add non-empty variants to these workspace cycling/toggling functions.
2020-03-05 09:13:13 -05:00
ivanbrennan
dcf1f3e694
add toggleRecentWS
Add toggleRecentWS to switch to the most recent workspace, with repeated
use toggling between a pair of workspaces.
2020-03-05 09:13:13 -05:00
slotThe
5493ff190d Add promptSearchBrowser' to further filter suggestions
Users may suggesting previous searches if and only if they came from the same
search engine more natural.
2020-01-19 22:08:48 +01:00
Daniel Gorin
28b3e34fd7 Prompt: Use searchPredicate in more cases
Prompts based on `mkComplFunList` and `mkComplFunList'` were not
taking into account the `searchPredicate` funtion from `XPConfig`.
This was rather confusing.

We fix it by passing `XPConfig` to these functions; although
this is strictly more than they need, it makes the breaking change very
easy to fix and is also more future-proof.
2019-11-18 20:13:40 +00:00
slotThe
bcd4dde298 Remove redundant do's 2019-10-11 16:35:54 +02:00
slotThe
30d45f8993 Clean up Control.Monad imports 2019-10-08 11:27:30 +02:00