139 lines
5.1 KiB
Haskell
139 lines
5.1 KiB
Haskell
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 "rio" ["-e","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 "rio" ["-e",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
|
|
}
|
|
|
|
spinNotes :: Project
|
|
spinNotes =
|
|
Project { projectName = "notes"
|
|
, projectDirectory = "~/zk/org-roam/"
|
|
, projectStartHook = Just $ do safeSpawn "emacs" ["~/zk/org-roam/20240202124747-index.org"]
|
|
}
|
|
|
|
adminProject = spinTextEditorAndTerm "~/admin/"
|
|
candyProject = spinTextEditorAndTerm "~/candy/"
|
|
workProject = spinTextEditorAndTerm "~/relex/"
|
|
workAnsibleProject = spinTextEditorAndTerm "~/relex/ansible-roles/"
|
|
|
|
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"
|
|
, spinNotes
|
|
, 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 "communication-nix-103"
|
|
, workProject "cooper"
|
|
, workProject "crebain"
|
|
, workProject "customer-configs"
|
|
, workProject "customer-modules"
|
|
, workProject "docker-images"
|
|
, workProject "fangorn"
|
|
, workProject "gitlab-runners"
|
|
, workProject "gitlab-self-manage"
|
|
, workProject "infra-inventory"
|
|
, workProject "isengard"
|
|
, workProject "isengard-2"
|
|
, workProject "isengard-3"
|
|
, workProject "jirawiz"
|
|
, workAnsibleProject "java"
|
|
, 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 "pck-access"
|
|
, workProject "planning-cloud"
|
|
, workProject "rfcs"
|
|
, workProject "runner-tests"
|
|
, 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 "rio" ["-e","btop"]
|
|
}
|
|
, 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 = [] }
|