diff options
-rw-r--r-- | xmonad.hs | 80 |
1 files changed, 31 insertions, 49 deletions
@@ -270,56 +270,38 @@ myManageHook = xPropMatches :: [XPropMatch] xPropMatches = - [ ([ (xprop, any (app `op`))], pmP (W.shift target)) | (xprop, op, app, target) <- myShifts] ++ - [ ([ (xprop, any (app ==))], pmX (float)) | (xprop, app) <- myFloats] + [ (match, pmP $ W.shift target) | (target, match) <- shifts] ++ + [ (match, pmX $ float) | match <- floats] where - myFloats = - [ (wM_CLASS, "vlc") - , (wM_CLASS, "Xmessage") - , (wM_CLASS, "XVkbd") - , (wM_CLASS, "Xdialog") - , (wM_CLASS, "Pinentry") - , (wM_CLASS, "Pinentry-gtk-2") - , (wM_CLASS, "Tiemu") - , (wM_CLASS, "ultrastardx") - , (wM_CLASS, "Ediff") - , (wM_CLASS, "xtensoftphone") - , (wM_CLASS, "Pqiv") - , (wM_CLASS, "XNots") - , (wM_CLASS, "TeamViewer.exe") - , (wM_CLASS, "AmsnWebcam") - , (wM_NAME, "glxgears") - , (wM_NAME, "Passphrase Required") - , (wM_NAME, "Mark all as read") - , (wM_NAME, "Xplanet 1.2.0") - , (wM_NAME, "Eclipse") - ] - - myShifts = - [ (wM_CLASS, (==), "Opera", "1:web") - , (wM_CLASS, (==), "Chrome", "1:web") - , (wM_CLASS, (==), "Chromium-browser", "1:web") - , (wM_CLASS, (==), "Firefox-bin", "1:web") - - , (wM_CLASS, (==), "Claws-mail", "2:mail") - , (wM_CLASS, (==), "Mitter", "2:mail") - , (wM_CLASS, (==), "wanderlust", "2:mail") - , (wM_NAME, (==), "newsbeuter", "2:mail") - - , (wM_CLASS, (==), "Hexchat", "3:irc") - - -- tkabber roater - , (wM_CLASS, (==), "Tkabber", "4:im") - -- tkabber single messages - , (wM_CLASS, (==), "headlines", "4:im") - , (wM_CLASS, isPrefixOf, "chat_##xmpp##1_zedatconferencejabberfuberlinde", "4:im") - , (wM_CLASS, isPrefixOf, "chat_##xmpp##1_mailanimuxdeSyslogBot", "4:im") - - , (wM_CLASS, (==), "emacs", "5:code") - - , (wM_CLASS, (==), "MPlayer", "video") - , (wM_CLASS, (==), "Amarokapp", "music") - ] + floats = [ [(wM_CLASS, anyOf ["vlc", "Xmessage", "XVkbd", "Xdialog", + "Pinentry", "Pinentry-gtk-2", "Tiemu", + "ultrastardx", "Ediff", "xtensoftphone", + "Pqiv", "XNots", "TeamViewer.exe", + "AmsnWebcam"])] + , [(wM_NAME, anyOf ["glxgears", "Passphrase Required", + "Mark all as read", "Xplanet 1.2.0", + "Eclipse"])] + ] + + shifts = [ ("1:web", [(wM_CLASS, anyOf ["Opera", "Chrome", "Google-chrome", "Chromium-browser", + "Firefox-bin"])]) + , ("2:mail", [(wM_CLASS, anyOf ["Claws-mail", "Evolution", "Mitter", "wanderlust"])]) + , ("2:mail", [(wM_NAME, anyOf ["newsbeuter"])]) + , ("3:irc", [(wM_CLASS, anyOf ["Hexchat"])]) + , ("4:im", [(wM_CLASS, anyOf ["TKabber", "headlines", "Vacuum"])]) + + -- tkabber single messages + , ("4:im", [(wM_CLASS, anyOf' isPrefixOf ["chat_##xmpp##1_zedatconferencejabberfuberlinde", + "chat_##xmpp##1_mailanimuxdeSyslogBot"])]) + + , ("5:code", [(wM_CLASS, anyOf ["emacs"])]) + + , ("video", [(wM_CLASS, anyOf ["MPlayer"])]) + , ("music", [(wM_CLASS, anyOf ["Amarokapp"])]) + ] + + anyOf' op valids tests = any (\test -> any (\valid -> op valid test) valids) tests + anyOf = anyOf' (==) -- -- Keys |