xmonad-config/lib/Projects.hs

125 lines
4.6 KiB
Haskell
Raw Normal View History

module Projects (
Projects.modify
) where
import XMonad
import XMonad.Actions.DynamicProjects
2019-04-17 16:14:19 +02:00
import XMonad.Util.Run
2021-07-14 11:49:35 +02:00
spinTextEditorAndTerm :: String -> String -> Project
spinTextEditorAndTerm dir name =
2019-09-25 09:03:53 +02:00
Project { projectName = name
2019-12-03 14:46:51 +01:00
, projectDirectory = dir <> name
2021-12-15 11:38:09 +01:00
, projectStartHook = Just
$ safeSpawn "nvidia-offload" ["kitty","tmux","new","-A","-s",name]
2020-09-25 11:13:26 +02:00
}
spinChat :: String -> Project
spinChat name =
Project { projectName = name
, projectDirectory = "/tmp"
, projectStartHook = Just $ do safeSpawnProg (name <> "-desktop")
2019-09-25 09:03:53 +02:00
}
2021-07-14 11:49:35 +02:00
spinInTermWithName :: String -> String -> Project
spinInTermWithName projectName cmd =
Project { projectName = projectName
, projectDirectory = "/tmp"
2021-12-15 11:38:09 +01:00
, projectStartHook = Just $ do safeSpawn "kitty" [cmd]
2021-07-14 11:49:35 +02:00
}
spinInTerm :: String -> Project
spinInTerm name = spinInTermWithName name name
2021-03-03 13:04:23 +01:00
justStart :: String -> Project
2022-02-10 14:23:46 +01:00
justStart name = justStartWithName name name
justStartWithName :: String -> String -> Project
justStartWithName name pgm =
2021-03-03 13:04:23 +01:00
Project { projectName = name
, projectDirectory = "/tmp"
2022-02-10 14:23:46 +01:00
, projectStartHook = Just $ do safeSpawnProg pgm
2021-03-03 13:04:23 +01:00
}
2021-07-14 11:49:35 +02:00
adminProject = spinTextEditorAndTerm "~/admin/"
candyProject = spinTextEditorAndTerm "~/candy/"
workProject = spinTextEditorAndTerm "~/relex/"
2019-12-03 14:46:51 +01:00
projects :: [Project]
2020-09-25 11:13:26 +02:00
projects = [ adminProject "wrk-config"
2020-03-30 09:20:40 +02:00
, adminProject "cdc-config"
2020-11-02 15:01:13 +01:00
, adminProject "overlays-personal"
2022-02-10 14:23:46 +01:00
, candyProject "adventofcode"
2020-07-22 09:24:04 +02:00
, candyProject "dhall-packages"
2021-04-14 11:33:09 +02:00
, candyProject "hfdb"
2022-02-10 14:23:46 +01:00
, justStartWithName "fre" "ff-perso"
, justStartWithName "frs" "ff-relex"
2023-01-23 09:02:12 +01:00
, justStartWithName "chat" "chromium"
2023-03-02 11:59:34 +01:00
, justStartWithName "meet" "chromium"
2022-02-16 08:19:11 +01:00
, justStartWithName "notes" "logseq"
2022-02-18 10:35:11 +01:00
, justStartWithName "VPN" "gpclient"
2020-09-25 11:13:26 +02:00
, spinChat "element"
2021-01-18 11:36:50 +01:00
, spinChat "signal"
2021-07-14 11:49:35 +02:00
, spinInTerm "k9s"
, spinInTermWithName "email" "neomutt"
2021-12-15 11:38:09 +01:00
, spinTextEditorAndTerm "~/." "xmonad" -- Dark magic!
2020-06-05 09:48:19 +02:00
, workProject "azure-kube-platform"
2022-02-10 14:23:46 +01:00
, workProject "azure-kube-platform-environments"
2021-01-20 11:14:51 +01:00
, workProject "calculation-node-playbook"
2021-03-05 15:41:37 +01:00
, workProject "communication-nix-101"
2023-03-02 11:59:34 +01:00
, workProject "communication-nix-102"
2021-04-06 08:29:14 +02:00
, workProject "cooper"
2021-11-01 11:18:25 +01:00
, workProject "customer-configs"
2021-03-03 13:04:23 +01:00
, workProject "customer-modules"
2019-12-03 14:46:51 +01:00
, workProject "docker-images"
2023-03-10 14:09:07 +01:00
, workProject "fangorn"
2021-11-01 11:18:25 +01:00
, workProject "frankenbase"
2019-12-03 14:46:51 +01:00
, workProject "gitlab-runners"
, workProject "infra-inventory"
, workProject "isengard"
2020-09-25 11:13:26 +02:00
, workProject "isengard-worktree-2"
, workProject "isengard-worktree-3"
2022-04-08 11:43:00 +02:00
, workProject "jirawiz"
2021-04-06 08:29:14 +02:00
, workProject "morannon"
2019-12-03 14:46:51 +01:00
, workProject "mordor-ca"
, workProject "mordor-deploy"
2021-11-01 11:18:25 +01:00
, workProject "mordor-interview"
2019-12-31 09:20:42 +01:00
, workProject "mordor-nixpkgs"
2019-12-03 14:46:51 +01:00
, workProject "mordor-ops"
, workProject "mordor-the-repo"
2019-12-03 14:46:51 +01:00
, workProject "mordorbooks"
2020-02-21 07:43:13 +01:00
, workProject "muir"
2020-09-25 11:13:26 +02:00
, workProject "nix"
2021-03-03 13:04:23 +01:00
, workProject "nix-ansible-role"
2020-03-11 08:22:58 +01:00
, workProject "nixos-modules"
2019-12-03 14:46:51 +01:00
, workProject "nixpkgs"
2022-09-15 15:23:00 +02:00
, workProject "one-off-scripts"
2021-11-01 11:18:25 +01:00
, workProject "planning-cloud"
2021-07-14 11:49:35 +02:00
, workProject "rfcs"
2022-09-15 15:23:00 +02:00
, workProject "slog-agent"
2020-07-22 09:24:04 +02:00
, workProject "sm-terraform"
2023-03-10 14:09:07 +01:00
, workProject "tf-gitlab-runners"
2019-12-03 14:46:51 +01:00
, workProject "time-tracking"
2020-02-21 07:43:13 +01:00
, workProject "ugluk-ansible-role"
2021-01-18 11:36:50 +01:00
, Project { projectName = "minecraft"
, projectDirectory = "/tmp"
, projectStartHook = Just $ do safeSpawnProg "minecraft-launcher"
safeSpawnProg "mumble"
}
2019-12-03 14:46:51 +01:00
, Project { projectName = "status"
, projectDirectory = "/tmp"
2019-12-31 09:20:42 +01:00
, projectStartHook = Just $ do
2021-12-15 11:38:09 +01:00
safeSpawn "nvidia-offload" ["kitty","gotop"]
2019-12-03 14:46:51 +01:00
}
2019-04-17 16:14:19 +02:00
, Project { projectName = "sound"
, projectDirectory = "/tmp"
2021-11-01 11:18:25 +01:00
, projectStartHook = Just $ do
safeSpawn "pw-jack" ["patchage"]
safeSpawnProg "easyeffects"
2019-04-17 16:14:19 +02:00
}
]
modify :: XConfig l -> XConfig l
modify conf = dynamicProjects projects conf
2018-05-28 19:53:36 +02:00
{ workspaces = [] }