
Hi there, I have juste found Xmonad yesterday and I intend to switch from ion3 to it. Meanwhile I got some (newbie) questions (I do not have any haskell skills): - it is possible to switch from one desktop to one other using Mod+[1..9]. Is it possible to configure Xmonad to switch to the next, previous desktop using Mod+Sift+(lsft/right) ? - running mplayer in fullscreen (hit the f key in mplayer) does not fill the screen but the window. Some workarround exist (such as using Xmonad full screen or using the FindEmptyWorkspace module), but using the functionnality from mplayer would be greater. - I do use Konsole as console and under ion I wrote a handy tool to ssh from my desktop to an other server throught jumphosts: konsole_kicker "ssh -t jump1 ssh -t jump2 ssh -t desthost; exit;" \ "desthost" <pid> in fact konsole_kicker uses dcop to display the command string inside a new tab in the current console. The question is is it possible to get the pid of the current window and how? In lua I use: --8<-- function PID(cwin) local atom=ioncore.x_intern_atom("_NET_WM_PID", false) local t=ioncore.x_get_window_property(cwin:xid(), atom, 0, 0, true) if t then return t[1] end --end end function konsole_kicker(cwin, cmd, session) if not cwin or cwin:get_ident().class ~= "Konsole" then pid = 0 else pid = PID(cwin) if not pid then pid = 0 end end cl = string.format('%s "%s" %s %d', konsole_kicker_bin, cmd, session, pid) ioncore.exec(cl) end --8<-- this might me translatable to haskell I think. I surelly have some new question later :-) Thanks in advanve Cheers, -- Sébastien Gross

Hi there, I have juste found Xmonad yesterday and I intend to switch from ion3 to it. Meanwhile I got some (newbie) questions (I do not have any haskell skills): - it is possible to switch from one desktop to one other using Mod+[1..9]. Is it possible to configure Xmonad to switch to the next, previous desktop using Mod+Sift+(lsft/right) ? - running mplayer in fullscreen (hit the f key in mplayer) does not fill the screen but the window. Some workarround exist (such as using Xmonad full screen or using the FindEmptyWorkspace module), but using the functionnality from mplayer would be greater. - I do use Konsole as console and under ion I wrote a handy tool to ssh from my desktop to an other server throught jumphosts: konsole_kicker "ssh -t jump1 ssh -t jump2 ssh -t desthost; exit;" \ "desthost" <pid> in fact konsole_kicker uses dcop to display the command string inside a new tab in the current console. The question is is it possible to get the pid of the current window and how? In lua I use: --8<-- function PID(cwin) local atom=ioncore.x_intern_atom("_NET_WM_PID", false) local t=ioncore.x_get_window_property(cwin:xid(), atom, 0, 0, true) if t then return t[1] end --end end function konsole_kicker(cwin, cmd, session) if not cwin or cwin:get_ident().class ~= "Konsole" then pid = 0 else pid = PID(cwin) if not pid then pid = 0 end end cl = string.format('%s "%s" %s %d', konsole_kicker_bin, cmd, session, pid) ioncore.exec(cl) end --8<-- this might me translatable to haskell I think. I surelly have some new question later :-) Thanks in advanve Cheers, -- Sébastien Gross

