Skip to content

njlane314/.dotfiles

Repository files navigation

Dotfiles

Stow-managed dotfiles. Most top-level directories are Stow packages that map into $HOME; bootstrap/, packages/, and templates/ define machine and project setup.

.
├── Makefile
├── README.md
├── bootstrap/
│   ├── bootstrap.sh
│   └── install.sh
├── packages/
│   ├── common.cli
│   ├── work.cli
│   ├── personal.cli
│   ├── macos.brewfile
│   ├── linux.apt
│   └── linux.pacman
├── templates/
│   ├── python/
│   ├── node/
│   ├── rust/
│   ├── go/
│   └── shell/
├── repos/
│   ├── README.md
│   ├── stdmk/
│   └── mkskel/
├── install.sh
├── bash/
│   ├── .bash_profile
│   ├── .bashrc
│   └── .config/bash/
│       ├── aliases.bash
│       ├── functions.bash
│       ├── local.bash.example
│       └── prompt.bash
├── git/
│   └── .config/git/config
├── cpp/
│   ├── .clang-format
│   ├── .clang-tidy
│   └── .config/gdb/gdbinit
├── editorconfig/
│   └── .editorconfig
├── emacs/
│   └── .emacs.d/
│       ├── early-init.el
│       └── init.el
├── terminal/
│   └── .config/terminal/
│       ├── apply
│       └── style
├── wallpaper/
│   └── .config/wallpaper/
│       ├── apply
│       └── desktop.webp
├── tmux/
│   └── .tmux.conf
└── vim/
    ├── .vimrc
    └── .vim/
        └── after/ftplugin/

Install

Install OS packages:

./bootstrap/bootstrap.sh

The desired CLI state is explicit in packages/:

packages/common.cli      baseline tools
packages/work.cli        development tools
packages/personal.cli    interactive personal tools
packages/macos.brewfile  Homebrew / Linuxbrew package manifest
packages/linux.apt       Debian / Ubuntu package manifest
packages/linux.pacman    Arch Linux package manifest

The bootstrap script uses the matching package-manager manifest for the current machine. Linux package managers install the packages available from their repositories and report names they cannot resolve.

The same bootstrap is available through Make:

make packages

Project templates are plain directories:

cp -R templates/python ~/programs/new-python-project

Available templates:

templates/python
templates/node
templates/rust
templates/go
templates/shell

Related project skeleton repos live under repos/ as independent nested Git repositories:

  • repos/stdmk: standard Unix-shaped repository surface: ./configure, make, make check, make install, make clean, and make distclean.
  • repos/mkskel: language-extensible coding workstation with short make commands, source/test separation, cached builds, and bundle/run helpers.

Install all packages:

./install.sh

Or:

make install

Install selected packages:

./install.sh vim
./install.sh bash
./install.sh git
./install.sh cpp
./install.sh emacs
./install.sh tmux
./install.sh editorconfig
./install.sh terminal
./install.sh wallpaper

The bootstrap install wrapper is equivalent:

./bootstrap/install.sh vim cpp emacs

The installer uses GNU Stow, so install it first if needed:

# macOS
brew install stow

# Debian / Ubuntu
sudo apt install stow

Keys

Notation: C-x means Control-x, M-x means Meta-x, and Vim's <leader> is the space key.

tmux prefix: C-b

C-b d     detach from tmux
C-b c     new window
C-b n     next window
C-b p     previous window
C-b 1     go to window 1
C-b ,     rename window
C-b &     kill window

C-b -     split pane vertically
C-b |     split pane horizontally
C-b h     move left
C-b j     move down
C-b k     move up
C-b l     move right
C-b x     kill current pane
C-b z     zoom/unzoom pane

