Personal configuration for Bash and the applications used across Arch Linux, WSL Arch, Git Bash, Ubuntu, and macOS.
The repository is the source of truth. bash/bin/symlinks links supported
configuration into $HOME and ~/.config.
~/.bashrc links to bash/bashrc. It establishes guarded sourcing and then
loads bash/bashrc_personal. A file guard prevents the same configuration
module from running more than once in a shell.
The personal configuration enables:
- Vi command-line editing.
- Unlimited, appended command history.
- Automatic directory changes and spelling correction.
- Dotfile globbing and multiline history preservation.
- SSH agent keys and Neovim application aliases when available.
The bash/my_* modules load in this order:
my_environmentdefines directory and service settings.my_functionsprovides reusable shell and path helpers.my_exportsselects platform-aware applications and environment values.my_aliasesdefines commands, Vi mode, tmux behavior, and session keys.my_pathsassembles Linux, WSL, language, and user executable paths.my_completionsloads available platform and application completions.my_programsinitializes optional tools such as fzf, NVM, uv, mise, and Starship.
Optional programs are guarded so a missing tool does not prevent Bash startup. Platform checks keep Linux, WSL, Git Bash, Ubuntu, and macOS behavior separate.
bash/inputrc is linked to ~/.inputrc. It enables Vi editing, Meta key
support, colored completion, case-insensitive matching, and personal cursor and
history bindings.
Run this after changing the file:
bind -f ~/.inputrcsb/sessions.tsv is the source of truth for shared session bindings.
bash/bin/generate-session-bindings generates Bash, tmux, and Hyprland
configuration from that table.
On WSL, lowercase Alt bindings create or switch tmux sessions. Uppercase Alt bindings terminate them. For example:
Alt-Wcreates or switches toWork.Alt-Ncreates or switches toNeovim.Alt-Shift-WterminatesWork.Alt-Shift-NterminatesNeovim.
tmux owns these keys while Neovim is running inside tmux, so Neovim does not need duplicate mappings.
Validate generated files with:
generate-session-bindings --checkadConnect does not run from .bashrc. Running it synchronously during shell
startup can consume commands sent to new tmux panes and delay Bash, tmux, and
Neovim.
Instead, ad-connect.timer schedules the ad-connect.service systemd user
unit. The one-shot service:
- Starts independently of interactive shell initialization.
- Checks whether the AD network is reachable.
- Detects Windows, WSL, and Linux reboots.
- Uses
~/.config/krb5/user.keytabwithout reading terminal input. - Refreshes Kerberos credentials when reconnect state requires it.
- Uses noninteractive sudo for DNS and SSSD maintenance.
- Records successful reconnect state and avoids repeated work.
The timer runs shortly after boot and retries periodically. vpnConnect
continues to invoke adConnect with VPN-specific DNS behavior.
The keytab is a local credential and must never be committed. Provision or replace it interactively with:
createUserKeytabRecreate the keytab after changing the AD password.
Inspect the service with:
systemctl --user status ad-connect.timer --no-pager
systemctl --user status ad-connect.service --no-pager
journalctl --user -u ad-connect.service -b --no-pager
klistForce an interactive recovery with:
adConnect -fCreate the configured links with:
bash/bin/symlinks --createThe script installs the systemd user units and enables
ad-connect.timer. Reload systemd after changing a unit:
systemctl --user daemon-reload
systemctl --user restart ad-connect.timerUseful checks after Bash changes:
bash -n bash/bashrc bash/bashrc_personal bash/my_*
bash -n bash/bin/adConnect bash/bin/adConnectService
bash -n bash/bin/createUserKeytab
generate-session-bindings --check
git diff --checkAfter a Windows or WSL reboot, open WSL normally. Bash and session bindings should be immediately usable while the systemd user timer handles AD reconnect work in the background.