Skip to content

Latest commit

 

History

58 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

This repo contains personal configurations for configs (git, tmux, R), variables and functions.

Appends to the existing .bashrc.

Layout

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

Install

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 ~/.bashrc

install.sh is idempotent — safe to run again after a git pull.

Functions

Defined in shell/functions.sh.

checksum_verify

Submit a checksum verification job (the function wraps sbatch -A "$ACCOUNT"):

checksum_verify path/to/checksums.md5

Results 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.md5

Interactive Slurm session

salloc 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) 2020G 4040G
cpus 1 4
salloc                 # 3:00:00, 20G, 1 cpu
salloc 6:00:00 40 4    # 6h, 40G, 4 cpus

Requires ACCOUNT to be set (in ~/.dotfiles.local). To bypass the wrapper and call the real binary directly, use command salloc ....

Aliases & shortcuts

Defined in shell/aliases.sh.

git

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

R

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.

Slurm

Command Expands to Notes
jobinfo squeue -u $USER Your jobs
jobinfo_full squeue -u $USER -o "..." | column -t | less -FRXS Wide, scrollable job table

Neovim

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.

Requirements

  • Neovim 0.9+ (uses vim.filetype.add and 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). termguicolors is already enabled in init.lua.
  • A C compiler for Treesitter parser compilation. On macOS: xcode-select --install.

First launch

  1. Open nvim. lazy.nvim bootstraps itself and installs the plugins automatically (you'll see the install UI).
  2. Treesitter compiles the bash/r/groovy parsers. If it doesn't run automatically, run :TSUpdate.
  3. 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.

Notes

  • Treesitter is pinned to its master branch — the newer main branch 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-treesitter then reopen nvim.

Prompt

Defined in shell/prompts.sh.

Show git states in prompt, works in zsh and bash.

[user@machine ~] (main) $ 

Configs

Tmux

Switch panes using Ctrl+hjkl (vim-style) without prefix

Machine-local config

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.local

Uninstall

Remove the marked block from ~/.bashrc:

# >>> dotfiles >>>
...
# <<< dotfiles <<<

or restore the backup install.sh made:

cp ~/.bashrc.backup ~/.bashrc

Then remove the symlink: rm ~/.local/bin/checksum_verify.sh

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Contributors

Languages