This repo contains personal configurations for configs (git, tmux, R), variables and functions.
Appends to the existing .bashrc.
dotfiles/
├── bin/
│ └── checksum_verify.sh # Slurm batch script (md5 verification)
├── shell/
│ ├── bashrc.sh # entry point, sourced from the system ~/.bashrc
│ ├── exports.sh # portable environment variables
│ ├── functions.sh # custom shell functions
│ ├── aliases.sh # shell aliases (git, R, Slurm)
│ └── prompt.sh # git-aware cross-shell prompt
├── nvim/ # symlinked to ~/.config/nvim
│ ├── init.lua # entry: settings, lazy.nvim bootstrap
│ └── lua/config/
│ ├── plugins.lua # colorscheme, Treesitter, Nextflow syntax
│ ├── filetypes.lua # .nf / nextflow.config detection
│ └── keymaps.lua # paste-mode toggle
├── dotfiles.local.template # template for machine-local settings (tracked)
├── install.sh # bootstrap: symlinks + appends source block
├── tmux.conf # symlinked to ~/.tmux.conf
├── Rprofile # symlinked to ~/.Rprofile
├── .gitignore
└── README.md
folder="dotfiles"
git clone git@github.com:andreyhgl/dotfiles.git "$folder" &&
cd "$folder" &&
bash install.sh
# edit the machine-local config
vi ~/.dotfiles.local
source ~/.bashrcinstall.sh is idempotent — safe to run again after a git pull.
Defined in shell/functions.sh.
Submit a checksum verification job (the function wraps sbatch -A "$ACCOUNT"):
checksum_verify path/to/checksums.md5Results appear in the directory the job ran in:
_CHECKSUM.OK— all checksums matched_CHECKSUM.FAILED— one or more failed (contains md5sum's output)
Can also be called directly:
sbatch -A <account> ~/.local/bin/checksum_verify.sh path/to/checksums.md5salloc is wrapped (in shell/functions.sh) to apply sensible defaults and
print a summary before launching the session. Arguments are positional and
optional:
salloc [time] [mem_GB] [cpus]| Argument | Default | Example |
|---|---|---|
time |
3:00:00 |
6:00:00 |
mem_GB (G appended automatically) |
20 → 20G |
40 → 40G |
cpus |
1 |
4 |
salloc # 3:00:00, 20G, 1 cpu
salloc 6:00:00 40 4 # 6h, 40G, 4 cpusRequires ACCOUNT to be set (in ~/.dotfiles.local). To bypass the wrapper
and call the real binary directly, use command salloc ....
Defined in shell/aliases.sh.
| Command | Expands to | Notes |
|---|---|---|
gs |
git status --short |
Compact status |
ga |
git add |
|
gd |
git diff |
Unstaged changes |
gds |
git diff --staged |
Staged changes |
gc |
git commit -m "$*" |
Function — no quotes needed: gc fix the bug. Quote if using special chars (> \ '). |
gca |
git commit --amend |
Amend, edit message |
gcan |
git commit --amend --no-edit |
Amend, keep message |
gsw |
git switch |
Switch branches |
gp |
git push |
|
gpl |
git pull |
|
gl |
git log --graph ... |
Pretty one-line graph log |
gt |
git for-each-ref ... refs/tags |
Tags, newest first, with date/tagger/subject |
gb |
git branch -a ... |
All branches, newest commit first, with subject + relative date |
| Command | Expands to | Notes |
|---|---|---|
R |
R --no-save --no-restore |
Stateless interactive R; Ctrl-D quits without the save prompt. Interactive only — pass flags explicitly in batch jobs. |
| Command | Expands to | Notes |
|---|---|---|
jobinfo |
squeue -u $USER |
Your jobs |
jobinfo_full |
squeue -u $USER -o "..." | column -t | less -FRXS |
Wide, scrollable job table |
Config lives in nvim/ and is symlinked to ~/.config/nvim by install.sh.
Provides syntax highlighting for bash, R, and Nextflow, plus the
nightfly colorscheme.
- Neovim 0.9+ (uses
vim.filetype.addand modern Lua APIs). - A true-color terminal — nightfly is true-color only. On macOS use iTerm2,
kitty, WezTerm, or Ghostty (Terminal.app does not do full 24-bit color).
termguicolorsis already enabled ininit.lua. - A C compiler for Treesitter parser compilation. On macOS:
xcode-select --install.
- Open
nvim. lazy.nvim bootstraps itself and installs the plugins automatically (you'll see the install UI). - Treesitter compiles the bash/r/groovy parsers. If it doesn't run
automatically, run
:TSUpdate. - Restart
nvim. On HPC, run the first launch on a login node (which has network access) so plugins and parsers download; compute nodes are often offline.
- Treesitter is pinned to its
masterbranch — the newermainbranch is an incompatible rewrite with a different API. - If highlighting looks wrong or plugins seem stuck, reset the cache:
rm -rf ~/.local/share/nvim/lazy/nvim-treesitterthen reopennvim.
Defined in shell/prompts.sh.
Show git states in prompt, works in zsh and bash.
[user@machine ~] (main) $ Switch panes using Ctrl+hjkl (vim-style) without prefix
Per-cluster values (like ACCOUNT) live in ~/.dotfiles.local, which is
not tracked in git. Copy the template and edit it on each machine:
cp dotfiles.local.template ~/.dotfiles.localRemove the marked block from ~/.bashrc:
# >>> dotfiles >>>
...
# <<< dotfiles <<<or restore the backup install.sh made:
cp ~/.bashrc.backup ~/.bashrcThen remove the symlink: rm ~/.local/bin/checksum_verify.sh