module Projects ( Projects.modify ) where import XMonad import XMonad.Actions.DynamicProjects import XMonad.Util.Run spinTextEditorAndTerm :: String -> String -> Project spinTextEditorAndTerm dir name = Project { projectName = name , projectDirectory = dir <> name , projectStartHook = Just $ safeSpawn "nvidia-offload" ["kitty","tmux","new","-A","-s",name] } spinChat :: String -> Project spinChat name = Project { projectName = name , projectDirectory = "/tmp" , projectStartHook = Just $ do safeSpawnProg (name <> "-desktop") } spinInTermWithName :: String -> String -> Project spinInTermWithName projectName cmd = Project { projectName = projectName , projectDirectory = "/tmp" , projectStartHook = Just $ do safeSpawn "kitty" [cmd] } spinInTerm :: String -> Project spinInTerm name = spinInTermWithName name name justStart :: String -> Project justStart name = justStartWithName name name justStartWithName :: String -> String -> Project justStartWithName name pgm = Project { projectName = name , projectDirectory = "/tmp" , projectStartHook = Just $ do safeSpawnProg pgm } adminProject = spinTextEditorAndTerm "~/admin/" candyProject = spinTextEditorAndTerm "~/candy/" workProject = spinTextEditorAndTerm "~/relex/" projects :: [Project] projects = [ adminProject "wrk-config" , adminProject "cdc-config" , adminProject "overlays-personal" , candyProject "adventofcode" , candyProject "dhall-packages" , candyProject "hfdb" , justStartWithName "fre" "ff-perso" , justStartWithName "frs" "ff-relex" , justStartWithName "chat" "slack" , justStartWithName "meet" "chromium" , justStartWithName "notes" "obsidian" , justStartWithName "VPN" "gpclient" , spinChat "element" , spinChat "signal" , spinInTerm "k9s" , spinInTermWithName "email" "neomutt" , spinTextEditorAndTerm "~/." "xmonad" -- Dark magic! , workProject "azure-kube-platform" , workProject "azure-kube-platform-environments" , workProject "calculation-node-playbook" , workProject "communication-nix-101" , workProject "communication-nix-102" , workProject "cooper" , workProject "customer-configs" , workProject "customer-modules" , workProject "docker-images" , workProject "fangorn" , workProject "gitlab-runners" , workProject "infra-inventory" , workProject "isengard" , workProject "isengard-worktree-2" , workProject "isengard-worktree-3" , workProject "jirawiz" , workProject "morannon" , workProject "mordor-ca" , workProject "mordor-deploy" , workProject "mordor-interview" , workProject "mordor-nixpkgs" , workProject "mordor-ops" , workProject "mordor-the-repo" , workProject "mordorbooks" , workProject "moria" , workProject "muir" , workProject "nix" , workProject "nix-ansible-role" , workProject "nixos-modules" , workProject "nixpkgs" , workProject "one-off-scripts" , workProject "planning-cloud" , workProject "rfcs" , workProject "slog-agent" , workProject "sm-terraform" , workProject "tech-radar" , workProject "time-tracking" , workProject "ugluk-ansible-role" , workProject "unified-application-gateway" , Project { projectName = "minecraft" , projectDirectory = "/tmp" , projectStartHook = Just $ do safeSpawnProg "minecraft-launcher" safeSpawnProg "mumble" } , Project { projectName = "status" , projectDirectory = "/tmp" , projectStartHook = Just $ do safeSpawn "nvidia-offload" ["kitty","gotop"] } , Project { projectName = "sound" , projectDirectory = "/tmp" , projectStartHook = Just $ do safeSpawn "pw-jack" ["patchage"] safeSpawnProg "easyeffects" } ] modify :: XConfig l -> XConfig l modify conf = dynamicProjects projects conf { workspaces = [] }