Skip to content

Marak123/Custom-Powershell-Windows-Terminal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 Custom Terminal Config — “No to lecimy!”

A complete, ready-to-use setup for a modern PowerShell 7 + Windows Terminal experience, styled after the Zsh shells you see on Linux (e.g. Kali): an oh-my-posh prompt theme, real-time command suggestions, syntax highlighting, file-type icons, prettier directory listings and instant fuzzy history search.

“No to lecimy!” (Polish for “Let’s go!”) is the banner and window title this profile greets you with.


✨ What you get

Feature Powered by
Rich, informative prompt (night-owl theme) oh-my-posh
History-based command autosuggestions (fish/zsh style) PSReadLine
Colorful file preview instead of cat bat
Directory listings with icons (ls, ll, lt) lsd
Fuzzy history search (Ctrl + R) fzf + PSFzf
File-type icons in listings Terminal-Icons
Quick in-terminal editor (touch) micro
Readable, colorized ipconfig (ip, ipa) built-in
Custom welcome banner & window title built-in

📦 Repository contents

File Purpose Destination
Microsoft.PowerShell_profile.ps1 Main PowerShell profile (functions, aliases, modules) $PROFILE
config.yaml lsd appearance configuration ~\.config\lsd\config.yaml
Meslo.zip Meslo Nerd Font — MesloLGS family (regular + mono) system font folder
LICENSE MIT license
.gitignore Keeps generated/local files out of git
README.md This file

🧰 Requirements

  • Windows 10/11
  • Windows Terminal (recommended)
  • PowerShell 7+ (pwsh) — check with $PSVersionTable.PSVersion If you don’t have it: winget install -e --id Microsoft.PowerShell

Tested on PowerShell 7.5 / Windows 11.


🛠️ Installation

Step 1 — CLI tools (winget)

Open PowerShell and install all the command-line tools:

winget install -e --id JanDeDobbeleer.OhMyPosh   # prompt theme engine
winget install -e --id junegunn.fzf              # fuzzy finder (Ctrl+R)
winget install -e --id sharkdp.bat               # syntax-highlighting "cat"
winget install -e --id lsd-rs.lsd                # "ls" with icons
winget install -e --id zyedidia.micro            # terminal editor (used by touch)

⚠️ After installing, close and reopen the terminal so PATH is refreshed.

Step 2 — Nerd Font (CRITICAL)

Without a Nerd Font, the theme’s icons and symbols show up as empty boxes.

  1. Unzip the bundled Meslo.zip.
  2. Select all the .ttf files → right-click → Install (or Install for all users).
  3. In Windows Terminal: Ctrl + ,PowerShell profile → Appearance → Font face → choose MesloLGS Nerd Font (or MesloLGS Nerd Font Mono — both are included).

Meslo.zip ships the MesloLGS family (the classic Powerline favorite) in the standard and Mono variants — that’s all this setup needs. Prefer the full Meslo pack or other variants? Grab them from Nerd Fonts.

Step 3 — PowerShell modules

# Update the module manager (recommended for newer PSReadLine)
Install-Module -Name PowerShellGet -Force -AllowClobber -Scope CurrentUser

# The actual modules (restart the terminal after installing PowerShellGet!)
Install-Module -Name PSReadLine     -Force -Scope CurrentUser
Install-Module -Name Terminal-Icons -Force -Scope CurrentUser
Install-Module -Name PSFzf          -Force -Scope CurrentUser

Step 4 — PowerShell profile

Copy Microsoft.PowerShell_profile.ps1 from this repo into your profile location:

# Create the profile folder if it doesn't exist
New-Item -ItemType Directory -Force -Path (Split-Path $PROFILE) | Out-Null

# Copy the profile from the repo (run this from the repo folder)
Copy-Item ".\Microsoft.PowerShell_profile.ps1" -Destination $PROFILE -Force

Your profile path is always shown by $PROFILE (usually …\Documents\PowerShell\Microsoft.PowerShell_profile.ps1).

Step 5 — lsd configuration

New-Item -ItemType Directory -Force -Path "$HOME\.config\lsd" | Out-Null
Copy-Item ".\config.yaml" -Destination "$HOME\.config\lsd\config.yaml" -Force

Step 6 — oh-my-posh theme (optional speed cache)

The profile first looks for a pre-compiled prompt in ~\.posh_init.ps1 (for a faster startup); if it isn’t there, it loads the night-owl theme live. To generate the cache (one-time, noticeably faster startup):

oh-my-posh init pwsh --config "$env:USERPROFILE\AppData\Local\Programs\oh-my-posh\themes\night-owl.omp.json" | Out-File "$HOME\.posh_init.ps1"

Want a different theme? List them with Get-ChildItem "$env:USERPROFILE\AppData\Local\Programs\oh-my-posh\themes", swap night-owl for another and regenerate the cache.

Step 7 — Finishing touch (hide the Microsoft header)

To remove the gray “Microsoft Windows…” banner at startup: Windows Terminal settings → PowerShell profile → Command line — append -nologo (e.g. pwsh.exe -nologo).

Restart the terminal. Done — no to lecimy! 🚀


✅ Verifying the installation

Paste this script into the terminal — it checks that everything is in place:

