Always sink mplayer

Hello, I can't seem to find anything (that works) that allows me to start mplayer sinked into the layout. I don't want it to float since I start mplayer into a separate monitor. I use the latest git as of today's date. Is there anything like doSink (instead of doFloat) or something like that? Thanks in advance. -- Jesús Guerrero

Oops, it seems I forgot to reply to list. Sorry! On Thu, 04 Dec 2008 10:24, Jesús Guerrero wrote:
Hello,
I can't seem to find anything (that works) that allows me to start mplayer sinked into the layout. I don't want it to float since I start mplayer into a separate monitor. I use the latest git as of today's date. Is there anything like doSink (instead of doFloat) or something like that?
Thanks in advance. -- Jesús Guerrero
Try adding the following to your manageHook: [ className =? "MPlayer" --> (ask >>= doF . W.sink) ] I use the same technique to sink qwit [1] on start. [1] http://code.google.com/p/qwit/ Regards, -- Ricardo Martins * scarybox.net * GPG key: 0x1308F1B4

On Thu, December 4, 2008 11:28, Ricardo Martins wrote:
Oops, it seems I forgot to reply to list. Sorry!
On Thu, 04 Dec 2008 10:24, Jesús Guerrero wrote:
Hello,
I can't seem to find anything (that works) that allows me to start mplayer sinked into the layout. I don't want it to float since I start mplayer into a separate monitor. I use the latest git as of today's date. Is there anything like doSink (instead of doFloat) or something like that?
Thanks in advance. -- Jesús Guerrero
Try adding the following to your manageHook:
[ className =? "MPlayer" --> (ask >>= doF . W.sink) ]
Thank you very much for your response. I've tried a number of variants and I am beginning to think that there's something odd about mplayer with xmonad. I've tried adding the following three lines, just in case (and based on your advise): --------- [ className =? "MPlayer" --> (ask >>= doF . W.sink) , title =? "MPlayer" --> (ask >>= doF . W.sink) , resource =? "MPlayer" --> (ask >>= doF . W.sink) --------- However it doesn't seem to change anything. It doesn't fail either. Xmonad recompiles config.hs just ok and it restarts without problems. But nothing seems to change. Xprop tells my that "MPlayer" is the correct string for WM_NAME, WM_ICON_NAME and WM_CLASS: --------- WM_STATE(WM_STATE): window state: Normal icon window: 0x0 WM_NORMAL_HINTS(WM_SIZE_HINTS): program specified location: 256, 192 program specified size: 512 by 384 program specified minimum size: 4 by 4 program specified minimum aspect ratio: 512/384 program specified maximum aspect ratio: 512/384 window gravity: Static WM_ICON_NAME(STRING) = "MPlayer" WM_NAME(STRING) = "MPlayer" _NET_WM_PID(CARDINAL) = 27902 WM_CLASS(STRING) = "xv", "MPlayer" WM_PROTOCOLS(ATOM): protocols WM_DELETE_WINDOW --------- The window still sits floating in the center of the monitor. In any case, thanks again for answering. Cheers :) -- Jesús Guerrero

On Thu, 04 Dec 2008 12:47, Jesús Guerrero wrote:
Thank you very much for your response.
I've tried a number of variants and I am beginning to think that there's something odd about mplayer with xmonad. I've tried adding the following three lines, just in case (and based on your advise):
--------- [ className =? "MPlayer" --> (ask >>= doF . W.sink) , title =? "MPlayer" --> (ask >>= doF . W.sink) , resource =? "MPlayer" --> (ask >>= doF . W.sink) ---------
However it doesn't seem to change anything. It doesn't fail either. Xmonad recompiles config.hs just ok and it restarts without problems. But nothing seems to change.
Xprop tells my that "MPlayer" is the correct string for WM_NAME, WM_ICON_NAME and WM_CLASS:
8< <snip> 8<
In any case, thanks again for answering. Cheers :) -- Jesús Guerrero
Are you sure you don't have a rule in you xmonad.hs for floating mplayer? I just tested the line I sent you and it didn't work (i.e., sink mplayer) *before* I also removed every other reference to MPlayer. The sink rule didn't override the other rules for mplayer. Regards, -- Ricardo Martins * scarybox.net * GPG key: 0x1308F1B4

