xmonad-config/lib/Projects.hs

129 lines
4.8 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 "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 "meeeting" "chromium"
, justStartWithName "notes" "logseq"
, spinChat "element"
, spinChat "signal"
, spinChat "wire"
, spinInTerm "k9s"
, spinInTermWithName "email" "neomutt"
, spinTextEditorAndTerm "~/." "xmonad" -- Dark magic!
, workProject "azure-core-infra"
, workProject "azure-kube-platform"
, workProject "azure-kube-platform-environments"
, workProject "bob-the-builder"
, workProject "calculation-node-playbook"
, workProject "common-cicd-config-private-cloud"
, workProject "communication-nix-101"
, workProject "connect2-provisioning"
, workProject "connect2-terraform"
, workProject "cooper"
, workProject "customer-configs"
, workProject "customer-modules"
, workProject "docker-images"
, workProject "frankenbase"
, workProject "gitlab-runners"
, workProject "gitlab-self-manage"
, workProject "infra-inventory"
, workProject "isengard"
, workProject "isengard-worktree-2"
, workProject "isengard-worktree-3"
, workProject "linkerd-plugins"
, workProject "morannon"
, workProject "mordor-ca"
, workProject "mordor-dashboard"
, workProject "mordor-deploy"
, workProject "mordor-interview"
, workProject "mordor-kvm"
, workProject "mordor-nixpkgs"
, workProject "mordor-ops"
, workProject "mordor-sudo"
, workProject "mordor-the-repo"
, workProject "mordorbooks"
, workProject "muir"
, workProject "nix"
, workProject "nix-ansible-role"
, workProject "nixos-modules"
, workProject "nixpkgs"
, workProject "planning-cloud"
, workProject "prototype-task-tracking"
, workProject "rfcs"
, workProject "sm-terraform"
, workProject "storagegrid-prototype"
, workProject "time-tracking"
, workProject "ugluk-ansible-role"
, 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 = [] }