If already installed, this file is from the bare repo installed in .cfg folder in your $HOME directory. The parent repo is on [github](https://github.com/rudimusmaximus/configDotFiles). Read the To Use section for installation instructions.
Have a repo from which to setup any new macOS or Linux shell environment with familiar cli experience.
Run the script under To Use section. The files from the repo are copied to your $HOME directory.
Most importantly, a .bash_profile
sources the .path
, .extra
, .exports
and makes a few other settings before also sourcing the .bashrc
which itself sources the .prompt
, .aliases
, and .functions
to ensure a consistent experience across interactive and non-interactive shells including SSH sessions.
These various '.files' and folders, divide settings/configurations into logical groups. This sort of repository is commonly called a "dot files repository" - hence the name, but you will see other variations, services, and non bare repository approaches.
In a fresh terminal, from your home directory:
curl -sSf https://raw.githubusercontent.com/rudimusmaximus/configDotFiles/refs/heads/main/.cfg_install.sh | bash -s -- -v -h
The script lives in [this repository](https://github.com/rudimusmaximus/configDotFiles/blob/main/.cfg_install.sh). Review first if you like.
Any backups of .files
that would have been overwritten can be found in .cfg-backup
folder.
After you restart the terminal, type 'alias' or 'aliases' to see our shortcuts. The cursor now has magic powers in git repos. Some aliases assume certain tools are installed.
The script creates a starter .extra by copying .extra.template to .extra. This file is not committed and should be modified with your own settings.
Review the aliases for hints on tools assumed installed. On macOS, prefer Homebrew, download directly from source, or build when necessary after cloning project into a directory under $HOME(I use ~/project). On Fedora, prefer dnf package manager, clone and build in similar directory, or use flatpack as last resort avoiding sources other than say RPM free and non-free.
Preferred tools
TOOD these tools need to be reviewed and updated; previous list included below.
- nnn as alias f
for file manager inside terminal
- n directly to then install node and npm lts to start, use n-update to update
- nvim, and it’s required prerequisites (see kickstart.nvim or make your own Neovim)
- bun.sh
AFTER confDotFiles installation
-
complete
.extra
items for ssh, and GitHub AND setup gpg for signing if you sign that way.
See Atlassian’s git tutorials for dot files last known (https://www.atlassian.com/git/tutorials/dotfiles) for using a bare cloned repo with a clever alias to manage your changes over time.
Our source repo’s .gitignore
includes .cfg to avoid recursive issues and does not include any IDE files.
TIP Two aliases are included in the repo to make a git command; type config
or cfg
and see the .aliases
file for
more cfg commands.
Currently, a clean way to work with changes besides the cli aliases is to use lazygit. You can use either approach or switch between. The install script has flages for -b and -c for bare repo in home and optionally clone of configDotFiles repo.
Install tmux with brew on macOS or dnf on Fedora. Then clone it’s package manager and source the tmux configuration file we installed with these dot files.
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
tmux source ~/.tmux.conf
Run tmux and use the conf by leader + capital I which is <ctrl> + S followed by pressing shift + I. This will install the plugins in the .tmux.conf file.
tmux workflow using aliases from this repo
If you want to use lazy git, run the install -c to install the actual repo in HOME/configDotFiles so you can use any tool you like. Just push to remote when done and cfg pull to get the updates.
Take care between working via cli cfg alias or in the actual repo. Obviously don’t work in .cfg bare clone.
cfgstash
is included in .functions for saving work if any in HOME dir and also backing up the local .extra file.
# Now when you are ready to make changes; stash your work from home
# directory with the alias; it also backs up .extra to .extra.backup
cfgstash
# Then you can open lazygit in the actual repository with either of these aliases
# additionally you can learn about tmuxifier for tmux layouts
# if you have tmux setup you can run these aliases to open tmuxifier layout
configDotFiles
# USING LAZYGIT - it will look like a branch 'configDotFilesWorktree'
# Pop the stash
# Commit and push to 'origin main' using semver (you may have to set the upstream)
# TODO verify best way to sync with remote and local .cfg and home directories
# When done, move to your home directory
# and pull to get the latest from origin main
cfg pull
The included ./.lazygit_config_template.yml is a template for lazygit and has instructions via comment inside that file. The cool part for this is that in diff view inside lazygit you can click on a file’s line number and edit the file at that location in your configured $EDITOR.
As long as you brew install git-delta, the .extra file can be edited to create the recommended detla settings for your .gitconfig
# This section makes delta the default pager for Git (expects available via brew install git-delta)
# See https://github.com/dandavison/delta
# Setting Git configuration for delta and related diff options
git config --global core.pager delta
git config --global interactive.diffFilter "delta --color-only"
git config --global delta.navigate true # use n and N to move between diff sections
git config --global delta.light false # set to true if you're in a terminal with a light background
git config --global delta.line-numbers true
git config --global merge.conflictstyle diff3
git config --global diff.colorMoved default
Any use of this project’s code by GitHub Copilot, past or present, is done without our permission. We do not consent to GitHub’s use of this project’s code in Copilot.
We’re Using GitHub Under Protest. For our organization, we mostly use GitHub for private repositories. We do not recommend it for public or open source work. This project is currently hosted on GitHub. This is not ideal; GitHub is a proprietary, trade-secret system that is not Free and Open Souce Software(FOSS). We are deeply concerned about using a proprietary system like GitHub to develop our FOSS projects.
We urge you to read about the Give up GitHub campaign from the Software Freedom Conservancy to understand some reasons why GitHub is not a good place to host FOSS projects.
We are considering other options for any open source work we might do in the future.