This repository contains the configuration I use to keep my Windows 11 PowerShell profile and the Bash environment inside WSL2 in sync. The layout follows chezmoi conventions so the same source files can be applied on both operating systems.
Note for AI contributors: Please read and follow the repository guidelines in
AGENTS.mdbefore making any changes.
| Path | Purpose |
|---|---|
dot_bashrc |
Bash profile applied in WSL. Detects the dotfiles directory, refreshes the checkout with chezmoi update, renders helper functions, and sources shared shortcuts. |
home/dot_bash_functions.tmpl |
chezmoi template that turns the shared shortcut definitions into Bash functions. |
readonly_Documents/PowerShell/Microsoft.PowerShell_profile.ps1.tmpl |
PowerShell profile template. chezmoi renders the final Microsoft.PowerShell_profile.ps1 on Windows. |
common/shortcuts.yml |
Single source of truth for helper commands and directory shortcuts that are rendered for both shells. |
common/functions.yml |
Shared function definitions (for example, Git helpers) that are rendered alongside the shortcuts. |
Quick reference:
- Run
shortcuts(optionally with a category such asDIRS) to list the generated helpers from the YAML files. - Run
functionsto focus on the custom helpers fromcommon/functions.yml. - Directory shortcuts land you in the target folder and, on Linux, automatically show the contents with
ls -la.
- Install chezmoi on both Windows (PowerShell) and WSL.
- Clone this repository and set the
DOTFILESenvironment variable to the checkout path (chezmoi does this automatically when you runchezmoi init). - Apply the dotfiles with
chezmoi applyfrom either shell. This renders the PowerShell profile, Bash helper functions, and any other managed files. - Open a new terminal session. Bash regenerates
~/.bash_functionson demand and automatically sources it, so the shortcut helpers are always available. Both shells display the current Git branch and commit so you can see which version of the dotfiles is active.
Two generated helpers keep the shells in sync:
shortcuts [CATEGORY]lists every shortcut defined incommon/shortcuts.yml(plus any generated functions). Use it to confirm the name, category, and description before calling a helper.functions [CATEGORY]lists the custom helpers stored incommon/functions.yml. This is useful when you only need the higher-level workflows (for example, the Gitallghelper).
Both commands understand the same categories used in the YAML files, so filtering stays consistent on Windows and Linux.
- Edit
common/shortcuts.ymlfor shortcuts orcommon/functions.ymlfor reusable helpers. Each shortcut supports awin,linux, orbothcommand. Provide an English description and keep the category (cat) consistent with the existing entries. - Run
chezmoi applyto regenerate the derived files. The PowerShell profile and Bash helper functions will be rebuilt using the updated shortcut or function data. - Open a new shell or run the
shorthelper to review the rendered shortcuts.
The SysColors PowerShell module lives under readonly_Documents/PowerShell/Modules/SysColors.
It discovers YAML theme definitions, builds an execution plan, and applies the updates to
multiple targets (Windows Terminal, the PowerShell profile, the Bash profile, Windows accent
color, and editors such as VS Code, Notepad++, and Vim).
Usage overview:
- Ensure the
powershell-yamlmodule is installed:Install-Module powershell-yaml. - Import the module (the rendered PowerShell profile does this automatically):
Import-Module SysColors. - List available themes with
SysColors-Listor filter withSysColors-Where. - Open a theme definition for editing with
SysColors-Config <THEME_NAME>(this launches Visual Studio Code viacodeorcode.cmd). - Apply a theme with
SysColors <THEME_NAME>(use-WhatIfto review the plan first). - Restore the most recent backup with
SysColors-Restore -Latestor list backups withSysColors-Restore -Listbefore selecting a specific snapshot.
The module also exports a compact SysColor helper (alias sc) that wraps the
main cmdlets:
SysColor -themeslists available themes (same asSysColors-List).SysColor -backupsshows the saved snapshots (same asSysColors-Restore -List).SysColor -backrestores the most recent snapshot (same asSysColors-Restore -Latest).SysColor -config <Theme>opens the referenced theme YAML in Visual Studio Code.- A direct switch such as
SysColor -monokaiapplies a theme viaSysColors.
Combine the helper with -WhatIf and -SkipBackup to forward the options to the
underlying cmdlets.
Theme files live beside the module in the themes folder. Current bundled themes include:
- Dracula — neon-accented dark palette inspired by the popular Dracula theme.
- Monokai — classic dark scheme with warm accents.
- Solarized Dark — low-contrast dark palette tuned for long sessions.
Create new themes by
following the schema shown in example.yml. Wallpaper entries are optional—leave
the wallpaper.path or targets.windows.wallpaper values empty ('') to skip
changing the desktop background when applying a theme.