Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Solonarv/fe2c14698a925a19ee3b8a7a92cb9595 to your computer and use it in GitHub Desktop.
Save Solonarv/fe2c14698a925a19ee3b8a7a92cb9595 to your computer and use it in GitHub Desktop.
--
-- 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
}
@slackcals
Copy link

This is significantly easier to read, Solonarv. Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment