11 KiB
Troubleshooting Guide
This guide covers common issues and their solutions when using winfig.
Table of Contents
- PowerShell Issues
- Oh-My-Posh Issues
- Windows Terminal Issues
- Git Issues
- Scoop Issues
- Font and Display Issues
- Performance Issues
- General Issues
PowerShell Issues
Profile Not Loading
Symptom: PowerShell starts but custom functions and theme are not available.
Solutions:
-
Check if profile exists:
Test-Path $PROFILE -
Check execution policy:
Get-ExecutionPolicy # Should be RemoteSigned or Unrestricted -
Set execution policy if needed:
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -
Check for errors in profile:
& $PROFILE # Look for error messages
Module Import Errors
Symptom: Errors about missing modules (posh-git, Terminal-Icons, PSFzf).
Solution:
Install missing modules:
Install-Module posh-git -Scope CurrentUser -Force
Install-Module Terminal-Icons -Scope CurrentUser -Force
Install-Module PSFzf -Scope CurrentUser -Force
Slow Startup
Symptom: PowerShell takes a long time to start.
Solutions:
-
Check which modules are slow to load:
Measure-Command { & $PROFILE } -
Disable unused modules in
user_profile.ps1 -
Ensure lazy loading is working:
# Check if background job completed Get-Job
Functions Not Working
Symptom: Custom functions like gs, gp, .. don't work.
Solutions:
-
Reload profile:
. $PROFILE -
Check if function exists:
Get-Command gs -
Check for conflicts:
Get-Alias gs -ErrorAction SilentlyContinue
Oh-My-Posh Issues
Theme Not Displaying
Symptom: Prompt is plain text, no colors or icons.
Solutions:
-
Check if Oh-My-Posh is installed:
Get-Command oh-my-posh -
Install Oh-My-Posh:
scoop install oh-my-posh -
Verify theme file exists:
Test-Path (Join-Path (Split-Path $PROFILE) "m1ng.omp.json")
Icons Not Showing (Boxes/Question Marks)
Symptom: Squares, boxes, or question marks instead of icons.
Solutions:
-
Install a Nerd Font:
scoop bucket add nerd-fonts scoop install CascadiaCode-NF -
Set font in Windows Terminal:
- Open Settings (
Ctrl+,) - Go to Appearance
- Set Font face to "CaskaydiaCove Nerd Font" or another Nerd Font
- Open Settings (
-
Restart Windows Terminal
Theme Performance Issues
Symptom: Prompt is slow, especially in Git repositories.
Solutions:
-
Disable Git status fetching in theme:
- Edit
m1ng.omp.json - Set
fetch_status: falsein git segment
- Edit
-
Use simpler theme:
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\minimal.omp.json" | Invoke-Expression
Windows Terminal Issues
Settings Not Applied
Symptom: Windows Terminal doesn't show custom settings.
Solutions:
-
Verify settings location:
$settingsPath = "$env:LOCALAPPDATA\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json" Test-Path $settingsPath -
Open settings in editor:
- Press
Ctrl+Shift+,(opens JSON file) - Verify settings are correct
- Press
-
Check for JSON errors:
- Look for syntax errors in settings.json
- Use a JSON validator
-
Reset to defaults:
- Rename settings.json
- Restart Windows Terminal (creates new defaults)
- Re-apply winfig settings
Keybindings Not Working
Symptom: Custom keybindings don't work.
Solutions:
-
Check for conflicts:
- Open Settings → Actions
- Look for duplicate keybindings
-
Verify in settings.json:
- Check
actionsarray - Ensure no syntax errors
- Check
-
Try different key combination
Font Not Changing
Symptom: Terminal doesn't use Nerd Font.
Solutions:
-
Install font system-wide:
# Download and install font file # Or use Scoop scoop install CascadiaCode-NF -
Set in PowerShell profile settings:
- Settings → Profiles → PowerShell → Appearance
- Set Font face manually
-
Restart Windows Terminal
Git Issues
Config Not Applied
Symptom: Git aliases don't work.
Solutions:
-
Verify config location:
git config --list --show-origin -
Manually copy config:
Copy-Item git\.gitconfig ~\.gitconfig -Force -
Set user info:
git config --global user.name "Your Name" git config --global user.email "your@email.com"
Aliases Not Working
Symptom: Git aliases like git lg, git sync don't work.
Solutions:
-
Check if alias exists:
git config --get-regexp alias -
Test alias:
git config alias.lg -
Manually add alias:
git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
Line Ending Issues
Symptom: Git shows all files as modified (^M characters).
Solutions:
-
Configure line endings:
git config --global core.autocrlf true -
Refresh repository:
git rm --cached -r . git reset --hard
Scoop Issues
Scoop Not Found
Symptom: scoop command not recognized.
Solutions:
-
Install Scoop:
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser irm get.scoop.sh | iex -
Add to PATH:
$env:PATH += ";$env:USERPROFILE\scoop\shims" -
Restart PowerShell
Package Installation Fails
Symptom: scoop install <package> fails.
Solutions:
-
Update Scoop:
scoop update -
Check for conflicts:
scoop list -
Clear cache:
scoop cache rm * -
Try different bucket:
scoop bucket add extras scoop search <package>
Slow Downloads
Symptom: Package downloads are slow.
Solutions:
-
Enable aria2:
scoop install aria2 scoop config aria2-enabled true -
Increase connections:
scoop config aria2-max-connection-per-server 16 scoop config aria2-split 16
Font and Display Issues
Icons Show as Boxes
Symptom: Icons appear as boxes or question marks.
Solutions:
-
Install Nerd Font:
scoop bucket add nerd-fonts scoop install CascadiaCode-NF -
Set font in all profiles:
- Windows Terminal: Settings → Profiles → Defaults → Appearance
- Set Font face to Nerd Font
-
Verify font is installed:
- Windows Settings → Fonts
- Search for "Cascadia" or your chosen font
Colors Look Wrong
Symptom: Colors are incorrect or washed out.
Solutions:
-
Enable TrueColor:
- Windows Terminal Settings → Rendering
- Disable "Use legacy console"
-
Check color scheme:
- Settings → Profiles → Color scheme
- Try different scheme (One Half Dark, Dracula)
-
Update terminal:
scoop update windows-terminal
Blurry or Pixelated
Symptom: Text appears blurry or pixelated.
Solutions:
-
Adjust antialiasing:
- Settings → Rendering
- Try different antialiasing modes (ClearType, Grayscale)
-
Check DPI scaling:
- Windows Settings → Display
- Ensure DPI scaling is appropriate
-
Disable Acrylic:
- Settings → Appearance
- Turn off "Acrylic material"
Performance Issues
Slow Terminal Startup
Symptom: Terminal takes long to open.
Solutions:
-
Disable unnecessary startup tasks:
- Edit
user_profile.ps1 - Comment out unused module imports
- Edit
-
Use lazy loading:
- Already implemented in winfig profile
-
Clear temp files:
Remove-Item $env:TEMP\* -Recurse -Force -ErrorAction SilentlyContinue
Sluggish Git Operations
Symptom: Git commands are slow.
Solutions:
-
Disable Oh-My-Posh git status:
- Edit
m1ng.omp.json - Set
fetch_status: false
- Edit
-
Configure Git to use FSCache:
git config --global core.fscache true git config --global core.preloadindex true -
Exclude antivirus scanning:
- Add Git installation directory to antivirus exclusions
High Memory Usage
Symptom: PowerShell uses excessive memory.
Solutions:
-
Check for module leaks:
Get-Process pwsh | Select-Object -Property * -
Restart PowerShell regularly
-
Limit history size:
Set-PSReadLineOption -MaximumHistoryCount 1000
General Issues
Permission Errors
Symptom: "Access denied" or permission errors.
Solutions:
-
Run as Administrator:
- Right-click Windows Terminal
- Select "Run as administrator"
-
Use
sudo:scoop install sudo sudo <command> -
Check file permissions:
Get-Acl $PROFILE
Profile Conflicts
Symptom: Multiple profiles causing conflicts.
Solutions:
-
Check profile locations:
$PROFILE | Format-List * -Force -
Use correct profile:
- CurrentUserCurrentHost (recommended)
- Edit only this profile
-
Remove conflicting profiles:
Remove-Item $PROFILE.CurrentUserAllHosts -ErrorAction SilentlyContinue
Setup Script Fails
Symptom: setup.ps1 fails with errors.
Solutions:
-
Run with execution policy:
Set-ExecutionPolicy Bypass -Scope Process .\setup.ps1 -
Check error message and fix specific issue
-
Use selective setup:
.\setup.ps1 -SkipScoop # Skip problematic component -
Manual setup:
- Copy files manually from each directory
- Follow README in each subdirectory
Backup/Restore Issues
Symptom: Backup or restore fails.
Solutions:
-
Check disk space:
Get-PSDrive C -
Run with administrator privileges
-
Check paths:
Test-Path .\backups -
Use full paths:
.\backup.ps1 # Instead of relative paths
Getting More Help
If you continue to experience issues:
-
Check Documentation:
- Read component-specific READMEs
- Review configuration comments
-
Enable Verbose Output:
$VerbosePreference = "Continue" .\setup.ps1 -Verbose -
Check Logs:
- PowerShell:
$error[0] | Format-List * -Force - Scoop:
scoop cache show
- PowerShell:
-
Create an Issue:
- GitHub: winfig issues
- Include error messages and system info
-
Community Support:
- Windows Terminal discussions
- Oh-My-Posh GitHub
- Scoop community
System Information
To gather system information for troubleshooting:
# PowerShell version
$PSVersionTable
# Windows version
Get-ComputerInfo | Select-Object WindowsVersion, OsArchitecture
# Installed modules
Get-Module -ListAvailable | Where-Object Name -in 'posh-git','Terminal-Icons','PSFzf'
# Scoop status
scoop status
# Git version
git --version
# Oh-My-Posh version
oh-my-posh version
Include this information when reporting issues.