Commit Graph

3289 Commits

Author SHA1 Message Date
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
Tomas Janousek
bda1d3356d CHANGES: Trailing whitespace fixes 2020-11-16 10:55:22 +00:00
slotThe
683344ed25 Update CHANGES.md 2020-11-16 10:31:02 +01:00
slotThe
5140f5b5d0 Remove things deprecated by Data.Default 2020-11-16 10:31:02 +01:00
Sibi Prabakaran
cd1c1d1d69 Merge pull request #402 from elkowar/fix-usage-missing
Fix missing usage-section in XMonad.Hooks.WindowSwallowing
2020-11-15 22:01:50 +05:30
elkowar
9e3d17c1c0 Fix missing usage-section in XMonad.Hooks.WindowSwallowing 2020-11-15 13:28:13 +01:00
Tomas Janousek
5d2a6d75a8 X.H.EwmhDesktops: Fix _NET_* properties not being set at startup
None of these properties are currently being set when xmonad starts:

    _NET_ACTIVE_WINDOW(WINDOW): window id # 0x0
    _NET_CURRENT_DESKTOP(CARDINAL) = 0
    _NET_CLIENT_LIST_STACKING(WINDOW): window id #
    _NET_CLIENT_LIST(WINDOW): window id #

because the caching introduced in 92fe5f34ff initializes the
cache with the same values that they should have in an empty session, so
we don't detect a change and don't set them.

Fix it by initializing the cache with impossible (or at least extremely
improbable) values.

