A personal dotfiles repository managed with GNU Stow.
It is structured as an operational setup repo: bootstrap.sh installs prerequisites,
stows packages into $HOME, and backs up conflicting files before linking them.
Includes managed configuration for:
- Zsh (
.zshrc) with Zinit plugin manager - Neovim (
init.luaand other configs) - Tmux (
tmux.conf) - Universal Ctags (
ctags) - Clipboard wrappers that prefer Wayland/X11/macOS tools locally and OSC 52 for remote sessions
- Git
- GNU Stow
- Curl
- Optional: Zsh, Tmux, Neovim
- Optional: Universal Ctags when the
ctagsstow package is selected
The bootstrap.sh script checks for missing tools and attempts to install them
using dnf, apt-get, pacman, or Homebrew.
-
Clone the repository
git clone https://github.com/nogunix/dotfiles.git ~/dotfiles cd ~/dotfiles
-
Run the bootstrap script
chmod +x bootstrap.sh ./bootstrap.sh
This will:
- Install required base packages when possible
- Stow the default packages (
zsh,nvim,tmux,ctags) - Backup conflicting files with a
.bak.<timestamp>suffix - Install Zinit if
zshis in the selected package list - Attempt to install Universal Ctags if
ctagsis selected and noctagsbinary is available
-
Reload configurations
- Zsh:
exec zshor restart your terminal - Neovim: Launch
nvimto verify plugins and configs
- Zsh:
./bootstrap.sh [options]| Option | Description |
|---|---|
-p "pkg1 pkg2" |
Specify stow packages (default: zsh nvim tmux ctags) |
-a |
Use --adopt to move existing files into the repo |
-n |
Dry run (show what would happen) |
-u "pkg1 pkg2" |
Unstow only the listed packages (implies -U) |
-U |
Unstow (remove symlinks) |
--no-install |
Skip installing base dependencies and ctags |
-h, --help |
Show help message |
- Stow only
zshandtmux:./bootstrap.sh -p "zsh tmux" - Adopt existing config into repo:
./bootstrap.sh -a
- Dry run to see changes:
./bootstrap.sh -n
- Remove all symlinks:
./bootstrap.sh -U
- Remove only the
tmuxsymlinks:./bootstrap.sh -u "tmux"
This repository includes clipboard helpers that auto-select the best available copy backend:
- Wayland via
wl-copywhen$WAYLAND_DISPLAYis available - X11 via
xcliporxselwhen$DISPLAYis available - OSC 52 when running in
tmuxor over SSH without a usable display server pbcopyfor local macOS sessions- OSC 52 as the final fallback
tmuxcopy-mode yanks (y, mouse selection)clipclipboard-copyxclipandxselcopy-style usage- Neovim/Vim yanks through the available clipboard provider
- Reading the local desktop clipboard from the remote host (
xclip -o,xsel -o)
OSC 52 is primarily a remote-to-local copy mechanism. If you need bidirectional clipboard sync, use X11 forwarding, a desktop agent, or terminal-specific tooling.
- iTerm2: Enable the setting that allows terminal apps to access the clipboard.
- gnome-terminal / other VTE-based terminals:
Prefer
ssh -Xorssh -Yso the remote host gets a working$DISPLAY. The helper scripts will then use the remote systemxclip/xselinstead of OSC 52.
printf 'hello\n' | clip
printf 'hello\n' | clipboard-copy
printf 'hello\n' | xclip -selection clipboard
printf 'hello\n' | xsel --clipboard --inputInside tmux, enter copy-mode and press y to send the selection to the local
terminal clipboard.
With gnome-terminal, connect using X11 forwarding:
ssh -Y user@server- Create a new folder in the repo with the package name:
mkdir -p newpkg/.config/newpkg
- Place your config files inside that folder using the same relative path from
$HOME. - Stow it:
./bootstrap.sh -p "newpkg"
When not using --adopt, any existing file that would conflict is automatically backed up with a .bak.<timestamp> suffix in its original location.
Run these after changing the repo:
bats tests/
shellcheck bootstrap.sh zsh/.local/bin/*
shellcheck tests/nvim-headless.sh
tests/nvim-headless.shAdditional focused checks:
bats tests/bootstrap.bats
bats tests/clipboard-backend.bats
bats tests/clipboard-integration.bats
tests/nvim-headless.sh --healthThis repository is licensed under the MIT License. See LICENSE for details.
This is my personal project. It is created and maintained in my personal capacity, and has no relation to my employer's business or confidential information.