all repos — nixfiles @ fbe89264aba6aac51531183290beb1d218602d6c

System and user configuration, managed by nix and home-manager

Xmonad: Force mpv to fullscreen
Alan Pearce alan@alanpearce.co.uk
Thu, 24 Jul 2014 19:29:38 +0100
commit

fbe89264aba6aac51531183290beb1d218602d6c

parent

4df97a86f16884e30590f9c60ba4a358cdcf16aa

1 files changed, 5 insertions(+), 1 deletions(-)

jump to
M tag-xmonad/xmonad/xmonad.hstag-xmonad/xmonad/xmonad.hs
@@ -6,12 +6,16 @@ import XMonad.Hooks.ManageHelpers import XMonad.Layout.NoBorders
 import XMonad.Util.Run(spawnPipe)
 import System.IO
+import Data.List(isPrefixOf)
 
 main :: IO ()
 main = do
   xmproc <-spawnPipe "/usr/bin/xmobar /home/alan/.xmobarrc"
   xmonad $ defaultConfig {
-    manageHook = manageDocks <+> (isFullscreen --> doFullFloat) <+> manageHook defaultConfig,
+    manageHook = composeOne [
+       isFullscreen -?> doFullFloat,
+       fmap ("mpv" `isPrefixOf`) title -?> doFullFloat
+       ] <+> manageDocks <+> manageHook defaultConfig,
     layoutHook = smartBorders . avoidStruts  $  layoutHook defaultConfig,
     logHook = dynamicLogWithPP xmobarPP {
       ppOutput = hPutStrLn xmproc,