Xmonad/Notable changes since 0.9
|Line 65:||Line 65:|
* '''X.Prompt''' exports setInput and getInput for use in custom keymaps. copyString has been removed. The default quit bindings are Esc, C-q or C-[. C-g is no longer bound.
* '''X.Prompt''' exports setInput and getInput for use in custom keymaps. copyString has been removed. The default quit bindings are Esc, C-[, and C-q. C-g is no longer bound.
Revision as of 20:24, 17 December 2009
This page is for keeping a record of significant changes in darcs xmonad and xmonad-contrib since the 0.9 releases. See 'darcs changes' for more details about miscellaneous feature enhancements, and documentation and bug fixes not noted here.
(0.9.1 was a maintenance release, with no changes to user functionality. 0.9.1 builds against haskell X11-22.214.171.124 while 0.9 requires 126.96.36.199. Otherwise the only changes are a few documentation updates, automatic detection of numlockMask, and a minor bug fix for forked processes.)
The idea is to put here a list of things which a user upgrading from 0.9 to the current darcs version might like to know, so that they are sure to be included in the next release change log.
1 Updates that require changes in xmonad.hs
1.1 Simplified interface for X.A.SpawnOn and X.H.DynamicHooks
Since contrib modules can now store custom state in XState, the additional IORef parameters are no longer required: Users have to remove the first parameter to the respective functions. The functions
initDynamicHooks are also no longer necessary and have been removed. The same applies to XMonad.Hooks.DynamicHooks. See below for examples.
1.2 X.A.OnScreen changes
The type of
onScreen has been changed to allow more general onScreen functions. The new
onScreen takes any function that modifies the stack and runs it on the given screen. An onScreen' to run in X is also provided. Since XMonad can not guess what you'd like to do with the focus after running this function,
onScreen also accepts a
Focus data which tells XMonad how to act. See below for detailed examples. The more common "end user" functions like
greedyViewOnScreen didn't change in their interface though.
1.3 Optional or obscure changes
Changes unlikely to affect most xmonad users.
- X.Hooks.DynamicLog urgency Urgency formatting now takes precedence over all other formatting, so xmobarStrip and dzenStrip are no longer needed. Multi-head users that distinguish urgent current from urgent visibles will need custom pretty printers but default behaviour is unchanged.
- The X.Util.XUtils paintAndWrite utility's parameter types have changed to allow printing multiple strings. Configs using it will need to be updated to use [Align] and [String].
- numlockMask is now set automatically -- users explicitly setting numlockMask in their configs should remove those references.
2 Changes to the xmonad core
- XState now supports state extensions in xmonad-contrib. See darcs source or documentation.
- xmonad --verbose-version flag added to provide more detailed information about the xmonad build useful for troubleshooting.
- is `mappend` for any Monoid now, not just ManageHook. Thus it can be used with keybindings, handleEventHook, X (a -> a), and more.<+>
- The GenerateManpage script now uses the GPL'd pandoc to generate html and man versions of the manpage.
3 Changes to xmonad-contrib
Throughout xmonad-contrib many monadic computations have been generalized to work in any MonadIO, i.e. in X or directly in main in IO.
3.1 Updated modules
- CycleWS now allows cycling through filtered on tags present in the workspace IDs, e.g. from "tag2:baz" withWSTagGroupsonly tag2's foo, baz, and yow workspaces would cycle.workspaces = ["tag1:foo","tag1:bar","tag2:foo","tag2:baz","tag2:yow"]
- DynamicWorkspaces includes several bug fixes and improvements.
- GridSelect has new gridselectWorkspace variation to choose a workspace with which to perform an action such as view, shift or copy the focused window, etc.
- OnScreen has improved several functions and offers greater flexibility, however some interfaces have changed. See changes in xmonad.hs for details.
- SpawnOn uses extensible state rather than IORefs. See changes in xmonad.hs for details.
- TopicSpace includes defaultTopicConfig for easier setup, and manages its history via extensible state rather than U.StringProp.
- DynamicHooks uses extensible state rather than IORefs. See changes in xmonad.hs for details.
- DynamicLog includes xmonadPropLog to output data via root window properties rather than via pipes. See also
scripts/xmonadpropread.hsincluded with XMonadContrib source. For configs using X.H.UrgencyHook, enabling urgency on current or visible will override ppCurrent or ppVisible formatting and use the urgency formatting instead whenever a workspace contains urgent windows, similarly it ignores ppHidden formatting, eliminating the need for the dzen and xmobar format strippers.
- ManageDocks avoidStruts has been extended to behave more sensibly with over under multi-head configurations, i.e. allowing the use of xmobar at the bottom of a screen positioned over another xinerama screen. Note that current wm specifications do not support per screen struts, although it is under discussion, so many applications won't set struts at an interior screen edge.
- ManageHelpers has new currentWS query enabling per workspace differences in manageHooks.
- BorderResize modifies layouts supporting the SetGeometry message to allow resizing windows by dragging their corners (without needing to press a modifier key). It is best used with X.L.PositionStoreFloat or the complete X.C.Bluetile, however it can also be used with X.L.WindowArranger.
- Decoration has internal changes to support bluetile additions, including a new windowTitleAddons field in Theme.
- X.Prompt exports setInput and getInput for use in custom keymaps. copyString has been removed. The default quit bindings are Esc, C-[, and C-q. C-g is no longer bound.
- Dzen has many new helper functions useful for creating custom notifications or message popups.
- XSelection putSelection has been removed. See Issue 317.
- XUtils paintAndWrite now prints multiple strings, taking [Align] and [String] parameters in place of Align and String.
3.2 New contrib modules
- BluetileCommands are the X.H.ServerMode commands used by the bluetile gtk2hs dock. Most of them can also be used with other interfaces to ServerMode if you have enabled the appropriate layout extensions from X.C.Bluetile.
- Bluetile enables the bluetile extensions minus the greeter and dock. See the bluetile project page for more details.
- CurrentWorkspaceOnTop logHook used to restack floating layouts, ensuring dragged windows stay on top, used by bluetile config.
- PositionStoreHooks manageHook and eventHook to store and maintain position and size data, used by bluetile config.
- ButtonDecoration provides window decoration with clickable menu, minimize, maximize, close buttons. Requires use of X.L.Minimize and X.L.Maximize and X.L.DecorationAddons.
- DecorationAddons extra utilities to make decorations more useful.
- DraggingVisualizer helper for X.L.WindowSwitcherDecoration to make dragged windows follow the mouse cursor.
- MultiColumns Use as many columns as you'd like with as many windows in each column as you'd like.
- PositionStoreFloat the main bluetile floating layout designed for dual-head, should be used along with X.L.NoFrillsDecoration and X.L.BorderResize. (Currently requires use of mouse to move and resize floating windows.)
- WindowSwitcherDecoration drag windows on top of each other to swap positions. Can be used either with or without the ButtonDecoration action buttons.
- ExtensibleState allows storing custom mutable state in xmonad. Can optionally be made persistent over restarts.
- PositionStore stores window position and size info in XState for better float management. Used extensively by X.C.Bluetile.
- SpawnOnce spawns a command once and only once. Useful for session settings unique to xmonad to be run from startupHook only on login rather than on each xmonad restart.
3.3 Deleted modules
4 Related Projects
xmonad-light allows using a limited version of xmonad without having to have ghc installed. It provides a special syntax to customize a few common options using xmonad.conf instead of xmonad.hs.
xmonad-extras includes some modules with additional dependencies, like a Volume control, an MPD prompt and the xmonad-eval package that uses the hint interpreter to manipulate xmonad state during runtime via arbitrary haskell expressions ala emacs eval.
xmonad log applet allows displaying xmonad logHook output in gnome-panel via dbus.
Bluetile is a tiling window manager based on xmonad which focuses on making the tiling paradigm easily accessible to users coming from traditional window managers by drawing on known conventions. It provides both keyboard and mouse access for its features. It is designed to be usable as is without being configurable, however all its core features excluding its dock are provided by xmonad-contrib extensions. People wanting a customized bluetile-like window manager can use XMonad.Config.Bluetile as a base or cherry pick modules providing the features they need.
hlint parses haskell source and offers suggestions on how to improve it. (Requires >=ghc-6.10)
5 Detailed examples regarding changes to xmonad.hs
5.1 XState change details
Since contrib modules can now store custom state in XState, the SpawnOn and DynamicHooks IORef parameters are no longer required: Users have to remove the first parameter to the respective functions. The functions
initDynamicHooks are also no longer necessary and have been removed.
-- Old code: sp <- mkSpawner .. [((mod1Mask,xK_k), shellPromptHere sp defaultXPConfig ..]
The above has to be changed to:
-- no mkSpawner line .. [((mod1Mask,xK_k), shellPromptHere defaultXPConfig) ..]
The same applies to XMonad.Hooks.DynamicHooks.
5.2 OnScreen change details
The type of
onScreen has been changed to allow more general onScreen functions. The old
onScreen was very limited. Basicly the only working function derived from onScreen was
viewOnScreen, since the
greedyViewOnScreen never worked as supposed to, and any other function wouldn't work either.
onScreen takes any function that modifies the stack and runs it on the given screen. Since XMonad can not guess what you'd like to do with the focus after running this function,
onScreen also accepts a
Focus data which tells XMonad how to act.
---- Old version ---- -- Old type of onScreen: onScreen :: (WorkspaceId -> WindowSet -> WindowSet) -- ^ default action -> ScreenId -- ^ screen id -> WorkspaceId -- ^ index of the workspace -> WindowSet -- ^ current stack -> WindowSet -- The old implementation of viewOnScreen was: viewOnScreen :: ScreenId -> WorkspaceId -> WindowSet -> WindowSet viewOnScreen sc i = onScreen view sc i ---- New version ---- -- The new Focus data: data Focus = FocusNew -- ^ always focus the new screen | FocusCurrent -- ^ always keep the focus on the current screen | FocusTag WorkspaceId -- ^ always focus tag i on the new stack | FocusTagVisible WorkspaceId -- ^ focus tag i only if workspace with tag i is visible on the old stack -- New type of onScreen: onScreen :: (WindowSet -> WindowSet) -- ^ function to run -> Focus -- ^ what to do with the focus -> ScreenId -- ^ screen id -> WindowSet -- ^ current stack -> WindowSet -- A few example implementations (don't worry - they're already built in): viewOnScreen :: ScreenId -> WorkspaceId -> WindowSet -> WindowSet viewOnScreen sc i = onScreen (view i) (FocusTag i) sc greedyViewOnScreen :: ScreenId -> WorkspaceId -> WindowSet -> WindowSet greedyViewOnScreen sc i = onScreen (greedyView i) FocusCurrent sc