Skip to content

Instantly share code, notes, and snippets.

@Scherso
Last active February 11, 2023 19:28
Show Gist options
  • Save Scherso/25295c24daf1280ff1fca8483f20d6f9 to your computer and use it in GitHub Desktop.
Save Scherso/25295c24daf1280ff1fca8483f20d6f9 to your computer and use it in GitHub Desktop.
Fix for the "Wine System Tray" appearing on XMonad when using Wine.

Wine System Tray Fix for Xmonad

If you have used Xmonad and Wine on any Windows applications, you have probably noticed a window popping up with a logo of the app you're using. Here's a fix.

  • Firsty, find your xmonad.hs file, and edit it with your editor of choice.
  • Secondly, add the following function anywhere in the file:
import XMonad.StackSet as W 

doHide :: ManageHook
doHide = ask >>= doF . W.delete

Alternatively, to close/quit, you can replace the bottom text with doHide = ask >>= liftX . killWindow >> mempty

  • Next you will find your Manage hook, or create one, here's an example of what it would look like:
myManageHook = composeAll
    [ isFullscreen --> doFullFloat
    , className =? "Gimp" --> doFloat
    ]
  • Once you have found it you will add the following line somewhere in the scope of the brackets [
, title =? "Wine System Tray" --> doHide
  • Example:
myManageHook = composeAll
    [ isFullscreen --> doFullFloat
    , className =? "Gimp" --> doFloat
    , title =? "Wine System Tray" --> doHide
    ]

Thanks @Nilsen84 for making the code lol

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