Rework projects declaration

This commit is contained in:
Martin Potier 2019-12-03 15:46:51 +02:00
parent 37631ed6a2
commit c174503244
No known key found for this signature in database
GPG key ID: D4DD957DBA4AD89E

View file

@ -6,31 +6,47 @@ import XMonad
import XMonad.Actions.DynamicProjects import XMonad.Actions.DynamicProjects
import XMonad.Util.Run import XMonad.Util.Run
spinVimAndSt :: String -> Project spinVimAndSt :: String -> String -> Project
spinVimAndSt name = spinVimAndSt dir name =
Project { projectName = name Project { projectName = name
, projectDirectory = "~/relex/" <> name , projectDirectory = dir <> name
, projectStartHook = Just $ do safeSpawn "vim" ["-g", "+set guifont=Victor\\ Mono\\ SemiBold\\ 18|e ."] , projectStartHook = Just $ do safeSpawn "vim" ["-g", "+set guifont=Victor\\ Mono\\ SemiBold\\ 18|e ."]
safeSpawn "st" ["-f","Iosevka Term-18","-e","tmux","new","-A","-s",name] safeSpawn "st" ["-f","Iosevka Samae-18","-e","tmux","new","-A","-s",name]
} }
workProject = spinVimAndSt "~/relex/"
candyProject = spinVimAndSt "~/candy/"
projects :: [Project] projects :: [Project]
projects = [ spinVimAndSt "bob-the-builder" projects = [ candyProject "adventOfCode"
, spinVimAndSt "infra-inventory" , workProject "ToyVault"
, spinVimAndSt "mega-repo-1" , workProject "ansible-ci"
, spinVimAndSt "mega-repo-2" , workProject "atlantis"
, spinVimAndSt "mega-repo-3" , workProject "bob-the-builder"
, spinVimAndSt "mordor-ca" , workProject "docker-images"
, spinVimAndSt "mordor-dashboard" , workProject "gitlab-runners"
, spinVimAndSt "mordor-deploy" , workProject "infra-inventory"
, spinVimAndSt "mordor-kvm" , workProject "isengard"
, spinVimAndSt "mordor-ops" , workProject "mordor-ca"
, spinVimAndSt "mordorbooks" , workProject "mordor-dashboard"
, spinVimAndSt "nix-role" , workProject "mordor-the-repo-1"
, workProject "mordor-the-repo-2"
, workProject "mordor-the-repo-3"
, workProject "mordor-deploy"
, workProject "mordor-kvm"
, workProject "mordor-ops"
, workProject "mordorbooks"
, workProject "nix-role"
, workProject "nixpkgs"
, workProject "time-tracking"
, Project { projectName = "status"
, projectDirectory = "/tmp"
, projectStartHook = Just $ do safeSpawn "st" ["-f","Iosevka Samae-12","-e","sudo","speedometer.py","-r","wlan0","-t","wlan0"]
}
, Project { projectName = "admin" , Project { projectName = "admin"
, projectDirectory = "~/admin" , projectDirectory = "~/admin"
, projectStartHook = Just $ do safeSpawn "vim" ["-g"] , projectStartHook = Just $ do safeSpawn "vim" ["-g", "+set guifont=Victor\\ Mono\\ SemiBold\\ 18|e ."]
safeSpawnProg "st" safeSpawn "st" ["-f","Iosevka Samae-18","-e","tmux","new","-A","-s","admin"]
} }
, Project { projectName = "email" , Project { projectName = "email"
, projectDirectory = "~/mail" , projectDirectory = "~/mail"
@ -55,7 +71,7 @@ projects = [ spinVimAndSt "bob-the-builder"
} }
, Project { projectName = "daily" , Project { projectName = "daily"
, projectDirectory = "/tmp" , projectDirectory = "/tmp"
, projectStartHook = Just $ do safeSpawn "nix" ["run", "nixpkgs.chromium", "-c", "chromium"] , projectStartHook = Just $ do safeSpawnProg "chromium"
} }
, Project { projectName = "notes" , Project { projectName = "notes"
, projectDirectory = "~/vimwiki/" , projectDirectory = "~/vimwiki/"