Forked from slackcals/Xmonad - loghook for mouse disable
Last active
January 28, 2019 20:41
-
-
Save Solonarv/fe2c14698a925a19ee3b8a7a92cb9595 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
-- | |
-- Is there a more efficient/elegant way to do this? | |
-- | |
-- Objective: To disable/enable the mouse cursor for specific windows | |
-- | |
checkMouseDisable :: X () | |
checkMouseDisable = do | |
curTag <- gets (W.currentTag . windowset) | |
when (curTag `elem` enable) $ spawn "xinput --enable 11" | |
when (curTag `elem` disable) $ spawn "xinput --disable 11" | |
where | |
enable = ["5:mail", "9:float"] | |
disable = ["1:main", "2:extra_terminals", "3:browser", "4", "6", "7", "8"] | |
myConfig = desktopConfig | |
{ | |
-- ... | |
, logHook = updatePointer (0.50, 0.50) (1, 1) | |
>> checkMouseDisable | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is significantly easier to read, Solonarv. Thank you so much!