[xmonad] Code Freeze for v0.12 and Time to Test!
Tuncer Ayaz
tuncer.ayaz at gmail.com
Mon Dec 28 13:51:20 UTC 2015
On 21 December 2015 at 20:16, Brent Yorgey <byorgey at gmail.com> wrote:
> Is there anything else that needs to happen? e.g. does the website
> need to be updated?
Here's a minimal, modern xmonad.hs, which we should include in the
announcement and ideally also on the website's getting started page.
Feel free to improve.
import System.Exit
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.ManageHelpers
import XMonad.Layout.Fullscreen
import XMonad.Layout.LayoutHints
import XMonad.Layout.NoBorders
import XMonad.Prompt
import XMonad.Prompt.ConfirmPrompt
import XMonad.Prompt.Shell
import XMonad.Util.EZConfig
import XMonad.Util.Run(hPutStrLn, spawnPipe)
main = do
xmproc <- spawnPipe "xmobar ~/.xmonad/xmobarrc"
xmonad $ defaultConfig
{
terminal = "xterm"
, manageHook = myManageHook <+> fullscreenManageHook <+> manageDocks
<+> manageHook defaultConfig
, layoutHook = fullscreenFloat $ fullscreenFocus $ layoutHints
$ smartBorders $ avoidStruts $ layoutHook defaultConfig
, handleEventHook = fullscreenEventHook
, logHook = dynamicLogWithPP $ xmobarPP { ppOutput = hPutStrLn xmproc }
}
`removeKeysP`
[
"M-S-q"
, "M-p"
]
`additionalKeysP`
[
("M-S-q", confirmPrompt myXPConfig "exit" $ io exitSuccess)
, ("M-p", shellPrompt myXPConfig)
]
`additionalKeys`
[ ((mod4Mask, xK_q), spawn "xmonad --recompile && xmonad --restart") ]
myXPConfig = defaultXPConfig
{
position = Top
, promptBorderWidth = 0
, defaultText = ""
, alwaysHighlight = True
, font = "9x15"
}
myManageHook = composeAll
[
className =? "Pidgin" --> doFloat
, className =? "MuPDF" --> doFloat
, className =? "XCalc" --> doFloat
, className =? "mpv" --> doFloat
]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sample-xmonad.hs
Type: application/octet-stream
Size: 1865 bytes
Desc: not available
URL: <http://mail.haskell.org/pipermail/xmonad/attachments/20151228/987f396b/attachment.obj>
More information about the xmonad
mailing list