https://github.com/pfei/dotfiles
My personal dotfiles: Zsh, Tmux, and Pandoc templates. Optimized for productivity and clean LaTeX exports
https://github.com/pfei/dotfiles
dotfiles linux-config pandoc-template tmux workflow zsh
Last synced: 8 days ago
JSON representation
My personal dotfiles: Zsh, Tmux, and Pandoc templates. Optimized for productivity and clean LaTeX exports
- Host: GitHub
- URL: https://github.com/pfei/dotfiles
- Owner: pfei
- License: mit
- Created: 2025-01-28T15:32:38.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2026-05-29T12:42:49.000Z (13 days ago)
- Last Synced: 2026-05-29T14:06:48.827Z (13 days ago)
- Topics: dotfiles, linux-config, pandoc-template, tmux, workflow, zsh
- Language: Python
- Homepage: https://github.com/pfei/.dotfiles#readme
- Size: 113 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# π dotfiles
My personal configuration files
for a productive terminal-first Linux development environment.
This repository centralizes my setup for:
- Zsh
- Tmux
- Kitty
- Helix
- Git
- Vim
- Pandoc
- themes and shell utilities
______________________________________________________________________
# π§ Philosophy & Design Goals
The goal is simple:
> identical workflow everywhere.
Whether on:
- a local Debian desktop,
- a remote VPS,
- a headless server,
- a temporary VM,
- or a fresh reinstall,
the experience should remain nearly identical:
- same shell,
- same terminal behavior,
- same keybindings,
- same clipboard workflow,
- same editor,
- same tmux navigation,
- same Git ergonomics.
This repository is intentionally:
- reproducible,
- idempotent,
- modular,
- portable,
- dependency-light,
- and terminal-first.
Current core stack:
- Kitty
- Tmux
- Helix
- Git
- Zsh
Everything else is optional.
______________________________________________________________________
## π οΈ Manual Prerequisites
Before running the automation, ensure the following are installed:
### 1. System Packages & Python Build Dependencies
Essential for general workflows and compiling isolated Python environments with `pyenv`:
```bash
sudo apt update && sudo apt install -y \
curl git zsh tmux kitty xclip yad shfmt \
fonts-noto-color-emoji \
build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev libncursesw5-dev \
xz-utils tk-dev libxml2-dev libxmlsec1-dev \
libffi-dev liblzma-dev
```
### 2. Base Frameworks
```bash
# Oh My Zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# Pyenv & plugins
curl https://pyenv.run | bash
```
### 3. Server Configuration (Optional)
If setting up a headless environment / VPS, flag the machine as a server.
This automatically switches the shell prompt Oh My Zsh theme from:
- local desktop theme β arrow
- server theme β refined
```bash
sudo touch /etc/is_server
```
### 4. Helix Editor (AppImage)
The setup intentionally uses the official AppImage instead of distro packages.
Reason:
- distro versions are often outdated,
- AppImage guarantees consistency across machines.
Download the official AppImage: https://github.com/helix-editor/helix/releases
Then place it inside:
```bash
~/.local/bin/
```
Example:
```bash
mkdir -p ~/.local/bin
mv helix-*.AppImage ~/.local/bin/
chmod +x ~/.local/bin/helix-*.AppImage
```
The installation script automatically:
- detects the AppImage,
- creates symlinks,
- and extracts it on headless systems when FUSE is unavailable.
## βοΈ Installation
Clone the repository anywhere:
```bash
git clone https://github.com/pfei/dotfiles.git ~/src/dotfiles
cd ~/src/dotfiles
git submodule update --init
./install.py
```
The installer dynamically adapts to the environment:
- desktop,
- headless VPS,
- GUI availability,
- terminal capabilities.
It automatically installs/symlinks supported modules
and skips incompatible GUI modules on headless systems.
Current modules:
- git
- zsh
- tmux
- kitty
- helix
- vim
- pandoc
- themes
- mate-terminal (legacy)
### π Post-Installation: Python Environment Integration
To complete your Python isolation setup and
make the `.zshrc` workflow fully operational,
install your target Python version
and initialize `virtualenvwrapper` hooks inside it:
For example with python 3.13.13:
```bash
# 1. Install and set your working Python version
pyenv install 3.13.13
pyenv global 3.13.13
# 2. Bind virtualenvwrapper inside the isolated version
pip install virtualenvwrapper
# 3. Reload your shell configuration
omz reload
```
### π Post-Installation: Git Identity
Git identity is loaded at install time from a local `git/identity.json` file (not tracked).
Copy the example and fill in your details:
```bash
cp git/identity.json.example git/identity.json
# then edit git/identity.json with your name, email, and SSH signing key path
```
The installer will then inject your identity into `~/.gitconfig` automatically.
______________________________________________________________________
## Features at a Glance
### π Zsh (Oh My Zsh)
A modular Zsh setup with dynamic environment handling:
- **Modular Architecture**: Configuration split into exports and functions.
- **Adaptive Themes**: Uses `refined` (e.g., `~ β― user@srvXXXXXX`)
on servers via `/etc/is_server`, and `arrow` (e.g., `~ β€`) on local machines.
- **Language Integration**: nvm, pyenv, Go, Deno β all lazy-loaded to keep shell startup fast.
- **Python Workflow**: pyenv for version management, virtualenvwrapper
for lightweight virtual environments. Both use stub functions
that defer initialization until first use (~500ms saved on startup).
- **Node Workflow**: nvm and its ecosystem (node, npm, npx, yarn) are lazy-loaded via stub functions.
- **Autoload Functions**: `~/.zsh_autoload_functions/` hosts private helpers
(e.g., `load_google_api_key`) not tracked in the repository.
- **UI**: Custom steady yellow underline cursor that resets on exit.
### π Local Overrides
The `.zshrc` configuration dynamically checks for and sources `~/.zshrc.local`
right before initializing the cursor UI. This provides a clean point of extension
to inject private paths, professional/personal aliases, or specific overrides
without polluting the public repository tracking.
### π₯οΈ Tmux
Terminal multiplexer configured for ergonomics and speed:
- **Prefix**: Remapped to `Ctrl-a`.
- **Navigation**: Pane switching with `Alt + Arrow Keys`,
window switching with `Ctrl + PageUp/Down`.
- **Window Management**: Move windows left/right with `Ctrl + Shift + PageUp/Down`;
windows auto-renumber on close; rename with `F2`.
- **Copy Mode**: vi keybindings with system clipboard integration (xclip).
Mouse drag also copies to clipboard.
- **Clipboard**: OSC 52 passthrough enabled for seamless clipboard across SSH sessions.
- **Persistence**: New panes/windows open in the current working directory.
- **History**: 100,000 lines scrollback.
### π± Kitty
- **Configuration**: `kitty/kitty.conf` β `~/.config/kitty/kitty.conf`
- `F11` mapped to toggle fullscreen.
### π» VS Code
- **Centralized Config**: Settings, keybindings, and snippets in one directory.
- **Automation**: One-command deployment of symlinks and extensions.
- **Smart Formatting**: Auto-format shell scripts on save via shfmt, Python via Ruff, JSON/JS/TS/HTML/CSS via Prettier.
- **Vim Integration**: Optimized Vim keybindings via vscodevim (toggle with `Ctrl+Alt+V`).
- **Spell Checking**: English and French, enabled only for Markdown files.
- **Extensions**: Ruff, Pylance, mypy, ESLint, Prettier, Jupyter, R, Rainbow CS
### πͺ¨ Helix
- **Configuration**: `helix/config.toml` β `~/.config/helix/config.toml`
- **Language Support**: `helix/languages.toml` β `~/.config/helix/languages.toml` β configures
auto-formatting for Python (Ruff), Bash (shfmt), Markdown (mdformat), and JSON (jq), with debugpy integration for Python.
- **Theme**: Custom `my_mocha` theme (inherits Catppuccin Mocha with adjusted statusline colors)
β `~/.config/helix/themes/my_mocha.toml`
- **AppImage Management**: Automatically symlinks `hx` directly to the AppImage
on desktop environments, or extracts it cleanly into a FUSE-less standalone wrapper on headless servers.
- **Hidden Files**: `.ignore` ensures dotfiles are visible in the file picker (`Space + f`).
- **Keybindings**: `Space + n` hides line numbers, `Space + l` restores them.
### π§ Git
- **Configuration**: `git/gitconfig` included into `~/.gitconfig` via `[include]`
β keeps private identity out of the repository.
- **Identity**: Loaded at install time from `git/identity.json` (not tracked).
Copy from `git/identity.json.example`.
- **SSH Commit Signing**: Configured via `[gpg] format = ssh` with `allowed_signers`
auto-setup. The installer appends your public key to `~/.ssh/allowed_signers` automatically.
- **Editor**: Helix (`hx`) as default commit editor.
- **Aliases**: `lg` β compact, colorized graph log with dates.
- **Jupyter Support**: `nbdime` drivers configured for notebook diff and merge.
- **Headless optimization**: On servers, `credential.helper = store` is set automatically.
### π Vim
- **Configuration**: `vim/.vimrc` β `~/.vimrc`
- Relative line numbers, persistent undo, Space as leader key.
- Smart case-insensitive search, no swap/backup files.
- Clean Git commit editing (no relative numbers, no cursorline).
### π Pandoc
- **Templates**: `pandoc/templates/` β `~/.local/share/pandoc/templates/`
- Clean LaTeX journal template for PDF export.
### π¨ Themes
- **Dracula GTK**: Dracula theme submodule linked to `~/.themes/Dracula`.
- **Dracula-Yad**: Custom Dracula variant for `yad` dialogs with high-contrast cyan border and large yellow labels β `~/.themes/Dracula-Yad/`.
- **MATE Desktop**: Dracula GTK theme, Mint-Y icons, and wallpaper applied automatically via `gsettings`.
- **MATE Terminal** (legacy): Catppuccin color profiles (Mocha, Macchiato, FrappΓ©, Latte) loaded via dconf.
______________________________________________________________________
## π οΈ Custom Functions & Aliases
### Shell Utilities
- `h`: History search β no args shows last 20, number shows N lines, string greps.
- `lsym`: Lists symlinks in current directory with color-coded targets.
- `lst`: Shows the 5 most recently modified files.
- `dumpcode`: Dumps the full codebase to a text file for LLM analysis, skipping locks and binaries.
- `gitscan`: Scans git history for secrets using `gitleaks`. It runs in redacted mode to safely display results on public screens.
## π Repository Structure
```
.
βββ zsh/
β βββ .zshrc # Main entry point
β βββ aliases.zsh # Custom shortcuts
β βββ exports.zsh # PATH and env variables
β βββ functions.zsh # Utilities and helpers
β βββ setup.py # Symlinks + autoload stub
βββ tmux/
β βββ .tmux.conf # Tmux configuration
β βββ setup.py
βββ kitty/
β βββ kitty.conf
β βββ setup.py
βββ vscode/
β βββ settings.json
β βββ keybindings.json
β βββ extensions.txt
β βββ snippets/
β βββ setup.py
βββ helix/
β βββ config.toml
β βββ languages.toml
β βββ themes/
β β βββ my_mocha.toml
β βββ setup.py # Symlinks config + hx AppImage/Wrapper
βββ git/
β βββ gitconfig
β βββ identity.json.example
β βββ setup.py
βββ vim/
β βββ .vimrc
β βββ setup.py
βββ pandoc/
β βββ templates/ # LaTeX templates
β βββ setup.py
βββ themes/
β βββ Dracula/ # GTK theme (submodule)
β βββ Dracula-Yad/ # Custom yad GTK theme
β βββ setup.py
βββ mate-terminal/
β βββ catppucin.dconf
β βββ setup.py
βββ .local/bin/
β βββ dumpcode # Codebase dump utility
βββ install.py # Global installer
βββ .ignore # Show dotfiles in Helix file picker
βββ LICENSE
```
______________________________________________________________________
## βοΈ License
MIT License β see LICENSE for details.
Last updated: May 2026