On Thu, December 4, 2008 13:00, Ricardo Martins wrote:
Are you sure you don't have a rule in you xmonad.hs for floating mplayer? I just tested the line I sent you and it didn't work (i.e., sink mplayer) *before* I also removed every other reference to MPlayer. The sink rule didn't override the other rules for mplayer.
That's the first thing I thought. But there's nothing that is immediately related on a first glance. The only other two references to mplayer are these: The layout of the mplayer desktop (noBorder Full), that's where mplayer runs. However I turned off any custom layout on that desktop, and the result is still the same. A doShift line to shift any mplayer window to the mplayer desktop. Not related either. I am going to investigate a bit more. The answer must be somewhere. If anyone wants to take a look I attach my config. There's nothing really strange about it. Pretty standard stuff. Again, thanks so much for reading and taking the time to answer. And regards. ;) -- Jesús Guerrero

I found nothing wrong with your xmonad.hs. I'm using xmonad 0.8, maybe something related to sink/float is different in the bleeding edge version you're using. Good luck finding a solution. Regards, -- Ricardo Martins * scarybox.net * GPG key: 0x1308F1B4

Jesús Guerrero wrote:
On Thu, December 4, 2008 13:00, Ricardo Martins wrote:
Are you sure you don't have a rule in you xmonad.hs for floating mplayer? I just tested the line I sent you and it didn't work (i.e., sink mplayer) *before* I also removed every other reference to MPlayer. The sink rule didn't override the other rules for mplayer.
That's the first thing I thought. But there's nothing that is immediately related on a first glance.
The only other two references to mplayer are these:
The layout of the mplayer desktop (noBorder Full), that's where mplayer runs. However I turned off any custom layout on that desktop, and the result is still the same.
A doShift line to shift any mplayer window to the mplayer desktop. Not related either.
I am going to investigate a bit more. The answer must be somewhere. If anyone wants to take a look I attach my config. There's nothing really strange about it. Pretty standard stuff.
Again, thanks so much for reading and taking the time to answer. And regards. ;)
From the xmonad core: manageHook :: ManageHook manageHook = composeAll [ className =? "MPlayer" --> doFloat , className =? "Gimp" --> doFloat ] That's the ManageHook from defaultConfig. If you don't use the Gimp, just drop "manageHook defaultConfig" from your xmonad.hs. If you do use the Gimp, copy that second hook into your config's ManageHook. Braden Shepherdson shepheb

Hello, On Thu, December 4, 2008 21:41, Braden Shepherdson wrote:
From the xmonad core:
manageHook :: ManageHook manageHook = composeAll [ className =? "MPlayer" --> doFloat , className =? "Gimp" --> doFloat ]
That's the ManageHook from defaultConfig. If you don't use the Gimp, just drop "manageHook defaultConfig" from your xmonad.hs. If you do use the Gimp, copy that second hook into your config's ManageHook.
I should have looked into that. You are very right, sir. I just removed the defaultConfig for manageHooks, and all started to work as it should. I have Hooks for all the apps I need, so I should have no problem with that. We can close this thread. Thanks to everyone who participated, and to those who took the time to read. This is solved. :) -- Jesús Guerrero

Braden Shepherdson
From the xmonad core:
manageHook :: ManageHook manageHook = composeAll [ className =? "MPlayer" --> doFloat , className =? "Gimp" --> doFloat ]
Is it possible to modify the default such that users' hooks on the same rules as are default rules will "win"? This seems like an issue that will cause a lot of confusion if we add more defaults. (while we're talking about defaults, I've always thought that these ones are silly and arbitrary anyway, and don't use them)
participants (4)
-
Braden Shepherdson
-
Jesús Guerrero
-
mail@justinbogner.com
-
Ricardo Martins