Created
January 24, 2019 18:36
-
-
Save slackcals/0054247ce41edd0aef500dbb8cd3d83d to your computer and use it in GitHub Desktop.
How to use "when"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- from: https://mail.haskell.org/pipermail/xmonad/2009-May/007979.html | |
logHook = ...other stuff... >> checkKBLayout | |
... | |
checkKBLayout :: X () | |
checkKBLayout = do | |
curTag <- gets (W.currentTag . windowset) | |
when (curTag == "foo") $ spawn "set keyboard layout" | |
-- | |
--result: | |
-- | |
xmonad.hs:68:5: error: | |
* Variable not in scope: when :: Bool -> m0 () -> X () | |
* Perhaps you meant `whenX' (imported from XMonad) | |
| | |
68 | when ( curTag == "3:browser") $ spawn "xinput --disable 11" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment