2
I'm using XMonad configured to accept commands through wmctrl
and would like to start up a few applications through xinitrc
and move them to a certain workspace.
Those commands work, when I use the through the terminal:
# Launch a terminal with ncmpcpp and move it to workspace 9
urxvt -e ncmpcpp && wmctrl -r ncmpcpp -t 9
But if I try to put them into my .xinitrc
they are not working anymore. The applications start-up, but aren't moved to the correct screen. I suspect this is because the calls execute before xmonad has been executed.
xinitrc
:
(urxvt -e ncmpcpp && wmctrl -r ncmpcpp -t 9) &
exec xmonad
I already tried adding a sleep-period, but this did not help either and I would like to get this working reliably:
(urxvt -e ncmpcpp && sleep 5 && wmctrl -r ncmpcpp -t 9) &
exec xmonad
Isn't the purpose of
exec
to replace the current process with the process launched by the arguments and how are commands executed after that? – pmr – 2014-01-20T18:43:22.873That's my bad, I'm to tired to think right now. – None – 2014-01-20T18:52:21.440