| Copyright | (c) 2015 Javran Cheng |
|---|---|
| License | MIT |
| Maintainer | Javran.C@gmail.com |
| Stability | unstable |
| Portability | non-portable (requires X11) |
| Safe Haskell | None |
| Language | Haskell2010 |
XMonad.Util.EntryHelper.Config
Description
Configuration for EntryHelper
- data Config a = Config {}
- defaultConfig :: Config ExitCode
- withHelper :: IO () -> IO ()
- withCustomHelper :: Config a -> IO ()
Documentation
the configuration for EntryHelper.
runshould execute XMonad using a customized configuration.compile forceshould compile the source file and return a value which will lately be consumed bypostCompile.forceis just a hint about whether the compilation should be forced.compileis free to ignore it and do up-to-date check on its own.postCompile valshould take action according to theval, usually produced bycompile
Note that:
compileshould create a new process for compilation, as otherwise things likeexecuteFilewill replace the current process image with a new process image, make it impossible forpostCompileto invoke.forceis just a hint about whether the compilation should be forced. andcompileis free to ignore it and do up-to-date checking on its own.- don't remove the binary file when the compilation has failed, as XMonad restart relies on it.
defaultConfig :: Config ExitCode Source
default config for xmonad-entryhelper, invokes xmonad with its default config file
withHelper :: IO () -> IO () Source
withHelper e is the same as calling withCustomHelper with default
compile and postCompile actions
Either of the following will work:
- replace your main entry with
main = withHelper yourOldMain - use
main = withHelper (xmonad cfg)if you have only customized yourXConfig
withCustomHelper :: Config a -> IO () Source
simulates the way that XMonad handles its command line arguments.
- when called with no argument, the action in
runwill be used - when called with a string prefixed with
"--resume", or when called with"--replace", the action inrunwill be used - when called with
"--recompile"or"--restart",compilewill be called. AndpostCompilewill handle the results from compliation. - additionally when called with
"--restart"a restart request will be sent to the current XMonad instance after the compilation regardless of the compilation result.