[xmonad] mplayer & borders

Roman Cheplyaka roma at ro-che.info
Sat Feb 2 06:08:03 EST 2008


* Don Stewart <dons at galois.com> [2008-02-01 17:40:26-0800]
> xj2106:
> > Roman Cheplyaka <roma at ro-che.info> writes:
> > 
> > > * Xiao-Yong Jin <xj2106 at columbia.edu> [2008-02-01 17:25:13-0500]
> > >> Roman Cheplyaka <roma at ro-che.info> writes:
> > >> 
> > >> > It seems to be one of the most frequently asked questions on the IRC, so
> > >> > I've just added it to FAQ[1]. As I wrote there, I don't see any way to
> > >> > automate this task with manageHook. Keeping an extra bit for each window
> > >> > (whether to draw borders) looks like overkill for, I guess, single
> > >> > program which needs it. Does anyone have ideas how to automate
> > >> > NoBorders in a simple way?
> > >> >
> > >> >   1. http://haskell.org/haskellwiki/Xmonad/Frequently_asked_questions#I_don.27t_like_borders_around_mplayer
> > >> 
> > >> I don't understand why xmonad cannot do the same thing as
> > >> how dwm treats mplayer.
> > >
> > > Would you tell us?
> > >
> > > I don't see dwm treats mplayer separately.
> > > Just one rule to make it floating in config.def.h.
> > 
> > Have you tried it?  It is not a separate treatment.  The
> > issue is that, in dwm, when the rule is applied, full
> > screened mplayer, got by pressing `f', is _correctly_
> > positioned on the screen, borders _outside_ of the screen.
> > On the contrary, what you can get from a floating full
> > screened mplayer in xmonad is top and left borders on the
> > edge of the screen and you need to move the mplayer window
> > up and left 1 pixel manually to achieve what dwm does
> > automatically.
> > 
> > I'm no expert on window manager.  Hope the above description
> > is informative enough.
> 
> Oh! How about we just have a manageHook that sets the desired
> geometry?

Any ideas on how to do it?
I came to:

> fullScreen :: Ord a => a -> S.StackSet i l a s sd -> S.StackSet i l a s sd
> fullScreen w s = s { S.floating = M.insert w (S.RationalRect 0 0 1 1) (S.floating s) }
> mplayerManageHook :: ManageHook
> mplayerManageHook = ask >>= doF . fullScreen

Firstly, it doesn't actually work with mplayer -- maybe due to
sizehints?
Secondly, though it works e.g. with rxvt, border is still there. It's
not that easy to cheat with borders, I think.                                    

-- 
Roman I. Cheplyaka (aka Feuerbach @ IRC)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: Digital signature
Url : http://www.haskell.org/pipermail/xmonad/attachments/20080202/bbf2713b/attachment.bin


More information about the xmonad mailing list