Agent Guidelines for Dotfiles Repository
Repository Overview
Personal configuration files (dotfiles) for Linux/macOS development environment including nvim, i3, tmux, zsh, and other tools. Managed with GNU Stow for symlink management.
Build/Deploy Commands
make dump-keybindings- Export Cinnamon keybindings to filemake load-keybindings- Import keybindings from fileansible-playbook ansible-home/.ansible/deploy-open-webui.yml -i ansible-home/.ansible/hosts.ini- Deploy with Ansiblestow tool-name- Create symlinks for a specific tool configurationstow -D tool-name- Remove symlinks for a specific tool configurationtmux source-file ~/.tmux.conf- Reload tmux configurationnvim --headless "+Lazy! sync" +qa- Update Neovim plugins without UI
Testing
No test suite - This is a configuration repository. Testing is done by manual verification, starting new sessions, opening nvim to check LSP/plugin functionality, and sourcing shell configs.
Code Style Guidelines
Lua (Neovim, Awesome WM, Yazi configs)
Indentation: Use tabs for indentation File Structure:
- nvim plugins: Each plugin in
nvim/.config/nvim/lua/plugins/plugin-name.lua - Use
return {}pattern for plugin specifications
return {
{"author/plugin", config = function() ... end},
}
Keybinding Pattern:
vim.keymap.set("n", "<leader>ff", builtin.find_files, { desc = "Telescope find files" })
vim.g.mapleader = " " -- Set before loading plugins
Error Handling: Use pcall() for safe module loading (see awesome/rc.lua). Wrap git/system calls in error checks:
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({{ "Failed to clone lazy.nvim:\n", "ErrorMsg" }}, true, {})
os.exit(1)
end
LSP Configuration:
local capabilities = require("cmp_nvim_lsp").default_capabilities()
lspconfig.gopls.setup({
capabilities = capabilities,
filetypes = {"go", "gomod", "gowork", "gotmpl"},
settings = { completeUnimported = true, usePlaceholders = true },
})
Shell Scripts (Bash/Zsh)
Shebang: Use #!/usr/bin/env bash or #!/usr/bin/env sh
Quoting: Always quote variables to prevent word splitting
Exit on errors: Use set -euo pipefail where appropriate
Tmux Config:
- Use
set -gfor global options,set-window-optionorsetwfor window options - Use
bind-keywith descriptive comments - Conditional locale setting for WSL:
if-shell "locale -a | grep -q 'C.utf8'" "set-environment -g LANG C.utf8"
Error Checking:
if ! command -v docker &> /dev/null; then
echo "Docker not found"
exit 1
fi
Python (Ranger commands)
Imports: Use standard import style with from __future__ import for Python 2/3 compatibility
Class Structure: Use docstrings for command documentation, implement execute() and tab() methods
class my_edit(Command):
"""Documentation string visible in :c help"""
def execute(self):
if self.arg(1):
target_filename = self.rest(1)
YAML (Ansible playbooks)
Indentation: 2 spaces (strict)
Best Practices: Use descriptive task names, when: for conditionals, register: to capture command output, changed_when: to control when tasks report changes
File Organization
- Each tool has its own directory matching stow structure
- Config files go in
tool-name/.config/tool-name/ - Root dotfiles (
.zshrc,.tmux.conf) go intool-name/directory - Use GNU Stow for symlink management
- Example:
nvim/.config/nvim/,tmux/.tmux.conf,zsh/.zshrc
Naming Conventions
- Lua: snake_case for variables/functions, PascalCase for classes
- Shell: lowercase_with_underscores for functions and variables
- Python: snake_case for variables/functions, PascalCase for classes
- tmux: lowercase_with_underscores for options (@powerkit_option_name)
- File names: lowercase with hyphens or underscores
Security Guidelines
Pre-Commit Sensitive Data Check
CRITICAL: Always scan for sensitive data before committing. Run these checks:
rg -i "password|passwd|api_key|apikey|secret|token|private_key|credentials|bearer" --glob '!.git/*'
rg -i "aws_access_key|aws_secret|github_token|gh_token|ssh_key" --glob '!.git/*'
find . -name "*.pem" -o -name "*.key" -o -name "*.env" -o -name "*_rsa" 2>/dev/null | grep -v ".git"
git ls-files | rg -i "ssh|gpg|key|secret|password|credential"
What Should NEVER Be Committed
- SSH keys (
id_rsa,id_ed25519,*.pem) - GPG private keys
- API keys, tokens, or authentication credentials
.envfiles with secrets (already in.gitignore)- Email addresses or usernames (use placeholders in examples)
- IP addresses or hostnames (use
localhostorexample.com)
Safe to Commit
- Keyboard shortcuts and keybindings
- Theme configurations and color schemes
- Public configuration without credentials
- Example configs with placeholder values
Platform-Specific Considerations
- WSL: May need
C.utf8locale instead ofen_US.UTF-8 - macOS: Separate zsh config in
zsh-macos/directory - Linux: Use Linux-specific paths and tools
.gitignore
Excluded files: .aider*, .env, lazy-lock.json, .venv
Repository Structure
This repository is organized as a GNU Stow collection with each tool having its own directory:
zsh/- Zsh shell configuration with Oh My Zshzsh-macos/- macOS-specific Zsh configurationtmux/- Tmux terminal multiplexer configurationalacritty/- Alacritty terminal configurationkitty/- Kitty terminal configurationkitty-mac/- macOS-specific Kitty configurationi3/- i3 window manager configurationawesome/- Awesome window manager configurationpolybar/- Status bar configurationrofi/- Application launcher configurationdunst/- Notification daemon configurationranger/- Terminal file manager configurationyazi/- Modern terminal file manager configurationnewsraft/- RSS reader configurationansible-home/- Ansible deployment automationautorandr-home-desktop/- Monitor profile managementulauncher/- Application launcher with extensions
Working with This Repository
- All configuration files are designed to be portable across Linux/macOS systems
- Use GNU Stow to deploy configurations:
stow tmux,stow zsh - For macOS systems, use
zsh-macosandkitty-macinstead ofzshandkitty - For WSL, ensure proper Nerd Font setup in Windows Terminal
- Keybinding management uses
make dump-keybindingsandmake load-keybindingsfor Cinnamon desktop
Key Features and Tools
- Zsh: Oh My Zsh with starship prompt
- Tmux: Includes tmux-powerkit plugin with powerline status bar
- Alacritty: GPU-accelerated terminal with Catppuccin themes
- Kitty: Alternative terminal with Catppuccin themes
- i3: Tiling window manager with configured keybindings
- Awesome: Lua-based window manager
- Themes: Consistent Catppuccin theming across most terminal tools
- Tools: Ranger, Yazi, Rofi, Dunst, Ulauncher, Newsraft
Configuration Management
- History settings in zsh are configured to prevent truncation and duplicate entries
- Tmux plugins require manual installation with
Ctrl+a Iafter reloading configuration - All configurations are designed for reuse across different machines
Target Audience
This repository is intended for experienced users who understand the tools and configuration concepts. README files are kept concise and focused on platform-specific differences rather than detailed explanations of basic functionality.