Skip to content
FerchoRiveraRPublic

About

💻 Backup of my macOS configuration files

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fernando's dotfiles

Personal dotfiles for Ubuntu Linux, managed with GNU Stow. Each directory is a stow package — install all of them or pick only what you need.

Packages

Package Installs to What it does
bash/ ~/.config/bash/{rc,shell,envs,aliases} Shell options, personal env vars, and aliases
git/ ~/.gitconfig Sets init.defaultBranch = main (credentials, LFS, identity configured separately)
tmux/ ~/.tmux.conf Vim-style keybindings, true color, mouse support, Wayland/X11 clipboard auto-detection, and session persistence (resurrect/continuum via TPM)

Prerequisites

  • GNU Stow — sudo apt install stow
  • Clipboard tools (for tmux copy-mode) — sudo apt install wl-clipboard xsel
  • nvim — the vi/vim aliases redirect to it; install separately if you want them to work
  • TPM (for tmux plugins) — git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm, then prefix + I inside tmux to install

Installation

# 1. Clone the repo
git clone https://github.com/FerchoRiveraR/dotfiles.git ~/dotfiles

# 2. Stow all packages (or pick only the ones you want)
cd ~/dotfiles
stow -t ~ bash git tmux

# 3. Source it from ~/.bashrc
echo 'source ~/.config/bash/rc' >> ~/.bashrc

# 4. Reload
source ~/.bashrc

Usage

bash

The entry point is ~/.config/bash/rc, which sources three fragments:

File Purpose
shell Shell options (checkwinsize — updates LINES/COLUMNS on terminal resize)
envs Personal environment variables (empty by default — add your own)
aliases Personal aliases (see below)

Aliases included:

Alias Command
grep / fgrep / egrep Adds --color=auto
vi / vim Redirects to nvim
c claude --dangerously-skip-permissions
cc claude --allow-dangerously-skip-permissions
oc opencode

To add your own aliases or env vars, edit the corresponding file under bash/.config/bash/ and re-stow or reload with source ~/.bashrc.

tmux

The config sets vi mode, mouse support, true color, windows/panes starting at 1, and a minimal status bar. All keybindings use the default prefix (Ctrl-b).

Pane navigation (vim-style):

Key Action
prefix + h Select pane left
prefix + j Select pane down
prefix + k Select pane up
prefix + l Select pane right

Pane resize (repeatable):

Key Action
prefix + H Resize left 5 cells
prefix + J Resize down 5 cells
prefix + K Resize up 5 cells
prefix + L Resize right 5 cells

Windows, sessions & utility:

Key Action
prefix + c New window (inherits current path)
prefix + " Split horizontal (inherits current path)
prefix + % Split vertical (inherits current path)
prefix + S Prompt to create a new named session
prefix + Space Jump to last window
prefix + r Reload ~/.tmux.conf

Copy mode (vi keys):

Enter copy mode with prefix + [, then:

Key Action
v Begin selection
V Select line
r Toggle rectangle selection
y Copy selection to system clipboard and exit copy mode

Clipboard is auto-detected: uses wl-copy on Wayland, xsel on X11.

Session persistence:

Key Action
prefix + Ctrl-s Save all sessions/windows/panes (tmux-resurrect)
prefix + Ctrl-r Restore saved sessions

tmux-continuum autosaves every few minutes and restores automatically when the tmux server starts (@continuum-restore on).

git

The .gitconfig is intentionally minimal — it only sets init.defaultBranch = main. Everything else is configured by their respective tools:

# Credentials (via GitHub CLI)
gh auth setup-git

# LFS
git lfs install

# Identity
git config --global user.name "Your Name"
git config --global user.email "you@example.com"

# Editor uses $EDITOR

Common commands

# Reload shell config
source ~/.bashrc

# Reload tmux config (from inside tmux)
# prefix + r

Development

Adding a new stow package

Create a directory whose internal structure mirrors $HOME:

# Example: adding an alacritty package
mkdir -p alacritty/.config/alacritty
# Add your config file
vim alacritty/.config/alacritty/alacritty.toml

# Dry-run to verify what stow will do
stow -t ~ -nv alacritty

# Install
stow -t ~ alacritty

Stow conventions

  • Each top-level directory is one package
  • The directory tree inside a package mirrors the target (~)
  • Stow creates symlinks — the actual files stay in the repo
  • Use stow -t ~ -nv <package> to preview before installing

Commit format

This repo uses Conventional Commits:

type(scope): description

Types: feat, fix, docs, chore, refactor, style, test

Example: feat(tmux): add session management keybinding

Uninstall

cd ~/dotfiles

# 1. Remove symlinks
stow -t ~ -D bash git tmux

# 2. Remove the source line from ~/.bashrc
#    Delete: source ~/.config/bash/rc

# 3. Optionally delete the repo
rm -rf ~/dotfiles

License

MIT

About

💻 Backup of my macOS configuration files

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Contributors

Languages