xmonad-config/lib/Projects.hs
2021-03-30 18:46:00 +03:00

85 lines
2.8 KiB
Haskell

module Projects (
Projects.modify
) where
import XMonad
import XMonad.Actions.DynamicProjects
import XMonad.Util.Run
term = "alacritty"
singleTermAppWithName :: String -> String -> Project
singleTermAppWithName name app = Project
{ projectName = name
, projectDirectory = "/tmp"
, projectStartHook = Just $ do safeSpawn term ["-e","zsh","-c",app]
}
singleAppWithName :: String -> String -> Project
singleAppWithName name app = Project
{ projectName = name
, projectDirectory = "/tmp"
, projectStartHook = Just $ do spawn app
}
singleApp :: String -> Project
singleApp app = singleAppWithName app app
projects :: [Project]
projects =
[ singleApp "reaper"
, singleApp "renoise"
, singleApp "steam"
, singleApp "carla"
, singleAppWithName "vcv" "Rack"
, singleAppWithName "element" "element-desktop"
, singleAppWithName "signal" "signal-desktop"
, singleAppWithName "wire" "wire-desktop"
, singleTermAppWithName "email" "neomutt"
, Project { projectName = "admin"
, projectDirectory = "~/admin/nixos-config"
, projectStartHook = Just $ do safeSpawn "vim" ["-g"]
safeSpawnProg term
}
, Project { projectName = "overlays-personal"
, projectDirectory = "~/admin/overlays-personal"
, projectStartHook = Just $ do safeSpawn "vim" ["-g"]
safeSpawnProg term
}
, Project { projectName = "cdc-config"
, projectDirectory = "~/admin/cdc-config"
, projectStartHook = Just $ do safeSpawn "vim" ["-g"]
safeSpawnProg term
}
, Project { projectName = "notes"
, projectDirectory = "~/zk"
, projectStartHook = Just $ do safeSpawn "vim" ["-g"]
safeSpawnProg term
}
, Project { projectName = "xmonad"
, projectDirectory = "~/.xmonad"
, projectStartHook = Just $ do safeSpawn "vim" ["-g"]
safeSpawnProg term
}
, Project { projectName = "accounting"
, projectDirectory = "~/accounting"
, projectStartHook = Just $ do safeSpawnProg term
}
, Project { projectName = "flim"
, projectDirectory = "/flims/rtorrent/download"
, projectStartHook = Just $ do safeSpawnProg term
}
, Project { projectName = "sound"
, projectDirectory = "/tmp"
, projectStartHook = Just $ do safeSpawnProg "pavucontrol"
}
, Project { projectName = "web"
, projectDirectory = "/tmp"
, projectStartHook = Just $ do spawn "firefox"
}
]
modify :: XConfig l -> XConfig l
modify conf = dynamicProjects projects conf
{ workspaces = [] }