|
|
|
|
|
by analog_daddy
13 days ago
|
|
Okay. Here is a pattern i follow everywhere in my init files for almost every program.
Define two key env vars.
$DOTFILES and $ECORP.
The first is path to your personal set of dotfiles. The second is path to your corporate specific dotfiles. On personal pc no need to define the $ECORP var in shell init. On work pc define that var. based alone on that you can conditionally do almost anything. - shell source files/aliases - vim/editors enable disable plugins based on existence of env vars. - define shortcuts in file manager. - and i add the following to my main $DOTFILES .gitignore. # Any file that contains the following will be ignored.
# Used to ignore files in corporate environment
*ECORP*
*ecorp*
Based on multiple years across different setups, using environment variables was the most reliable option since I have been in places where there are restrictions on where my init files can be placed and having to change a shit ton of paths in my dotfiles or just keeping a different branch for work and personal (and making sure they stay in sync) was too much of a hassle.Additionally, maintaining hygiene is essential, where I only use a Read Only PAT token on my personal dotfiles in workenv. That way, there is no accidental way I would be able to push from my workenv. |
|