Sébastien Gross a écrit :
- it is possible to switch from one desktop to one other using Mod+[1..9]. Is it possible to configure Xmonad to switch to the next, previous desktop using Mod+Sift+(lsft/right) ?
You can check RotView (on http://xmonad.org/contrib.html) which does that. That's the only question i can answer to (I am a noob too). Cheers

Am Donnerstag, 9. August 2007 17:33 schrieb Sébastien Gross:
- it is possible to switch from one desktop to one other using Mod+[1..9]. Is it possible to configure Xmonad to switch to the next, previous desktop using Mod+Sift+(lsft/right) ?
Yes. My Config.hs contains this (in the definition of keys): ((modMask .|. controlMask, xK_Left), withWindowSet $ view . pred . W.tag . W.workspace . W.current), ((modMask .|. controlMask, xK_Right), withWindowSet $ view . succ . W.tag . W.workspace . W.current) (Replace controlMask by shiftMask.)
- running mplayer in fullscreen (hit the f key in mplayer) does not fill the screen but the window. Some workarround exist (such as using Xmonad full screen or using the FindEmptyWorkspace module), but using the functionnality from mplayer would be greater.
I don't have a real solution for this. I use XMonadContrib.SwitchTrans with mod+f bound to toggle fullscreen mode, which works good enough in practice. HTH, Lukas

FWIW I've found mplayer to behave pretty badly under xmonad. Sometimes when I've used it the display doesn't come up at all, other times it comes up fine. I'm not sure if this is the fault of xmonad or mplayer (mplayer is one of the least stable Linux applications I know of). Mike Lukas Mai wrote:
Am Donnerstag, 9. August 2007 17:33 schrieb Sébastien Gross:
- it is possible to switch from one desktop to one other using Mod+[1..9]. Is it possible to configure Xmonad to switch to the next, previous desktop using Mod+Sift+(lsft/right) ?
Yes. My Config.hs contains this (in the definition of keys):
((modMask .|. controlMask, xK_Left), withWindowSet $ view . pred . W.tag . W.workspace . W.current), ((modMask .|. controlMask, xK_Right), withWindowSet $ view . succ . W.tag . W.workspace . W.current)
(Replace controlMask by shiftMask.)
- running mplayer in fullscreen (hit the f key in mplayer) does not fill the screen but the window. Some workarround exist (such as using Xmonad full screen or using the FindEmptyWorkspace module), but using the functionnality from mplayer would be greater.
I don't have a real solution for this. I use XMonadContrib.SwitchTrans with mod+f bound to toggle fullscreen mode, which works good enough in practice.
HTH, Lukas _______________________________________________ Xmonad mailing list Xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad

kpdf and evince fullscreen modes are also broken, and kpdf generally strikes me as a pretty well-written program. I have no idea what hints or tricks are supposed to make full-screen mode work, but am pretty certain that xmonad doesn't understand them properly. It's a shame, because it's one of the easier requests to handle! (But I have no idea how to fix it myself, so I'm part of the problem...) David On Thu, Aug 09, 2007 at 02:14:04PM -0700, Michael Vanier wrote:
FWIW I've found mplayer to behave pretty badly under xmonad. Sometimes when I've used it the display doesn't come up at all, other times it comes up fine. I'm not sure if this is the fault of xmonad or mplayer (mplayer is one of the least stable Linux applications I know of).
Mike
Lukas Mai wrote:
Am Donnerstag, 9. August 2007 17:33 schrieb Sébastien Gross:
- it is possible to switch from one desktop to one other using Mod+[1..9]. Is it possible to configure Xmonad to switch to the next, previous desktop using Mod+Sift+(lsft/right) ?
Yes. My Config.hs contains this (in the definition of keys):
((modMask .|. controlMask, xK_Left), withWindowSet $ view . pred . W.tag . W.workspace . W.current), ((modMask .|. controlMask, xK_Right), withWindowSet $ view . succ . W.tag . W.workspace . W.current)
(Replace controlMask by shiftMask.)
- running mplayer in fullscreen (hit the f key in mplayer) does not fill the screen but the window. Some workarround exist (such as using Xmonad full screen or using the FindEmptyWorkspace module), but using the functionnality from mplayer would be greater.
I don't have a real solution for this. I use XMonadContrib.SwitchTrans with mod+f bound to toggle fullscreen mode, which works good enough in practice.
HTH, Lukas

