Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotfiles

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

Powershell Linux


Contents

.
├── 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

Security Hardening

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_at in both Starship configs uses .local — replace with your actual domain if needed.


Prerequisites


Omarchy (Full Desktop Backup)

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).


Installation

Linux

1. Install Starship

curl -sS https://starship.rs/install.sh | sh
Package 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.toml

3. Reload your shell

source ~/.bashrc   # or ~/.zshrc / ~/.tcshrc

Windows (PowerShell)

1. Install Starship

winget install Starship.Starship
# or
choco install starship
# or
scoop install starship

2. Install required PowerShell modules

Install-Module -Name Terminal-Icons -Repository PSGallery -Force

3. 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

. $PROFILE

Optional: Oh My Posh (Windows)

winget install JanDeDobbeleer.OhMyPosh -s winget

Copy 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 Support

Shell Platform Prompt
Bash Linux Starship
Zsh Linux Starship
Tcsh Linux Starship
PowerShell Windows Starship / Oh My Posh

References

About

Personal customization files used on Windows and Linux experience.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Used by

Contributors

Languages