Fixes: https://github.com/xmonad/xmonad-contrib/issues/363
2020-11-09 22:15:25 +00:00
Brent Yorgey
e042bcce97 Merge pull request #398 from liskin/layoutclass-typeable
Add Typeable constraint to a few LayoutClass instances
2020-11-09 14:13:09 -06:00
Tomas Janousek
b989655cea Add Typeable constraint to a few LayoutClass instances
This enables adding the Typeable constraint to LayoutClass itself
(https://github.com/xmonad/xmonad/pull/242) which in turn enables
querying the current layout state. That might be useful to e.g. show the
current X.L.WorkspaceDir in xmobar.

This is a preparation commit that fixes the compile failures that would
result in merging that change to xmonad. For this to be generally useful
we first need to merge (and ideally also release) that xmonad change,
and then we'll need some documentation and perhaps a type class to help
find the right LayoutModifier in the tree of ModifiedLayouts and
Choices. That will come later.
2020-11-09 16:37:30 +00:00
Tomas Janousek
087076f136 CHANGES: Document last 3 commits 2020-11-04 16:23:37 +00:00
Tomas Janousek
0996e71c7e X.H.DynamicLog: Add shortenLeft
This can be sometimes useful, e.g. when showing a directory.
2020-11-04 16:17:32 +00:00
Tomas Janousek
d5b64c1e5d X.L.WorkspaceDir: Export Chdir
This makes it possible to change the workspace directory by sending a
message, which enables automation/scripting not possible with
`changeDir` which displays a prompt.

Example of such usage:
6ea6c52aac/.xmonad/xmonad.hs (L183-L189)
2020-11-04 16:16:51 +00:00
Tomas Janousek
73eb28f669 XMonad.Prompt.Directory: Sort completion suggestions 2020-11-04 11:31:50 +00:00
Brent Yorgey
aa67439bfe Merge pull request #192 from sgf-dma/x.h.focus
Resubmit #128 (X.H.Focus)
2020-10-29 19:55:41 -05:00
sgf
2cc20b4116 Add new module XMonad.Hooks.Focus .
Extend ManageHook EDSL to work on focused windows and current workspace.
2020-10-28 17:51:40 +03:00
sgf
45052b984d X.H.EwmhDesktops. run 'logHook' for activated window.
- By default window activation does nothing.
- `activateLogHook` may be used for running some 'ManageHook' for
activated window.
- `activated` predicate may be used for checking was window activated or
not.
2020-10-28 17:51:40 +03:00
sgf
b2e16d3bf1 X.H.ManageHelpers: Make type of ManageHook combinators more general. 2020-10-19 15:18:00 +03:00
sgf
3a7399b56a X.H.SetWMName: Add getWMName function. 2020-10-19 15:18:00 +03:00
Brent Yorgey
4670ec002f Merge pull request #389 from skewerr/master
add XMonad.Layout.VoidBorders
2020-10-17 06:39:18 -05:00
Wilson Sales
5fd8ff86e9 add XMonad.Layout.VoidBorders
This module contains a modifier that simply sets X11 window border width
to 0 for every window in the layout it modifies. No efforts are made to
bring the border back, which can be annoying if windows are moved to a
different workspace, but it prevents the "border flash" you get with
XMonad.Layout.NoBorders.
2020-10-17 00:08:40 -03:00
Brent Yorgey
d4e15cddd1 Merge pull request #390 from ivanbrennan/export-clickableWrap
Export clickableWrap
2020-10-16 17:36:34 -05:00
Brent Yorgey
4f9dec9760 Merge pull request #391 from NickHu/unicode
Fixes for XMonad.Prompt.Unicode
2020-10-16 17:35:18 -05:00
Nick Hu
598a40da9c add missing documentation of XMonad.Prompt.FuzzyMatch and
XMonad.Prompt.Unicode to XMonad.Doc.Extending
2020-10-14 17:20:28 +01:00
Nick Hu
1a085bec43 XMonad.Prompt.FuzzyMatch: handle case when input is not a subsequence of every completion 2020-10-14 17:16:06 +01:00
Nick Hu
a69794892b XMonad.Prompt.Unicode: respect searchPredicate and sorter from XPConfig 2020-10-14 17:13:30 +01:00
ivanbrennan
8e12681925 export clickableWrap
Configs that apply WorkspaceId transformations, such as
IndependentScreens (adding/removing a screen-number prefix) and
NamedWorkspaces (adding/removing a name suffix), cannot use clickablePP
as is, since they need to apply clickableWrap to an appropriately
transformed WorkspaceId. Rather than force them to reimpliment
clickableWrap, export it.

An example use-case, where IndependentScreens has added a screen number
prefix to the workspace ids (0_1, 0_2, ...), and we want a status-bar
that shows the ids without screen number (1, 2, ...), but also makes
them clickable:

    getClickable :: (WorkspaceId -> WorkspaceId) -> X (WorkspaceId -> String)
    getClickable f = do
      wsIndex <- getWsIndex
      pure $ \ws -> case wsIndex (f ws) of
                      Just idx -> clickableWrap idx ws
                      Nothing -> ws

    composePP :: PP -> ScreenId -> X PP
    composePP pp s = do
      clickable <- getClickable (marshall s)
      return
        . marshallPP s
        $ pp
          { ppCurrent         = ppCurrent         pp . clickable,
            ppVisible         = ppVisible         pp . clickable,
            ppHidden          = ppHidden          pp . clickable,
            ppHiddenNoWindows = ppHiddenNoWindows pp . clickable,
            ppUrgent          = ppUrgent          pp . clickable
          }
2020-10-14 07:31:44 -04:00
Nick Hu
9c09072843 XMonad.Prompt.Unicode: use spawnPipe instead of runProcessWithInput 2020-10-13 20:39:21 +01:00
Tomáš Janoušek
02baee5f7e Merge pull request #388 from ivanbrennan/export-clickable-workspaces
Add ClickableWorkspaces to exposed modules
2020-10-12 01:28:08 +02:00
ivanbrennan
00d829803d expose XMonad.Util.ClickableWorkspaces
This module was not exposed, so any attempt to use it resulted in a
compilation error.
2020-10-11 18:49:41 -04:00
Brent Yorgey
9c4c417936 Merge pull request #386 from ivanbrennan/compl-case-sensitivity
Allow case-insensitive shell prompt completion
2020-09-30 17:56:23 -05: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
b63159fd00 add complCaseSensitivity field to XPConfig 2020-09-28 21:51:45 -04:00
ivanbrennan
bbcc7e576f CHANGES: directory completion case sensitivity 2020-09-24 08:14:50 -04:00
ivanbrennan
86ef180162 usage: changeDir' 2020-09-24 07:57:34 -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
ivanbrennan
0c9c330295 Dir: ComplCaseSensitivity field (breaking change)
Parameterizing completion case-sensitivity for single-mode prompts was
possible without making any breaking changes. For multi-mode prompts,
however, the completion function is expressed through the XPrompt
'completionFunction' method. The only argument that method receives is a
Dir value, so parameterizing completion case-sensitivity means adding a
new field to the Dir constructor.
2020-09-24 07:57:33 -04:00
ivanbrennan
795be75a58 prompt completion: case-sensitivity
Provide a way to perform case-insensitive file / directory completion.
We're using compgen to generate completion candidates, and this is
case-sensitive by default. We can control this by setting the
completion-ignore-case Readline variable prior to invoking compgen. If
we're running a Bash with Readline support, this works as expected.
Otherwise, it has no effect -- completion candidates are still returned,
but compgen generates them in a case-sensitive manner.

To avoid breaking changes, the signatures and behavior of existing
exported functions are unchanged:
  - XMonad.Layout.WorkspaceDir.changeDir
  - XMonad.Prompt.Directory.directoryPrompt
  - XMonad.Prompt.Shell.getShellCompl

New variations of these functions are provided, allowing the caller
to specify the desired case-sensitivity via a ComplCaseSensitivity
argument:
  - XMonad.Layout.WorkspaceDir.changeDir'
  - XMonad.Prompt.Directory.directoryPrompt'
  - XMonad.Prompt.Shell.getShellCompl'

The XMonad.Prompt.Shell exports a couple new functions:
  - compgenDirectories
  - compgenFiles

We make use of this in XMonad.Prompt.Directory to avoid duplicating the
compgen code.
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
Ivan
1e73a97500 Merge pull request #383 from ivanbrennan/pretty-printing-modifier
Add statusBar' to support dynamic pretty printing modifiers
2020-09-19 15:27:41 -04:00
ivanbrennan
551ff2b8ac CHANGES: add XMonad.Hooks.DynamicLog.statusBar' 2020-09-19 15:12:54 -04:00
ivanbrennan
ebfc068b99 DynamicLog: statusBar'
Add a statusBar' function that accepts pretty printing options embedded
in the X monad, so users can leverage dynamic printing modifiers, such
as workspaceNamesPP.
2020-09-19 15:12:40 -04:00
Brent Yorgey
dea887d487 Merge pull request #385 from TomSmeets/tree-select-fix-origin
TreeSelect: Resolve issue #362 with origin offset being ignored
2020-09-19 13:23:35 -05:00