I note that under ion, mplayer fullscreen mode goes to what appears to be a new workspace. Maybe this is a usable trick, or maybe it's just an awful hack. Mike David Roundy wrote:
kpdf and evince fullscreen modes are also broken, and kpdf generally strikes me as a pretty well-written program. I have no idea what hints or tricks are supposed to make full-screen mode work, but am pretty certain that xmonad doesn't understand them properly. It's a shame, because it's one of the easier requests to handle! (But I have no idea how to fix it myself, so I'm part of the problem...)
David
On Thu, Aug 09, 2007 at 02:14:04PM -0700, Michael Vanier wrote:
FWIW I've found mplayer to behave pretty badly under xmonad. Sometimes when I've used it the display doesn't come up at all, other times it comes up fine. I'm not sure if this is the fault of xmonad or mplayer (mplayer is one of the least stable Linux applications I know of).
Mike
Lukas Mai wrote:
Am Donnerstag, 9. August 2007 17:33 schrieb Sébastien Gross:
- it is possible to switch from one desktop to one other using Mod+[1..9]. Is it possible to configure Xmonad to switch to the next, previous desktop using Mod+Sift+(lsft/right) ? Yes. My Config.hs contains this (in the definition of keys):
((modMask .|. controlMask, xK_Left), withWindowSet $ view . pred . W.tag . W.workspace . W.current), ((modMask .|. controlMask, xK_Right), withWindowSet $ view . succ . W.tag . W.workspace . W.current)
(Replace controlMask by shiftMask.)
- running mplayer in fullscreen (hit the f key in mplayer) does not fill the screen but the window. Some workarround exist (such as using Xmonad full screen or using the FindEmptyWorkspace module), but using the functionnality from mplayer would be greater. I don't have a real solution for this. I use XMonadContrib.SwitchTrans with mod+f bound to toggle fullscreen mode, which works good enough in practice.
HTH, Lukas
Xmonad mailing list Xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad

Michael Vanier
I note that under ion, mplayer fullscreen mode goes to what appears to be a new workspace. Maybe this is a usable trick, or maybe it's just an awful hack.
Mike
David Roundy wrote:
kpdf and evince fullscreen modes are also broken, and kpdf generally strikes me as a pretty well-written program. I have no idea what hints or tricks are supposed to make full-screen mode work, but am pretty certain that xmonad doesn't understand them properly. It's a shame, because it's one of the easier requests to handle! (But I have no idea how to fix it myself, so I'm part of the problem...)
David
On Thu, Aug 09, 2007 at 02:14:04PM -0700, Michael Vanier wrote:
FWIW I've found mplayer to behave pretty badly under xmonad. Sometimes when I've used it the display doesn't come up at all, other times it comes up fine. I'm not sure if this is the fault of xmonad or mplayer (mplayer is one of the least stable Linux applications I know of).
Mike
Lukas Mai wrote:
Am Donnerstag, 9. August 2007 17:33 schrieb Sébastien Gross:
- it is possible to switch from one desktop to one other using Mod+[1..9]. Is it possible to configure Xmonad to switch to the next, previous desktop using Mod+Sift+(lsft/right) ? Yes. My Config.hs contains this (in the definition of keys):
((modMask .|. controlMask, xK_Left), withWindowSet $ view . pred . W.tag . W.workspace . W.current), ((modMask .|. controlMask, xK_Right), withWindowSet $ view . succ . W.tag . W.workspace . W.current)
(Replace controlMask by shiftMask.)
- running mplayer in fullscreen (hit the f key in mplayer) does not fill the screen but the window. Some workarround exist (such as using Xmonad full screen or using the FindEmptyWorkspace module), but using the functionnality from mplayer would be greater. I don't have a real solution for this. I use XMonadContrib.SwitchTrans with mod+f bound to toggle fullscreen mode, which works good enough in practice.
HTH, Lukas
DWM circumvents it by tagging some particular programs NULL. ---------- DWM config.h ---------- /* Query class:instance:title for regex matching info with following command: * xprop | awk -F '"' '/^WM_CLASS/ { printf("%s:%s:",$4,$2) }; /^WM_NAME/ { printf("%s\n",$2) }' */ #define RULES \ static Rule rule[] = { \ /* class:instance:title regex tags regex isfloating */ \ { "Gimp", NULL, True }, \ { "MPlayer", NULL, True }, \ { "Acroread", NULL, True }, \ }; ---------- config.h ends ---------- I think it's a good way to go, if all other fails. BTW, could you stop top-posting in a mailing list? - Xiao-Yong -- c/* __o/* <\ * (__ */\ <

