mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-13 05:05:29 +03:00
nixos/tests/xmonad: adjust to XMonad 0.17
This commit is contained in:
parent
1e18234166
commit
0520dda5ec
1 changed files with 9 additions and 6 deletions
|
@ -13,7 +13,9 @@ let
|
||||||
import System.Environment (getArgs)
|
import System.Environment (getArgs)
|
||||||
import System.FilePath ((</>))
|
import System.FilePath ((</>))
|
||||||
|
|
||||||
main = launch $ def { startupHook = startup } `additionalKeysP` myKeys
|
main = do
|
||||||
|
dirs <- getDirectories
|
||||||
|
launch (def { startupHook = startup } `additionalKeysP` myKeys) dirs
|
||||||
|
|
||||||
startup = isSessionStart >>= \sessInit ->
|
startup = isSessionStart >>= \sessInit ->
|
||||||
spawn "touch /tmp/${name}"
|
spawn "touch /tmp/${name}"
|
||||||
|
@ -23,14 +25,15 @@ let
|
||||||
|
|
||||||
compiledConfig = printf "xmonad-%s-%s" arch os
|
compiledConfig = printf "xmonad-%s-%s" arch os
|
||||||
|
|
||||||
compileRestart resume =
|
compileRestart resume = do
|
||||||
whenX (recompile True) $
|
dirs <- asks directories
|
||||||
|
|
||||||
|
whenX (recompile dirs True) $
|
||||||
when resume writeStateToFile
|
when resume writeStateToFile
|
||||||
*> catchIO
|
*> catchIO
|
||||||
( do
|
( do
|
||||||
dir <- getXMonadDataDir
|
|
||||||
args <- getArgs
|
args <- getArgs
|
||||||
executeFile (dir </> compiledConfig) False args Nothing
|
executeFile (cacheDir dirs </> compiledConfig) False args Nothing
|
||||||
)
|
)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -94,7 +97,7 @@ in {
|
||||||
|
|
||||||
# set up the new config
|
# set up the new config
|
||||||
machine.succeed("mkdir -p ${user.home}/.xmonad")
|
machine.succeed("mkdir -p ${user.home}/.xmonad")
|
||||||
machine.copy_from_host("${newConfig}", "${user.home}/.xmonad/xmonad.hs")
|
machine.copy_from_host("${newConfig}", "${user.home}/.config/xmonad/xmonad.hs")
|
||||||
|
|
||||||
# recompile xmonad using the new config
|
# recompile xmonad using the new config
|
||||||
machine.send_key("alt-ctrl-q")
|
machine.send_key("alt-ctrl-q")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue