Forked from Solonarv/Xmonad - loghook for mouse disable.hs
Created
January 28, 2019 20:35
-
-
Save DylanLukes/b22e31b50ce96f078c92d21cddf347eb to your computer and use it in GitHub Desktop.
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
-- | |
-- 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