mvanier:
FWIW I've found mplayer to behave pretty badly under xmonad. Sometimes when I've used it the display doesn't come up at all, other times it comes up fine. I'm not sure if this is the fault of xmonad or mplayer (mplayer is one of the least stable Linux applications I know of).
mplayer in the float layer, in the darcs version, seems pretty well behvaed in my experience. -- don

Donald Bruce Stewart wrote:
mvanier:
FWIW I've found mplayer to behave pretty badly under xmonad. Sometimes when I've used it the display doesn't come up at all, other times it comes up fine. I'm not sure if this is the fault of xmonad or mplayer (mplayer is one of the least stable Linux applications I know of).
mplayer in the float layer, in the darcs version, seems pretty well behvaed in my experience.
-- don
Is there any way to make sure that it launches in the float layer if you're using e.g. a tabbed or full or tiled window layout? Also, a full-screen float window seems to make the other windows in the workspace unreachable (or at least I can't figure out how to reach them in that case). Mike

dons@cse.unsw.edu.au (Donald Bruce Stewart) writes:
mvanier:
FWIW I've found mplayer to behave pretty badly under xmonad. Sometimes when I've used it the display doesn't come up at all, other times it comes up fine. I'm not sure if this is the fault of xmonad or mplayer (mplayer is one of the least stable Linux applications I know of).
mplayer in the float layer, in the darcs version, seems pretty well behvaed in my experience.
-- don
Are you sure that the full screen toggle using `f' works for you? - Xiao-Yong -- c/* __o/* <\ * (__ */\ <

On Fri, Aug 10, 2007 at 04:41:28PM -0400, xj2106@columbia.edu wrote:
dons@cse.unsw.edu.au (Donald Bruce Stewart) writes:
mvanier:
FWIW I've found mplayer to behave pretty badly under xmonad. Sometimes when I've used it the display doesn't come up at all, other times it comes up fine. I'm not sure if this is the fault of xmonad or mplayer (mplayer is one of the least stable Linux applications I know of).
mplayer in the float layer, in the darcs version, seems pretty well behvaed in my experience.
Well I did not found the float layer
Are you sure that the full screen toggle using `f' works for you?
Not for me And as I am using a 14-pixel status bar, there is a part of the screen that is not coverred by the mplayer window. kpdf does not seems to been correctly handled either. in an other hand, gqview seems to work fine in full screen mode. Maybe a workaround should be to add a fullscreen mode like ion does, this would be very handy. -- Sébastien Gross

On Thu, Aug 09, 2007 at 05:33:44PM +0200, seb-xmonad@chezwam.org wrote:
- I do use Konsole as console and under ion I wrote a handy tool to ssh from my desktop to an other server throught jumphosts: konsole_kicker "ssh -t jump1 ssh -t jump2 ssh -t desthost; exit;" \ "desthost" <pid> in fact konsole_kicker uses dcop to display the command string inside a new tab in the current console. The question is is it possible to get the pid of the current window and how?
I found xdotool (http://www.semicomplete.com/projects/xdotool) that helps me to do what I want. For the ones that might interest, the lua code is replaced by: --8<-- xid=$(xdotool getwindowfocus) if ! xprop -id ${xid} | grep '^WM_NAME(STRING) = ".* - Konsole"$' > /dev/null; then pid='' else pid=$(xprop -id ${xid} | grep PID | awk '{print $NF}') fi --8<-- -- Sébastien Gross
participants (8)
-
alexandre
-
David Roundy
-
dons@cse.unsw.edu.au
-
Lukas Mai
-
Michael Vanier
-
Sebastien Gross
-
Sébastien Gross
-
Xiao-Yong Jin