Skip to content

Latest commit

 

History

History
92 lines (64 loc) · 5.18 KB

README.md

File metadata and controls

92 lines (64 loc) · 5.18 KB

PowerShell 7 QoL profile

Portable PowerShell 7 configuration for Windows Terminal with Atuin history navigation, Zoxide directory completion, Oh My Posh, custom CLI replacements, smart curl translation, optional SSH links, and utility shortcuts.

Directory layout

  • PowerShell/Microsoft.PowerShell_profile.ps1: main profile, installed in Documents/PowerShell.
  • PowerShell/Modules/Custom/: nine custom modules, installed under Documents/PowerShell/Modules/Custom.
  • CustomScripts/Kali-MonitorMode.ps1 and CustomScripts/gpg-startup.ps1: optional utilities, installed in $HOME/.custom.
  • Themes/: Oh My Posh theme files, installed in $HOME/.poshthemes.
  • Atuin/config.toml: optional Atuin settings, installed in $HOME/.config/atuin.
  • PowerShell/powershell.config.json: optional PowerShell settings.

No D: drive is required. The main profile discovers its module directory relative to $PSScriptRoot.

Required tools

Use PowerShell 7. Install atuin, zoxide, oh-my-posh, eza, bat, fd, rg, dust, btm, xh, and fastfetch to enable the corresponding features. curl.exe is used for native curl operations. Modules such as Terminal-Icons, Microsoft.WinGet.CommandNotFound, and wt-shell-integration are optional. The custom history and completion integrations need PSReadLine.

@(
    'Microsoft.PowerShell', 'Microsoft.WindowsTerminal',
    'JanDeDobbeleer.OhMyPosh', 'ajeetdsouza.zoxide', 'Atuinsh.Atuin',
    'eza-community.eza', 'sharkdp.bat', 'sharkdp.fd',
    'BurntSushi.ripgrep.MSVC', 'bootandy.dust', 'Clement.bottom',
    'ducaale.xh', 'Fastfetch-cli.Fastfetch'
) | ForEach-Object { winget install --exact --id $_ }

Install on C: / Documents

In a clean pwsh -NoProfile session from the cloned repository root:

$profileDir = Split-Path -Parent $PROFILE.CurrentUserCurrentHost
New-Item -ItemType Directory -Path $profileDir -Force | Out-Null
Copy-Item .\PowerShell\* $profileDir -Recurse -Force

$themeDir = Join-Path $HOME '.poshthemes'
New-Item -ItemType Directory -Path $themeDir -Force | Out-Null
Copy-Item .\Themes\*.json $themeDir -Force

$customDir = Join-Path $HOME '.custom'
New-Item -ItemType Directory -Path $customDir -Force | Out-Null
Copy-Item .\CustomScripts\*.ps1 $customDir -Force

$atuinDir = Join-Path $HOME '.config\atuin'
New-Item -ItemType Directory -Path $atuinDir -Force | Out-Null
Copy-Item .\Atuin\config.toml $atuinDir -Force

Back up your existing profile before installation. Reopen PowerShell to initialize key handlers in a fresh session.

Custom commands

  • ls, ll, tree: eza, with icons and hyperlinks.
  • cat, find, grep, du, top: bat, fd, ripgrep, dust, bottom.
  • curl: xh by default. Recognized curl flags are translated to xh when safe. Untranslatable or ambiguous options route to curl.exe before execution. This is not a complete curl-compatible implementation, so use curl.exe for strict protocol or automation compatibility.
  • clear: clear screen and scrollback.
  • snip: copy and trim selected desktop terminal text.
  • link PATH: OSC 8 clickable path locally, plain path for ordinary SSH, remapped file hyperlink for the configured SSH peer.
  • monitor-mode: optional Kali WSL USB Wi-Fi utility, forwarding arguments to $HOME/.custom/Kali-MonitorMode.ps1.
  • gpg-startup: optional GPG helper.
  • ollama: custom local Docker integration, requires a container named local-ollama.

start-webui and the duplicate kali-monitor wrapper were removed. Open WebUI Docker management is not included.

Optional SSH settings

The profile does not publish or require anyone's private SSH peer addresses. Set these environment variables before starting PowerShell if you want special behavior:

  • QOL_MOBILE_SSH_PEER: source IP for the mobile SSH session. Suppresses Oh My Posh and the flex shortcut and displays plain link paths.
  • QOL_REMAP_SSH_PEER: source IP for the SSH client requiring drive remapping. link and eza will remap Windows drive letters for this peer.

The example remapping is C: -> P:, D: -> Q:, and F: -> S:. Adjust the two SSH modules if your mapped drives differ. Ordinary SSH peers receive plain link output and no eza remapping.

For example, configure your own session in the terminal before opening a fresh shell:

$env:QOL_MOBILE_SSH_PEER = '<your-mobile-ssh-peer-ip>'
$env:QOL_REMAP_SSH_PEER = '<your-remapped-ssh-peer-ip>'

These settings are optional and are not included in this public repository.

Other scripts

CustomScripts/gpg-startup.ps1 manages optional GPG agent initialization. CustomScripts/Kali-MonitorMode.ps1 requires compatible Kali WSL, USB Wi-Fi hardware, and related tools. The old Startup/startup.cmd automatic elevated upgrade launcher was removed. No startup maintenance is scheduled by this repository.

RichPy_Setup.ps1 is a separate optional Python traceback customization. Inspect the installer before running it. snapshot.json records file hashes and paths from the last repository sync and must be regenerated when file contents change.

Do not commit Atuin history, private keys, tokens, passphrase files, personal network addresses, or user-specific settings. .gitignore does not remove secrets from Git history.