xmonad-config/lib/Projects.hs

141 lines
5.1 KiB
Haskell
Raw Permalink 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
2024-05-10 13:55:33 +02:00
$ safeSpawn "rio" ["-e","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"
2024-05-10 13:55:33 +02:00
, projectStartHook = Just $ do safeSpawn "rio" ["-e",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
}
2024-05-09 14:10:09 +02:00
spinNotes :: Project
spinNotes =
Project { projectName = "notes"
, projectDirectory = "~/zk/org-roam/"
, projectStartHook = Just $ do safeSpawn "emacs" ["~/zk/org-roam/20240202124747-index.org"]
}
2021-07-14 11:49:35 +02:00
adminProject = spinTextEditorAndTerm "~/admin/"
candyProject = spinTextEditorAndTerm "~/candy/"
workProject = spinTextEditorAndTerm "~/relex/"
2024-05-09 14:10:09 +02:00
workAnsibleProject = spinTextEditorAndTerm "~/relex/ansible-roles/"
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-05-29 13:00:52 +02:00
, justStartWithName "chat" "slack"
2023-03-02 11:59:34 +01:00
, justStartWithName "meet" "chromium"
2024-05-09 14:10:09 +02:00
, spinNotes
2024-09-30 14:40:52 +02:00
, spinInTermWithName "VPN" "vpn-run"
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"
2024-09-30 14:40:52 +02:00
, workProject "azure-management"
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"
2023-08-31 12:47:14 +02:00
, workProject "communication-nix-103"
2021-04-06 08:29:14 +02:00
, workProject "cooper"
2024-05-09 14:10:09 +02:00
, workProject "crebain"
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"
2019-12-03 14:46:51 +01:00
, workProject "gitlab-runners"
2024-05-09 14:10:09 +02:00
, workProject "gitlab-self-manage"
2019-12-03 14:46:51 +01:00
, workProject "infra-inventory"
, workProject "isengard"
2023-08-03 08:06:20 +02:00
, workProject "isengard-2"
, workProject "isengard-3"
2022-04-08 11:43:00 +02:00
, workProject "jirawiz"
2024-05-09 14:10:09 +02:00
, workAnsibleProject "java"
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"
2023-05-26 11:42:11 +02:00
, workProject "moria"
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"
2023-10-12 12:19:42 +02:00
, workProject "pck-access"
2021-11-01 11:18:25 +01:00
, workProject "planning-cloud"
2021-07-14 11:49:35 +02:00
, workProject "rfcs"
2023-10-12 12:19:42 +02:00
, workProject "runner-tests"
2022-09-15 15:23:00 +02:00
, workProject "slog-agent"
2020-07-22 09:24:04 +02:00
, workProject "sm-terraform"
2023-03-29 09:10:53 +02:00
, workProject "tech-radar"
2019-12-03 14:46:51 +01:00
, workProject "time-tracking"
2020-02-21 07:43:13 +01:00
, workProject "ugluk-ansible-role"
2023-04-18 09:10:27 +02:00
, workProject "unified-application-gateway"
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
2024-05-10 13:55:33 +02:00
safeSpawn "rio" ["-e","btop"]
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 = [] }