36 Commits

Author SHA1 Message Date
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
38c11c1e3c Add "Description" field to module headers
Fixes: https://github.com/xmonad/xmonad-contrib/issues/592
2021-09-26 14:15:54 +02:00
Joan Milev
f732082fdc Remove all derivations of Typeable
Typeable has been automatically derived for every type since GHC 7.10,
so remove these obsolete derivations.  This also allows us to get rid of
the `DeriveDataTypeable` pragma quite naturally.

Related: https://github.com/xmonad/xmonad/pull/299 (xmonad/xmonad@9e5b16ed8a)
Related: bd5b969d9ba24236c0d5ef521c0397390dbc4b37
Fixes: https://github.com/xmonad/xmonad-contrib/issues/548
2021-06-18 14:10:23 +02: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
7ad38d4063 Fix GHC warning: -Wtabs
Related: https://github.com/xmonad/xmonad-contrib/issues/537
2021-05-20 17:32:18 +02:00
slotThe
673f727206 Fix GHC warning: -Wname-shadowing
Related: https://github.com/xmonad/xmonad-contrib/issues/537
2021-05-20 17:32:03 +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
53b57eba14 Replace liftM and fmap with <$> 2019-10-08 10:33:56 +02:00
Peter Jones
be036f9bb9
Export `removeEmptyWorkspaceByTag'
It looks like this function should have been exported all along but
was overlooked.
2016-11-21 17:15:53 -07:00
Antoine Eiche
f3de3e2719 X.A.DynamicWorkspace: update index map on workspace renaming 2016-09-20 20:42:03 +02:00
Antoine Eiche
464a99b842 X.A.DynamicWorkspaces: associate indexes to workspaces
You can add indexes to workspaces and use them to do actions on
workspaces. This allows you to dynamicaly associate a workspace to a
keybinding without depending of the workspace name or the workspace
position.
2016-09-19 14:33:18 +02:00
nrujac
5816a473dd Generalize new workspace addition functions to support arbitrary insertion.
The current DynamicWorkspaces module only supports adding new workspaces
at the start of the list of workspaces. This means when binding workspaces
to keys based on the position in the list, key bindings can change 
as workspaces are added in removed in a far more destructive way than
necessary. Instead, supporting appending and arbitrary insertion allows
the user to determine where the new workspace should be added.

This patch is a straight generalization of the addHiddenWorkspace' function.
Rather than always using `(:)` to insert the new workspace into the list
of workspaces, this patches causes it to use an arbitrary list insertion
function instead. A few new functions are added to prevent breakage of
external code while exported functions are left unchanged.

List of new functions:
  appendWorkspace
  appendWorkspacePrompt
  addWorkspaceAt
  addHiddenWorkspaceAt

Existing functions were modified to call their generalized brethren where possible
without changing functionality. This patch should not change behavior for any
existing users of this module.
2014-12-19 00:23:09 +00:00
Daniel Wagner
0f1b6fb772 use Data.Default wherever possible, and deprecate the things it replaces 2013-05-28 01:39:09 +00:00
Dmitri Iouchtchenko
9b6ed4c505 Allow removing arbitrary workspaces 2012-12-31 21:43:43 +00:00
Dmitri Iouchtchenko
d83442b8eb Remove first-hidden restriction from X.A.DynamicWorkspaces.removeWorkspace' 2012-12-31 21:41:48 +00:00
Dmitri Iouchtchenko
2c6f1c22b2 Add X.A.DynamicWorkspaces.renameWorkspaceByName. 2012-12-27 06:35:31 +00:00
Adam Vogt
067ccb950e Export types to reduce haddock warnings. 2010-10-23 19:57:55 +00:00
Adam Vogt
cc162bba44 Documentation fix (issue 445)
Daniel's change which broke -Wall (adding an import for haddock only) was
somehow removed. Instead we can just modify the sample code to add the import.
2011-05-27 03:35:21 +00:00
Mats Rauhala
2ab79a7c35 Compile with ghc7 2011-05-04 19:24:55 +00:00
Daniel Wagner
29cad0672e documentation: tell where to find a few auxiliary functions that might be useful in conjunction with X.A.DynamicWorkspaces 2011-04-15 22:48:46 +00:00
gwern0
c3796a9cb1 DynamicWorkspaces.hs: rm whitespace 2010-03-14 20:59:51 +00:00
Adam Vogt
4f97bc02ce Minor style changes in DynamicWorkspaces 2009-11-15 02:27:51 +00:00
Anders Engstrom
b3329397c0 X.A.DynamicWorkspaces fix doc and add behaviour
Before this patch the documentation claims that it won't do anything on non-empty workspaces when it actually does. This patch fixes the documentation to reflect the actual behaviour, but also adds the behaviour promised by the documentation in other functions. It does not break configs. In addition it also provides functions to help removing empty workspaces when leaving them.
2009-11-13 23:39:03 +00:00
Brent Yorgey
fdec915dda X.A.DynamicWorkspaces: fix addWorkspace and friends so they never add another copy of an existing workspace 2009-11-12 20:13:51 +00:00
Brent Yorgey
0efee8b0cb X.A.DynamicWorkspaces: new 'addWorkspacePrompt' method 2009-11-08 17:05:03 +00:00
Adam Vogt
74a03cd8fb Refer to modm as the current modMask
This makes the config suggestions consistent with the current template.
2009-10-22 04:11:26 +00:00
David Roundy
1f2162781f remove myself as maintainer from modules I don't maintain or use. 2008-08-28 15:18:30 +00:00
Braden Shepherdson
303107fbae Exporting addHiddenWorkspace, it's needed by the new Scratchpad 2008-06-08 04:53:18 +00:00
David Roundy
93cf069aab in Prompt.Workspace sort by official workspace order. 2008-02-29 22:30:47 +00:00
Spencer Janssen
3a522e7e3c Remove XMonad.Operations imports 2007-12-08 00:05:47 +00:00
Spencer Janssen
dc11825588 Remove redundant imports 2007-12-07 23:38:27 +00:00
Brent Yorgey
98840048e5 DynamicWorkspaces: haddock updates 2007-11-27 22:00:33 +00:00
David Roundy
9c915ef65d add a few docs (very sparse) to DynamicWorkspaces. 2007-11-09 15:26:49 +00:00
David Roundy
77be696976 add withWorkspace prompt, which automatically creates workspace if nonexistent. 2007-11-09 15:21:24 +00:00
David Roundy
c2a4c05faf fix selectWorkspace to work with new config. 2007-11-01 18:35:46 +00:00
Spencer Janssen
cd1884466a Hierarchify 2007-11-01 20:10:59 +00:00