Write-Host "`n=== CLI tools ===" -ForegroundColor Cyan
foreach ($t in "oh-my-posh","fzf","bat","lsd","micro") {
    if (Get-Command $t -ErrorAction SilentlyContinue) { Write-Host "[OK]   $t" -ForegroundColor Green }
    else { Write-Host "[MISSING] $t" -ForegroundColor Red }
}

Write-Host "`n=== PowerShell modules ===" -ForegroundColor Cyan
foreach ($m in "PSReadLine","Terminal-Icons","PSFzf") {
    $v = (Get-Module -ListAvailable -Name $m | Select-Object -First 1).Version
    if ($v) { Write-Host "[OK]   $m v$v" -ForegroundColor Green }
    else { Write-Host "[MISSING] $m" -ForegroundColor Red }
}

Write-Host "`n=== Config files ===" -ForegroundColor Cyan
if (Test-Path $PROFILE) { Write-Host "[OK]   profile: $PROFILE" -ForegroundColor Green } else { Write-Host "[MISSING] profile" -ForegroundColor Red }
if (Test-Path "$HOME\.config\lsd\config.yaml") { Write-Host "[OK]   config.yaml (lsd)" -ForegroundColor Green } else { Write-Host "[MISSING] config.yaml (lsd)" -ForegroundColor Red }

All green = you’re good to go. Any “MISSING” line tells you what’s still left to install.


⌨️ Command reference (functions & aliases)

Everything below is added by the profile.

Files & directories

Command What it does
ls lsd -a — listing with icons, colors, directories first
ll lsd -la — detailed view (permissions, size, date) with a header
lt lsd --tree --depth 2 — tree view (skips node_modules)
lc plain Get-ChildItem as a table (no icons)
cat <file> preview a file via bat (header, grid, line numbers)
touch <file> create a file (or refresh its timestamp) and open it in micro

Editors & apps

Command / alias What it does
open <file> open a file in Notepad++
npp / n++ launch Notepad++
code / vscode launch Visual Studio Code
np launch the built-in Notepad
Start-App <path> <args> helper to launch any program

⚠️ The paths to Notepad++ and VS Code are hard-coded (C:\Programs\…). If yours live elsewhere (e.g. C:\Program Files\…), see Customization.

Networking

Command What it does
ip ipconfig with readable coloring (headers, labels, IP addresses)
ipa ip -all — full network config (ipconfig /all), colorized

Keyboard shortcuts (PSReadLine)

Key Action
(right arrow) accept the next word of the suggestion
Enter accept the line
Tab menu completion (cycle through matches)
Ctrl + R fuzzy history search (fzf, with a safe fallback)

🧩 What each module / tool adds

  • oh-my-posh — the prompt engine. Renders the status line with the night-owl theme: path, Git status, execution time, etc. The profile loads it from the ~\.posh_init.ps1 cache for a faster startup.
  • PSReadLine — the brain of the command line. Enables ListView history suggestions (with tooltips), syntax highlighting and the custom key bindings.
  • Terminal-Icons — adds file-type icons to PowerShell listings. Loaded in the background (via a Start-ThreadJob thread) so it doesn’t slow down startup.
  • PSFzf — integrates fzf with PowerShell. Provides the fuzzy history search on Ctrl + R. Also loaded in the background.
  • bat — “cat on steroids”: syntax highlighting, line numbers, a grid. Theme set to Dracula ($env:BAT_THEME).
  • lsd — a next-generation ls: icons, colors, tree view, directory grouping. Appearance is driven by config.yaml.
  • micro — a lightweight, intuitive terminal editor (mouse support, GUI-like shortcuts). Opened by the touch function.
  • fzf — a general-purpose fuzzy finder; the engine behind history search.

The profile also:

  • sets UTF-8 encoding (so non-ASCII characters and icons render correctly),
  • sets the window title to “No to lecimy!” and prints an ASCII banner,
  • adds a friendly unknown-command handler — instead of a long error it prints a short red one-liner.

🎨 Customization

  • App paths — in the profile, edit the paths in the npp and code functions if your Notepad++ / VS Code live elsewhere:
    function npp  { Start-App "C:\Program Files\Notepad++\notepad++.exe" $args }
    function code { Start-App "C:\Program Files\Microsoft VS Code\Code.exe" $args }
  • Prompt theme — see Step 6 (swap night-owl for any oh-my-posh theme).
  • bat theme — change $env:BAT_THEME (list options with bat --list-themes).
  • Banner / window title — edit the UI section at the top of the profile.

🩺 Troubleshooting

Symptom Fix
Icons show as boxes / question marks The Nerd Font isn’t selected — see Step 2
The profile doesn’t load Make sure the file sits exactly at the path from $PROFILE
“running scripts is disabled” Set-ExecutionPolicy -Scope CurrentUser RemoteSigned
ls / cat behave the “old” way lsd / bat not on PATH — restart the terminal after Step 1
No file icons in listings Install Terminal-Icons (Step 3)
Slow terminal startup Generate the theme cache — Step 6

📄 License

Released under the MIT license — see LICENSE for details.

About

A complete, ready-to-use setup for a modern PowerShell 7 + Windows Terminal experience, styled after the Zsh shells you see on Linux (e.g. Kali): an oh-my-posh prompt theme, real-time command suggestions, syntax highlighting, file-type icons, prettier directory listings and instant fuzzy history search.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Contributors