Add singleApp helper

This commit is contained in:
EEva (JPotier) 2020-11-07 09:04:05 +02:00
parent 3a5d170fe9
commit 368de76deb

View file

@ -6,9 +6,19 @@ import XMonad
import XMonad.Actions.DynamicProjects import XMonad.Actions.DynamicProjects
import XMonad.Util.Run import XMonad.Util.Run
singleApp :: String -> Project
singleApp app = Project
{ projectName = app
, projectDirectory = "/tmp"
, projectStartHook = Just $ do spawn app
}
projects :: [Project] projects :: [Project]
projects = projects =
[ Project { projectName = "admin" [ singleApp "reaper"
, singleApp "renoise"
, singleApp "steam"
, Project { projectName = "admin"
, projectDirectory = "~/admin" , projectDirectory = "~/admin"
, projectStartHook = Just $ do safeSpawn "vim" ["-g"] , projectStartHook = Just $ do safeSpawn "vim" ["-g"]
safeSpawnProg "mlterm" safeSpawnProg "mlterm"
@ -30,10 +40,6 @@ projects =
, projectDirectory = "/tmp" , projectDirectory = "/tmp"
, projectStartHook = Just $ do safeSpawnProg "pavucontrol" , projectStartHook = Just $ do safeSpawnProg "pavucontrol"
} }
, Project { projectName = "steam"
, projectDirectory = "~/"
, projectStartHook = Just $ do spawn "steam"
}
, Project { projectName = "web" , Project { projectName = "web"
, projectDirectory = "/tmp" , projectDirectory = "/tmp"
, projectStartHook = Just $ do spawn "firefox" , projectStartHook = Just $ do spawn "firefox"