Skip to content

Instantly share code, notes, and snippets.

@danielsnider
Created June 18, 2014 20:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielsnider/9ef97eff09269b267fa5 to your computer and use it in GitHub Desktop.
Save danielsnider/9ef97eff09269b267fa5 to your computer and use it in GitHub Desktop.
Xmonad config with gnome panel and programs which open and move to specific workspaces by default
import XMonad
import XMonad.Config.Gnome
import qualified XMonad.StackSet as W
spawnToWorkspace :: String -> String -> X ()
spawnToWorkspace program workspace = do
spawn program
windows $ W.greedyView workspace
main = xmonad gnomeConfig
    {
    workspaces = ["1","2","3","4","5","6","7","8","9"]
    , startupHook = startup
    , manageHook = composeAll
        [ manageHook gnomeConfig
--, title =? "Xmonad - Microsoft OneNote (Product Activation Failed)" --> doShift "1"
, className =? "ONENOTE.EXE" --> doShift "1"
, className =? "Sublime_text" --> doShift "3"
, title =? "Untitled - Google Chrome" --> doShift "2"
, title =? "myterm" --> doShift "4"
, title =? "Music" --> doShift "9"
, className =? "update-notifier" --> doShift "8"
        ]
    }
    where
        startup = do
            spawn "google-chrome"
            spawn "/home/dan/onenote2.sh"
            spawn "subl"
            spawn "gnome-terminal -t myterm -e /home/dan/openscreen.sh"
            spawn "nautilus /home/dan/Music/"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment