nixos/xmonad: update example config

Update the example config to show a working example for xmonad 0.17.0, which
added an argument to the `launch` function and adjusted the location of the
recompiled binary.
This commit is contained in:
ivanbrennan 2022-01-18 00:19:31 -05:00
parent a3ea1bc599
commit 6c72deb51b

View File

@ -121,6 +121,29 @@ in {
compiledConfig = printf "xmonad-%s-%s" arch os
myConfig = defaultConfig
{ modMask = mod4Mask -- Use Super instead of Alt
, terminal = "urxvt" }
`additionalKeys`
[ ( (mod4Mask,xK_r), compileRestart True)
, ( (mod4Mask,xK_q), restart "xmonad" True ) ]
--------------------------------------------
{- version 0.17.0 -}
--------------------------------------------
-- compileRestart resume =
-- dirs <- io getDirectories
-- whenX (recompile dirs True) $
-- when resume writeStateToFile
-- *> catchIO
-- ( do
-- args <- getArgs
-- executeFile (cacheDir dirs </> compiledConfig) False args Nothing
-- )
--
-- main = getDirectories >>= launch myConfig
--------------------------------------------
compileRestart resume =
whenX (recompile True) $
when resume writeStateToFile
@ -131,12 +154,7 @@ in {
executeFile (dir </> compiledConfig) False args Nothing
)
main = launch defaultConfig
{ modMask = mod4Mask -- Use Super instead of Alt
, terminal = "urxvt" }
`additionalKeys`
[ ( (mod4Mask,xK_r), compileRestart True)
, ( (mod4Mask,xK_q), restart "xmonad" True ) ]
main = launch myConfig
'';
};