Last active
September 3, 2022 08:19
-
-
Save biswajit-saha/3770b74cd923333652dacdc2e20c24ce to your computer and use it in GitHub Desktop.
My Windows Terminal with PowerShell profile setup. A minimal approach.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Dracula+", | |
"background": "#1E192B", | |
"black": "#21222C", | |
"blue": "#82AAFF", | |
"brightBlack": "#545454", | |
"brightBlue": "#A667E6", | |
"brightCyan": "#3AE6E6", | |
"brightGreen": "#33E264", | |
"brightPurple": "#D35082", | |
"brightRed": "#FF6161", | |
"brightWhite": "#F8F8F2", | |
"brightYellow": "#39FA73", | |
"cursorColor": "#ECEFF4", | |
"cyan": "#30BCDB", | |
"foreground": "#F8F8F2", | |
"green": "#24E454", | |
"purple": "#9B52CC", | |
"red": "#FF5555", | |
"selectionBackground": "#F8F8F2", | |
"white": "#F8F8F2", | |
"yellow": "#FFCB6B" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Configuring my oh-my-posh promt theme | |
oh-my-posh init pwsh --config "C:\simple-green.omp.json" | Invoke-Expression | |
# Removing predifined aliases because I will use those alias differently. | |
# It also prevent conflict | |
Remove-Alias gc -Force -ErrorAction SilentlyContinue | |
Remove-Alias gp -Force -ErrorAction SilentlyContinue | |
# Setting aliases for git command | |
function gs { git status $args } | |
function ga { git add @args } | |
function gc { git commit @args } | |
function gp { git push @args } | |
function gpt { git push --tags @args } | |
# Color scheme output command from https://dev.to/teckert/comment/mm18 | |
function show-color {[enum]::GetValues([System.ConsoleColor]) | Foreach-Object {Write-Host $_ -ForegroundColor $_}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", | |
"blocks": [ | |
{ | |
"alignment": "left", | |
"segments": [ | |
{ | |
"foreground": "black", | |
"background": "green", | |
"properties": { | |
"style": "full" | |
}, | |
"style": "plain", | |
"template": "\n {{ .Path }} ", | |
"type": "path" | |
}, | |
{ | |
"type": "git", | |
"style": "plain", | |
"foreground": "black", | |
"background": "lightWhite", | |
"background_templates": [ | |
"{{ if or (.Working.Changed) (.Staging.Changed) }}#ffef5c{{ end }}", | |
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#FFCC80{{ end }}", | |
"{{ if gt .Ahead 0 }} #B388FF{{ end }}", | |
"{{ if gt .Behind 0 }}#B388FB{{ end }}" | |
], | |
"template": " git[{{.HEAD }}] ", | |
"properties": { | |
"branch_icon": "", | |
"fetch_status": true, | |
"fetch_stash_count": true, | |
"fetch_upstream_icon": true, | |
"untracked_modes": { | |
"/Users/user/Projects/oh-my-posh/": "no" | |
} | |
} | |
} | |
], | |
"type": "prompt" | |
} | |
], | |
"final_space": true, | |
"version": 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My minimalistic yet colorful PowerShell setup.
I was trying to set up my Windows terminal Powershell in a simplistic and minimal way. I don't need too much feature.
This only shows the current working directory path with the git branch name. and if the git branch is dirty, shows yellow background color. I have also added some small functions, basically, aliases for some git commands.
Feel free to use it. Cheers!
Credits
Oh-My-Posh: https://ohmyposh.dev/
Font: IBM Plex Mono
Font: IBM Plex Mono
Color Theme: A custom theme highly inspired by Dracula
BONUS: You can find various windows Terminal themes at https://windowsterminalthemes.dev/