Personal shell configuration for Windows and Linux — CIS-hardened, prompt-themed with Starship and Oh My Posh. Also backs up the full desktop config for an Omarchy install.
Inspired by Xcad2k/dotfiles
.
├── Linux/
│ ├── .bashrc # Bash — CIS-hardened shell init
│ ├── .zshrc # Zsh — CIS-hardened shell init
│ ├── .tcshrc # Tcsh — CIS-hardened shell init
│ └── startship.toml # Starship prompt theme (Linux)
├── omarchy/
│ ├── .config/ # Mirror of ~/.config for every Omarchy-managed app
│ ├── THEME # Active theme name at backup time
│ ├── install.sh # Restores .config/ onto a fresh Omarchy install
│ └── README.md # Details + update instructions
└── windows/
├── Microsoft.PowerShell_profile.ps1 # PowerShell profile — CIS-hardened
├── starship.toml # Starship prompt theme (Windows)
└── hackthebox.omp.json # Oh My Posh — HackTheBox theme
All shell configs are hardened against the CIS Linux Benchmark §5.4 (Linux) and PowerShell STIG (Windows). Controls applied:
| Control | Linux (bash/zsh/tcsh) | PowerShell |
|---|---|---|
| Session timeout | TMOUT=900 (15 min, readonly) |
— |
| Default umask | umask 027 |
— |
| History privacy | HISTCONTROL=ignorespace:erasedups / setopt HIST_IGNORE_SPACE |
AddToHistoryHandler drops lines matching password|token|secret|… |
| History size cap | HISTSIZE=1000 / SAVEHIST=1000 |
MaximumHistoryCount 1000 |
| History persistence | — | HistorySaveStyle SaveIncrementally |
| PATH safety | Strips . and empty segments |
— |
Note:
trim_atin both Starship configs uses.local— replace with your actual domain if needed.
- A Nerd Font installed and enabled in your terminal
(configs use JetBrains Mono Nerd Font)
omarchy/ mirrors ~/.config for an Omarchy Linux
install — Hyprland, Waybar, Walker, terminals, and every other app Omarchy
templates into your config, plus custom hooks/themes. See
omarchy/README.md for restore and update steps
(short version: ./omarchy/install.sh).
1. Install Starship
curl -sS https://starship.rs/install.sh | shPackage manager alternatives
| Distro | Command |
|---|---|
| Arch / Manjaro | pacman -S starship |
| Fedora 31+ | dnf install starship |
| Alpine 3.13+ | apk add starship |
| NixOS | nix-env -iA nixos.starship |
| Any (cargo) | cargo install starship --locked |
| Any (snap) | snap install starship |
| Any (brew) | brew install starship |
2. Copy configs
# Shell init (pick yours)
cp Linux/.bashrc ~/.bashrc
cp Linux/.zshrc ~/.zshrc
cp Linux/.tcshrc ~/.tcshrc
# Starship theme
mkdir -p ~/.config
cp Linux/startship.toml ~/.config/starship.toml3. Reload your shell
source ~/.bashrc # or ~/.zshrc / ~/.tcshrc1. Install Starship
winget install Starship.Starship
# or
choco install starship
# or
scoop install starship2. Install required PowerShell modules
Install-Module -Name Terminal-Icons -Repository PSGallery -Force3. Copy configs
# PowerShell profile
Copy-Item windows\Microsoft.PowerShell_profile.ps1 $PROFILE
# Starship theme
New-Item -ItemType Directory -Force "$HOME\.starship"
Copy-Item windows\starship.toml "$HOME\.starship\starship.toml"4. Reload profile
. $PROFILEwinget install JanDeDobbeleer.OhMyPosh -s wingetCopy the theme and uncomment the oh-my-posh line in the PowerShell profile:
Copy-Item windows\hackthebox.omp.json "$env:LOCALAPPDATA\Programs\oh-my-posh\themes\hackthebox.omp.json"Then in Microsoft.PowerShell_profile.ps1, uncomment:
# oh-my-posh init pwsh --config '...\hackthebox.omp.json' | Invoke-Expression| Shell | Platform | Prompt |
|---|---|---|
| Bash | Linux | Starship |
| Zsh | Linux | Starship |
| Tcsh | Linux | Starship |
| PowerShell | Windows | Starship / Oh My Posh |