C-b [     scroll/copy mode
q         leave scroll/copy mode
C-b ?     show all keybindings
C-b :     tmux command prompt
C-b r     reload ~/.tmux.conf
emacs prefixes: C-x, C-c, M-x

C-x C-f   open file
C-x C-s   save file
C-x C-c   quit Emacs
C-g       cancel current prompt
M-x       run command by name

C-c s     save buffer
C-c k     kill current buffer
C-c e     open init.el
C-s       search current buffer
C-x b     switch buffer
C-c f     find file
C-c r     ripgrep search
C-c g     Git status
C-c p     project commands
C-c m     compile
C-c M     recompile
C-c !     show diagnostics
M-n       next diagnostic
M-p       previous diagnostic
C-c C-f   format C/C++ buffer
vim prefix: <leader> is Space

<leader>w       write file
<leader>q       quit
<leader>e       file explorer
<leader>p       file picker
<leader><space> clear search highlight
jk              leave insert mode

<C-h>           move to left split
<C-j>           move to lower split
<C-k>           move to upper split
<C-l>           move to right split

<leader>m       run make
<leader>b       build current C/C++ file
<leader>x       run current C/C++ output
<leader>f       format/fix with ALE
<leader>d       show diagnostic detail
<leader>a       code action
<leader>gd      go to definition
<leader>gr      find references
<leader>gh      hover detail
[d              previous diagnostic
]d              next diagnostic

Vim

The vim package provides:

~/.vimrc
~/.vim/after/ftplugin/c.vim
~/.vim/after/ftplugin/cpp.vim

After installing the package, install Vim plugins:

make vim-plug
make vim-plugins

Install the external tools Vim calls:

./bootstrap/bootstrap.sh

Those tools are listed in packages/work.cli and resolved through the package-manager manifests.

For best C/C++ results, generate compile_commands.json in each project. With CMake:

cmake -S . -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON

Shell

The bash package provides:

~/.bash_profile
~/.bashrc
~/.config/bash/aliases.bash
~/.config/bash/functions.bash
~/.config/bash/local.bash.example
~/.config/bash/prompt.bash

Put machine-specific shell setup in ~/.config/bash/local.bash. That file is ignored by Git.

Terminal

The terminal package provides:

~/.config/terminal/style
~/.config/terminal/apply

On macOS, style contains the Apple Terminal profile name to use. The default is Basic, the standard white Terminal style. Apply it with:

~/.config/terminal/apply

Wallpaper

The wallpaper package provides:

~/.config/wallpaper/desktop.webp
~/.config/wallpaper/apply

On macOS, apply sets desktop.webp as the picture for every Desktop. The bootstrap script also applies it during first laptop setup.

Git

The git package provides:

~/.config/git/config

Git identity can stay in ~/.gitconfig; the managed config adds pager, delta, diff, merge, and short aliases.

Emacs

The emacs package provides:

~/.emacs.d/early-init.el
~/.emacs.d/init.el

The configuration bootstraps package.el with GNU ELPA, NonGNU ELPA, and MELPA, then installs its declared packages on first launch. To install packages from the command line after stowing the package:

make emacs-packages

Install the external tools Emacs calls:

# Debian / Ubuntu
sudo apt install emacs clangd clang-format ripgrep

# macOS with Homebrew
brew install emacs llvm ripgrep

The C/C++ configuration uses clangd through Eglot when clangd is available and binds C-c C-f to format the current buffer with clang-format.

Tmux

The tmux package provides:

~/.tmux.conf

Reload the config inside a running tmux server:

make tmux-reload

Install tmux first if needed:

# Debian / Ubuntu
sudo apt install tmux

# macOS with Homebrew
brew install tmux

C/C++ Tooling

The cpp package provides:

~/.clang-format
~/.clang-tidy
~/.config/gdb/gdbinit

~/.clang-format defines the formatting style used by clang-format and Vim's <leader>f mapping.

~/.clang-tidy enables Clang-Tidy checks for common bug, performance, modernization, readability, and C++ Core Guidelines diagnostics.

~/.config/gdb/gdbinit sets practical GDB defaults and stores command history at ~/.cache/gdb/history.

EditorConfig

The editorconfig package provides:

~/.editorconfig

It sets UTF-8, LF line endings, final newlines, trailing-whitespace trimming, two-space defaults, and four-space overrides for C, C++, Python, Rust, and related source files.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors