[xmonad] spawnOn does not launch the app in the specified workspace

Marcelo de Moraes Serpa celoserpa at gmail.com
Fri Dec 27 22:05:27 UTC 2013


Hi list,

I'm trying to spawn a few apps at startup using XMonad.Actions.SpawnOn. I'm
using this repo as a starting point:
github.com/davidbrewer/xmonad-ubuntu-conf.

I have modified the xmonad.hs as follows:

...

> myWorkspaces =
>   [
>     "7:Chat",  "8:Dbg", "9:Pix",
>     "4:Docs",  "5:Dev", "6:Web",
>     "1:Term",  "2:Hub", "3:Mail",
>     "0:VM",    "Extr1", "Extr2"
>   ]



...

> main = do
>   xmproc <- spawnPipe "xmobar ~/.xmonad/xmobarrc"
>   xmonad $ withUrgencyHook NoUrgencyHook $ defaultConfig {
>     focusedBorderColor = myFocusedBorderColor
>   , normalBorderColor = myNormalBorderColor
>   , terminal = myTerminal
>   , borderWidth = myBorderWidth
>   , layoutHook = myLayouts
>   , workspaces = myWorkspaces
>   , modMask = myModMask
>   , handleEventHook = fullscreenEventHook
>   , startupHook = do
>       setWMName "LG3D"
>       windows $ W.greedyView startupWorkspace
>       spawn "~/.xmonad/startup-hook"
>
>>      * spawnOn "7:Chat" "firefox"*
>
>   , manageHook = manageHook defaultConfig
>       <+> composeAll myManagementHooks
>       <+> manageDocks
>   , logHook = dynamicLogWithPP $ xmobarPP {
>       ppOutput = hPutStrLn xmproc
>       , ppTitle = xmobarColor myTitleColor "" . shorten myTitleLength
>       , ppCurrent = xmobarColor myCurrentWSColor ""
>         . wrap myCurrentWSLeft myCurrentWSRight
>       , ppVisible = xmobarColor myVisibleWSColor ""
>         . wrap myVisibleWSLeft myVisibleWSRight
>       , ppUrgent = xmobarColor myUrgentWSColor ""
>         . wrap myUrgentWSLeft myUrgentWSRight
>     }
>   }
>     `additionalKeys` myKeys

...

However, it will just always spawn the app in the *current* workspace, and
never in the workspace passed in the 1st argument.

I'm using:

* Ubuntu 12.04 LTS
* xmonad 0.10 (installed from Ubuntu's 12.04 deb packages)
* And I'm using the git repo I mentioned above as a starting point.

Am I doing anything wrong?

Thanks in advance,

-- Marcelo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/xmonad/attachments/20131227/69c4b5af/attachment.html>


More information about the xmonad mailing list