[Xmonad] Some questions

Sébastien Gross seb-xmonad at chezwam.org
Thu Aug 9 11:33:44 EDT 2007


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


More information about the Xmonad mailing list