Difference between revisions of "Xmonad/Notable changes since 0.11"

From HaskellWiki
Jump to navigation Jump to search
m (note point releases yesterday)
(add ManageDocks change, 0.12 bug, and fixes thereto)
(One intermediate revision by the same user not shown)
Line 44: Line 44:
 
|-
 
|-
 
|}
 
|}
  +
  +
== getArgs must be called from main ==
  +
  +
If you used the idiom of checking for a first time startup vs. restart of xmonad:
  +
  +
<haskell>
  +
args <- getArgs
  +
when (null args) $ do
  +
-- stuff to be run only on restart here
  +
</haskell>
  +
  +
this must be changed, because getArgs no longer works from xmonad hooks. (See https://github.com/xmonad/xmonad/commit/307b82a53d519f5c86c009eb1a54044a616e4a5c for details.) You must move the <code>args <- getArgs</code> into <code>main</code> before the invocation of xmonad:
  +
  +
<haskell>
  +
main = do
  +
-- maybe spawnPipe here
  +
args <- getArgs
  +
xmonad someConfig $ {
  +
-- ...
  +
startupHook = when (null args) $ do
  +
-- stuff to be run only on restart here
  +
-- ...
  +
}
  +
</haskell>
  +
  +
== ManageDocks changes ==
  +
<code>XMonad.Hooks.ManageDocks</code> was changed to cache windows with struts, providing significant performance improvements when there are many windows (formerly it was calling <code>XQueryTree()</code> on every re-layout, and there is no way to filter this beyond querying only top level children). Users of <code>ManageDocks</code> must ensure that they have added <code> docksEventHook</code> to their <code>manageEventHook</code>; this used to be optional (and in practice only needed with the KDE4+ Plasma dock and <code>xfce4-panel</code>), but is now mandatory.
  +
  +
=== *URGENT* Bug in 0.12 ManageDocks ===
  +
  +
The above change in the 0.12 release has a bug which results in the first laid-out workspace not having any struts applied. The fix for this is to install the git version of [https://github.com/xmonad/xmonad-contrib <code>xmonad-contrib</code>]. You will also need to add <code>docksStartupHook</code> to your <code>startupHook</code>.

Revision as of 18:31, 27 May 2016

This page is for keeping a record of significant changes in darcs xmonad and xmonad-contrib since the 0.11 releases (Jan 1, 2013). See darcs changes in the source repositories for the patches and more details covering documentation and bug fixes not noted here.

xmonad-contrib 0.11.1 was a release to address a build falure with X11-1.6.1. 0.11.2 addresses a security where window titles sent on to XMonad.Hooks.DynamicLog could contain <action="command"></action> tags, which potentially are executed by xmobar or dzen. 0.11.3 addresses a build failure with ghc-7.8.2 . xmonad-contrib 0.11.4 and xmonad-core-0.11.1 address a build failure with ghc-7.10.1

non-breaking changes

data-default

Use of data-default allows using def where previously you had to write defaultConfig, defaultXPConfig defaultFoo.

core

setlocale

The setlocale package is now used instead of a binding shipped with xmonad proper. This allows using Main.hs instead of Main.hsc.

bugfixes

#240, #572, #135

Contrib

New modules:

 Layout.BinarySpacePartition
 Layout.Dwindle
 Layout.Stoppable
 Prompt.ConfirmPrompt
 Prompt.Pass
 Config.Prime
 more...

breaking changes

updatePointer

XMonad.Actions.UpdatePointer.updatePointer arguments were changed. This allows including aspects of both of the TowardsCentre and Relative methods. To keep the same behavior, replace the entry in the left column with the entry on the right:

< 0.12 >= 0.12
updatePointer Nearest updatePointer (0.5, 0.5) (1,1)
updatePointer (Relative x y) updatePointer (x,y) (1,1)
updatePointer (TowardsCentre x y) updatePointer (0.5,0.5) (x,y)

getArgs must be called from main

If you used the idiom of checking for a first time startup vs. restart of xmonad:

args <- getArgs
when (null args) $ do
  -- stuff to be run only on restart here

this must be changed, because getArgs no longer works from xmonad hooks. (See https://github.com/xmonad/xmonad/commit/307b82a53d519f5c86c009eb1a54044a616e4a5c for details.) You must move the args <- getArgs into main before the invocation of xmonad:

main = do
    -- maybe spawnPipe here
    args <- getArgs
    xmonad someConfig $ {
      -- ...
      startupHook = when (null args) $ do
        -- stuff to be run only on restart here
      -- ...
    }

ManageDocks changes

XMonad.Hooks.ManageDocks was changed to cache windows with struts, providing significant performance improvements when there are many windows (formerly it was calling XQueryTree() on every re-layout, and there is no way to filter this beyond querying only top level children). Users of ManageDocks must ensure that they have added docksEventHook to their manageEventHook; this used to be optional (and in practice only needed with the KDE4+ Plasma dock and xfce4-panel), but is now mandatory.

*URGENT* Bug in 0.12 ManageDocks

The above change in the 0.12 release has a bug which results in the first laid-out workspace not having any struts applied. The fix for this is to install the git version of xmonad-contrib. You will also need to add docksStartupHook to your startupHook.