Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DylanLukes/b22e31b50ce96f078c92d21cddf347eb to your computer and use it in GitHub Desktop.
Save DylanLukes/b22e31b50ce96f078c92d21cddf347eb 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
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment