mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 07:13:23 +01:00
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:
parent
a3ea1bc599
commit
6c72deb51b
1 changed files with 24 additions and 6 deletions
|
@ -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
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue