xmonad-config/lib/Projects.hs

118 lines
5.1 KiB
Haskell

module Projects (
Projects.modify
) where
import XMonad
import XMonad.Actions.DynamicProjects
import XMonad.Util.Run
spinVimAndSt :: String -> String -> Project
spinVimAndSt dir name =
Project { projectName = name
, projectDirectory = dir <> name
, projectStartHook = Just $ do safeSpawn "vim" ["-g", "+set guifont=Victor\\ Mono\\ SemiBold\\ 18|e ."]
safeSpawn "nvidia-offload" ["alacritty","-e","tmux","new","-A","-s",name]
}
spinChat :: String -> Project
spinChat name =
Project { projectName = name
, projectDirectory = "/tmp"
, projectStartHook = Just $ do safeSpawnProg (name <> "-desktop")
}
adminProject = spinVimAndSt "~/admin/"
candyProject = spinVimAndSt "~/candy/"
workProject = spinVimAndSt "~/relex/"
projects :: [Project]
projects = [ adminProject "wrk-config"
, adminProject "cdc-config"
, adminProject "overlays-personal"
, candyProject "dhall-packages"
, spinChat "element"
, spinChat "wire"
, spinChat "signal"
, workProject "azure-core-infra"
, workProject "azure-kube-platform"
, workProject "bob-the-builder"
, workProject "calculation-node-playbook"
, workProject "connect2-provisioning"
, workProject "connect2-terraform"
, workProject "docker-images"
, workProject "gitlab-runners"
, workProject "infra-inventory"
, workProject "isengard"
, workProject "isengard-worktree-2"
, workProject "isengard-worktree-3"
, workProject "mordor-ca"
, workProject "mordor-dashboard"
, workProject "mordor-deploy"
, workProject "mordor-kvm"
, workProject "mordor-nixpkgs"
, workProject "mordor-ops"
, workProject "mordor-sudo"
, workProject "mordor-the-repo"
, workProject "mordorbooks"
, workProject "muir"
, workProject "nix"
, workProject "nix-role"
, workProject "nixos-modules"
, workProject "nixpkgs"
, workProject "sm-terraform"
, workProject "time-tracking"
, workProject "ugluk-ansible-role"
, Project { projectName = "minecraft"
, projectDirectory = "/tmp"
, projectStartHook = Just $ do safeSpawnProg "minecraft-launcher"
safeSpawnProg "mumble"
}
, Project { projectName = "xmonad"
, projectDirectory = "~/.xmonad/"
, projectStartHook = Just $ do safeSpawn "vim" ["-g", "+set guifont=Victor\\ Mono\\ SemiBold\\ 18|e ."]
safeSpawn "nvidia-offload" ["alacritty","-e","tmux","new","-A","-s","xmonad"]
}
, Project { projectName = "status"
, projectDirectory = "/tmp"
, projectStartHook = Just $ do
safeSpawn "nvidia-offload" ["alacritty","-e","gotop"]
}
, Project { projectName = "email"
, projectDirectory = "~/mail"
, projectStartHook = Just $ do safeSpawnProg "st"
}
, Project { projectName = "frs"
, projectDirectory = "/tmp"
, projectStartHook = Just $ do safeSpawnProg "ff-relex"
}
, Project { projectName = "fre"
, projectDirectory = "/tmp"
, projectStartHook = Just $ do safeSpawnProg "ff-perso"
}
, Project { projectName = "network-graph"
, projectDirectory = "~/relex/catch-a-network-bug/csvplotter"
, projectStartHook = Just $ do safeSpawn "zathura" ["weekXGraph.pdf"]
safeSpawnProg "st"
}
, Project { projectName = "sound"
, projectDirectory = "/tmp"
, projectStartHook = Just $ do safeSpawnProg "pavucontrol"
safeSpawnProg "patchage"
}
, Project { projectName = "meeting"
, projectDirectory = "/tmp"
, projectStartHook = Just $ do safeSpawnProg "chromium"
}
, Project { projectName = "teams"
, projectDirectory = "/tmp"
, projectStartHook = Just $ do safeSpawnProg "teams"
}
, Project { projectName = "notes"
, projectDirectory = "~/zk/"
, projectStartHook = Just $ do safeSpawn "vim" ["-g", "+set guifont=Victor\\ Mono\\ SemiBold\\ 18|call neuron#edit_zettel_new()"]
}
]
modify :: XConfig l -> XConfig l
modify conf = dynamicProjects projects conf
{ workspaces = [] }