Move to emacs

This commit is contained in:
Martin Potier 2021-07-14 12:49:35 +03:00
parent 1b3f67199e
commit 7f7fd27fd6
No known key found for this signature in database
GPG key ID: D4DD957DBA4AD89E
2 changed files with 30 additions and 30 deletions

View file

@ -6,11 +6,11 @@ import XMonad
import XMonad.Actions.DynamicProjects
import XMonad.Util.Run
spinVimAndSt :: String -> String -> Project
spinVimAndSt dir name =
spinTextEditorAndTerm :: String -> String -> Project
spinTextEditorAndTerm dir name =
Project { projectName = name
, projectDirectory = dir <> name
, projectStartHook = Just $ do safeSpawn "vim" ["-g", "+set guifont=Victor\\ Mono\\ SemiBold\\ 18|e ."]
, projectStartHook = Just $ do safeSpawn "emacsclient" ["-c"]
safeSpawn "nvidia-offload" ["alacritty","-e","tmux","new","-A","-s",name]
}
@ -21,6 +21,16 @@ spinChat name =
, projectStartHook = Just $ do safeSpawnProg (name <> "-desktop")
}
spinInTermWithName :: String -> String -> Project
spinInTermWithName projectName cmd =
Project { projectName = projectName
, projectDirectory = "/tmp"
, projectStartHook = Just $ do safeSpawn "alacritty" ["-e", cmd]
}
spinInTerm :: String -> Project
spinInTerm name = spinInTermWithName name name
justStart :: String -> Project
justStart name =
Project { projectName = name
@ -28,9 +38,9 @@ justStart name =
, projectStartHook = Just $ do safeSpawnProg name
}
adminProject = spinVimAndSt "~/admin/"
candyProject = spinVimAndSt "~/candy/"
workProject = spinVimAndSt "~/relex/"
adminProject = spinTextEditorAndTerm "~/admin/"
candyProject = spinTextEditorAndTerm "~/candy/"
workProject = spinTextEditorAndTerm "~/relex/"
projects :: [Project]
projects = [ adminProject "wrk-config"
@ -38,15 +48,18 @@ projects = [ adminProject "wrk-config"
, adminProject "overlays-personal"
, candyProject "dhall-packages"
, candyProject "hfdb"
, spinChat "element"
, spinChat "wire"
, spinChat "signal"
, justStart "obs"
, justStart "lens"
, spinChat "element"
, spinChat "signal"
, spinChat "wire"
, spinInTerm "k9s"
, spinInTermWithName "email" "neomutt"
, spinTextEditorAndTerm "~/.xmonad" "xmonad"
, workProject "azure-core-infra"
, workProject "azure-kube-platform"
, workProject "bob-the-builder"
, workProject "calculation-node-playbook"
, workProject "common-cicd-config-private-cloud"
, workProject "communication-nix-101"
, workProject "connect2-provisioning"
, workProject "connect2-terraform"
@ -54,11 +67,12 @@ projects = [ adminProject "wrk-config"
, workProject "customer-modules"
, workProject "docker-images"
, workProject "gitlab-runners"
, workProject "gitlab-self-manage"
, workProject "infra-inventory"
, workProject "isengard"
, workProject "isengard-worktree-2"
, workProject "isengard-worktree-3"
, workProject "k8s-learning-path"
, workProject "linkerd-plugins"
, workProject "morannon"
, workProject "mordor-ca"
, workProject "mordor-dashboard"
@ -75,7 +89,9 @@ projects = [ adminProject "wrk-config"
, workProject "nixos-modules"
, workProject "nixpkgs"
, workProject "prototype-task-tracking"
, workProject "rfcs"
, workProject "sm-terraform"
, workProject "storagegrid-prototype"
, workProject "time-tracking"
, workProject "ugluk-ansible-role"
, Project { projectName = "minecraft"
@ -83,20 +99,11 @@ projects = [ adminProject "wrk-config"
, 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"
@ -119,14 +126,6 @@ projects = [ adminProject "wrk-config"
, 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

View file

@ -20,6 +20,7 @@ import XMonad.Layout.ThreeColumns (ThreeCol(..))
import XMonad.Layout.ToggleLayouts (toggleLayouts)
import XMonad.Util.EZConfig
import XMonad.Util.SpawnOnce
import qualified Solarized as S
-- Tidy modules
@ -36,8 +37,7 @@ layouts = toggleLayouts fullscreen tiled
fullscreen = (noBorders Full)
tiled = smarts $ ifWider (1920 + 1) wideScreen normalScreen
wideScreen = ThreeColMid 1 (5/100) (1/2)
normalScreen = resizableTall
resizableTall = ResizableTall 1 (5/100) (1/2) []
normalScreen = ResizableTall 1 (5/100) (1/2) []
smarts = (smartSpacingWithEdge 5) . smartBorders
--titleBar = noFrillsDeco shrinkText S.theme
@ -70,6 +70,7 @@ withConfig =
$ desktopConfig -- on a default desktop config
{ manageHook = myManageHook <+> manageHook desktopConfig
, layoutHook = desktopLayoutModifiers layouts
, startupHook = spawnOnce "sh ~/.fehbg"
, terminal = "nvidia-offload alacritty"
, normalBorderColor = S.base03
, focusedBorderColor = S.violet