I primarily live in the terminal for everything. Coding, journaling, email, web browsing... the list goes on. To be comfortable on your computer you need to cherish your dot file configuration 💖!
This is a cross-platform dotfiles repository that manages my development environment across Linux (Arch), macOS, and Windows 11. It uses a unique bare repository approach that allows me to live directly in my dotfiles while maintaining git history.
Key features:
- 🌍 Cross-platform PowerShell 7+ based management
- 📁 Bare git repository for seamless dotfile management
- ✅ Automated testing via GitHub Actions on all platforms
- 🖥️ Comprehensive window manager configurations (AwesomeWM, Whim, Workspacer)
- 🔄 Dual cloning workflow for daily usage and development
This repository uses a bare git repository pattern:
- Bare repo location:
~/.cfg(contains git data, no working tree) - Work tree location:
$HOME(your actual home directory) - Benefit: Edit dotfiles directly in your home directory while maintaining git history
In practice:
- Edit
~/.config/awesome/rc.lua→ Changes are automatically tracked - Use
dot statusto see changes (PowerShell) orgit --git-dir=$HOME/.cfg --work-tree=$HOME status(bash) - Commit with
dot commitor the equivalent git command
This repository is used in two ways:
-
Bare Repository (
~/.cfg): For daily usage- Work tree at
$HOME, git dir at~/.cfg - Edit configs directly in home directory
- Use
dotfunction (PowerShell) orgit --git-dir=$HOME/.cfg --work-tree=$HOME(bash)
- Work tree at
-
Normal Repository (e.g.,
~/MyCrossPlatformDotfiles): For development- Full
.gitdirectory for normal git operations - Use for testing, history, contributing
- Standard
gitcommands
- Full
Prerequisites:
gitPowerShell 7+(pwsh)
Installation steps:
- Download the bootstrap script - Loads the
dotfunction and initialization tools - Initialize dotfiles - Clones the bare repository to
~/.cfg - Get additional configurations - Clones related repos (Neovim, WezTerm, etc.)
- Install packages - Installs platform-specific packages
# Step 1: Download bootstrap script (long version)
Invoke-RestMethod 'https://raw.githubusercontent.com/derekthecool/MyCrossPlatformDotfiles/refs/heads/master/Atelier/pwsh/MyModules/Dot/Source/Dot.Functions.ps1' | Invoke-Expression
# Step 1: Download bootstrap script (short version)
irm 'https://rb.gy/49hpz2' | iex
# Step 2: Initialize bare repository
Initialize-Dotfiles
# Step 3: Clone other config repos
Get-AllConfigurations
# Step 4: Restart shell, then install packages
pwsh
Install-DotPackagesThis repository is tested and supported on:
- Linux: Arch Linux (primary), Ubuntu (via CI)
- Windows: Windows 11 (primary), Windows 10 (via CI)
- macOS: Latest versions (via CI)
Platform-specific tools:
- Linux only: AwesomeWM, rofi, picom, systemd integration
- Windows only: Whim, Workspacer, Microsoft Windows Terminal, Scoop package manager
- Cross-platform: PowerShell, Starship, Neovim, WezTerm, Alacritty, btop, yazi
PowerShell is often seen as a Windows-only tool, but it's actually an excellent choice for cross-platform development.
Why PowerShell for dotfiles management?
- Cross-platform: PowerShell 7+ runs on Linux, macOS, and Windows
- Object pipeline: Uses objects instead of just text, making data manipulation easier
- Consistent syntax: Same language and cmdlets across all platforms
- Powerful automation: Advanced scripting capabilities with error handling
- FOSS: Open source with MIT license
Alternative shells? While I adore bash, zsh, and fish, PowerShell is the clear choice for a unified cross-platform setup. Starting with PowerShell 6, it became truly cross-platform, and version 7.4+ provides excellent stability and features.
MyCrossPlatformDotfiles/
├── .config/ # Application configurations
│ ├── awesome/ # AwesomeWM window manager (Linux)
│ ├── alacritty/ # Terminal emulator config
│ ├── asciinema/ # Terminal session recorder
│ ├── btop/ # System monitor
│ ├── fish/ # Fish shell configuration
│ ├── lftp/ # FTP client
│ ├── neomutt/ # Email client
│ ├── picom/ # Compositor (Linux)
│ ├── powershell/ # PowerShell module configs
│ ├── rofi/ # Application launcher (Linux)
│ ├── starship.toml # Cross-shell prompt
│ ├── vifm/ # Terminal file manager
│ ├── yazi/ # Modern terminal file manager
│ └── zathura/ # PDF viewer
├── Atelier/ # Development workspace
│ └── pwsh/MyModules/ # Custom PowerShell modules
│ ├── Dot/ # Bare repo git operations
│ ├── Dots/ # Multi-repo operations
│ └── DotInitializer/ # Package installation
├── Documents/PowerShell/ # PowerShell profile
├── .github/workflows/ # CI/CD pipelines
├── AppData/ # Windows-specific configs
│ ├── Local/ # Windows local app data
│ └── Roaming/ # Windows roaming app data
├── scoop/ # Windows package manager configs
├── .whim/ # Whim window manager (Windows)
├── .workspacer/ # Workspacer window manager (Windows)
├── .bashrc # Bash shell configuration
├── .zshrc # Zsh shell configuration
├── .tmux.conf # Tmux configuration
├── .gitconfig # Global git configuration
└── .wslconfig # WSL configuration
This repository includes several custom PowerShell modules in Atelier/pwsh/MyModules/:
Git wrapper for bare repository operations.
Usage:
dot status # Check git status
dot add .config/ # Stage files
dot commit -m "message" # Commit changes
dot push # Push to remoteBash equivalent:
git --git-dir=$HOME/.cfg --work-tree=$HOME statusManages multiple configuration repositories simultaneously.
Operates on this repo plus related configs:
- This repository (dotfiles)
- Stimpack (Neovim)
- WeztermStimpack (WezTerm)
- PloverStenoDictionaries (Plover)
Initializes the entire dotfiles setup.
What it does:
- Clones the bare repository to
~/.cfg - Sets up work tree at
$HOME - Configures git settings for bare repo
- Installs required PowerShell modules
- Creates backup of existing configs
Installs platform-specific packages and tools.
Features:
- Detects platform automatically (
$IsWindows,$IsLinux,$IsMacOS) - Uses appropriate package manager:
- Windows: Scoop (primary), WinGet
- macOS: Homebrew
- Linux: pacman (Arch), apt (Ubuntu), detects available
- Installs essential development tools, terminal applications, and utilities
- Location:
.config/awesome/ - Root file:
.config/awesome/rc.lua - Features: Multi-monitor support, dynamic tagging, auto-start, client routing
- Tested: ✅ Syntax-checked via CI
- Location:
.whim/ - Files:
whim.config.csx,whim.config.yaml - Features: Modern tiling window manager for Windows 11
- Location:
.workspacer/ - File:
workspacer.config.csx - Features: Tiling window manager for Windows 10/11
- Location:
.config/starship.toml - Description: Beautiful, fast, customizable prompt for any shell
- Features: Multi-shell support, git integration, AWS context, etc.
- Location:
.config/alacritty/ - Description: Fast, GPU-accelerated terminal emulator
- Features: Custom color schemes, key bindings, fonts
- Location: Separate repository - WeztermStimpack
- Description: GPU-accelerated terminal emulator with multiplexing
- Location:
AppData/Local/Packages/Microsoft.WindowsTerminal_8wekyb3d8bbwe/ - Description: Modern terminal application for Windows 11
- Profile:
Documents/PowerShell/profile.ps1 - Features: Custom aliases, PSReadLine configuration, modules, cross-platform paths
- Config:
.bashrc - Features: Starship prompt, fzf integration, WSL detection
- Config:
.zshrc - Features: Oh-My-Zsh, custom plugins, Starship prompt
- Location:
.config/fish/ - Features: Starship integration, abbreviations
- Location: Separate repository - Stimpack
- Description: Modern, extensible text editor
- Features: Lua configuration, LSP, fuzzy finder, git integration
- Location:
.config/vifm/vifmrc - Description: Vim-like file manager
- Features: Vim keybindings, custom colors, file operations
- Location:
.config/yazi/ - Description: Modern terminal file manager written in Rust
- Features: Fast, visually appealing, plugin system
- Location:
.config/btop/ - Description: Beautiful, resource-efficient system monitor
- Features: CPU, GPU, RAM, disk, network monitoring
- Config:
.tmux.conf - Description: Terminal multiplexer
- Features: Custom key bindings, status bar, pane management
- Location:
.config/neomutt/neomuttrc - Description: Terminal email client
- Features: Vim keybindings, notmuch integration, GPG
- Location:
.config/lftp/ - Description: Sophisticated FTP/HTTP client
- Features: Bookmark support, mirror, queue management
- Config:
yt-dlp.conf - Description: Video downloader for YouTube and other sites
- Features: Format selection, subtitles, archive handling
- Location:
.config/zathura/zathurarc - Description: Vim-like PDF viewer
- Features: Vim keybindings, minimal UI, fast rendering
- Location:
.pandoc/ - Description: Universal document converter
- Features: Custom templates, defaults
- Location:
.config/rofi/config.rasi - Description: Application launcher and window switcher
- Features: Custom themes, key bindings, drun mode
- Location:
.config/picom/ - Description: Compositor for X11
- Features: Blur effects, transparency, vsync
- Location:
AppData/Roaming/Vieb/ - Description: Vim-like browser
- Features: Vim keybindings for web browsing
- Location:
AppData/Roaming/termscp/ - Description: Terminal file transfer with SCP/SFTP
- Features: Graphical file transfer over SSH
- Config:
.gitconfig - Features: IncludeIf directives, URL shortcuts, credential helpers
- Config:
.clang-format - Description: Code formatter for C/C++/Java/JavaScript
- Features: Consistent code style
- Config:
.wslconfig - Description: Windows Subsystem for Linux configuration
- Features: Memory settings, networking, interop
- Config:
.mega-linter.yml - Description: Meta-linter running 70+ linters
- Features: Markdown, shell scripts, JSON, YAML, spelling
- Config:
.cspell.json - Description: Code spell checker
- Features: Custom dictionary, ignore patterns
- Config:
.jscpd.json - Description: Copy/paste detector
- Features: Find duplicate code
- Config:
.gitleaksignore - Description: Secret scanner
- Features: Prevent committing sensitive data
| Profile File | Used In This Repo | Repository File |
|---|---|---|
Machine-Wide, All Hosts: $profile.AllUsersAllHosts |
no | |
Machine-Wide, Host-Specific: $profile.AllUsersCurrentHost |
no | |
User-Specific, All Hosts: $profile.CurrentUserAllHosts |
yes | profile.ps1 |
User-Specific, Host-Specific: $profile.CurrentUserCurrentHost |
no |
Why CurrentUserAllHosts?
- Avoids requiring root/admin access
- Applies to all my computers (Windows 11 at work, Arch Linux at home)
- Machine-specific config can go in
CurrentUserCurrentHostif needed
- Login Shells:
/etc/profile→~/.bash_profile→~/.bash_login→~/.profile - Interactive Non-Login Shells:
/etc/bash.bashrc→~/.bashrc
- Always Loaded:
/etc/zshenv→~/.zshenv - Login Shells:
/etc/zprofile→~/.zprofile - Interactive Shells:
/etc/zshrc→~/.zshrc - Logout:
/etc/zlogout→~/.zlogout
PowerShell modules:
# Run all PowerShell module tests
./DotfilesTests.ps1
# Run specific module tests
Invoke-Pester -Path Atelier/pwsh/MyModules/Dot/Test/AwesomeWM configuration:
# Test AwesomeWM syntax
awesome --check ./.config/awesome/rc.luaAll changes are tested via GitHub Actions:
- PowerShell module tests: Pester framework on Linux, macOS, Windows
- AwesomeWM syntax check: Lua validation on Ubuntu
- Mega-Linter: Code quality checks on all files
- Package installation: Tests
Install-DotPackageson all platforms
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Ensure tests pass on all platforms
- Submit a pull request
Guidelines:
- Follow conventional commit format:
docs(claude): redesign README - Test on all three platforms if possible
- Add tests for new features
- Update documentation as needed
The dot function is PowerShell-only. Use the equivalent in bash:
git --git-dir=$HOME/.cfg --work-tree=$HOME <command>Remove the existing bare repository and re-initialize:
rm -rf ~/.cfg
Initialize-DotfilesInstall PowerShell 7+:
- Windows:
scoop install pwshorwinget install Microsoft.PowerShell - macOS:
brew install powershell - Arch Linux:
pacman -S powershell - Ubuntu:
snap install powershell --classic
- Check platform-specific logic (
$IsWindows,$IsLinux,$IsMacOS) - Verify path separators (
[System.IO.Path]::PathSeparator) - Check environment variables (
$HOME,$env:LOCALAPPDATA) - Test on all three platforms via GitHub Actions
Ensure you're in the correct git context:
- Bare repo: Use
dot statusor check~/.cfgexists - Normal repo: Use
git statusand ensure.gitdirectory exists
Windows Terminal stores configs in a package directory. The config location is:
AppData/Local/Packages/Microsoft.WindowsTerminal_8wekyb3d8bbwe/LocalState/settings.json
Some configurations are maintained in separate repositories for better organization:
These are automatically cloned by Get-AllConfigurations during installation.