Created
September 2, 2019 02:25
-
-
Save Losses/a63bc56fb2b3b21a5fa20d62de496de1 to your computer and use it in GitHub Desktop.
Yet another Pwsh theme config.
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
{ | |
"globals" : | |
{ | |
"alwaysShowTabs" : false, | |
"defaultProfile" : "{53c9a523-8d38-4366-a5b3-f98e2a4d385c}", | |
"initialCols" : 120, | |
"initialRows" : 30, | |
"keybindings" : | |
[ | |
{ | |
"command" : "closeTab", | |
"keys" : | |
[ | |
"ctrl+w" | |
] | |
}, | |
{ | |
"command" : "newTab", | |
"keys" : | |
[ | |
"ctrl+t" | |
] | |
}, | |
{ | |
"command" : "newTabProfile0", | |
"keys" : | |
[ | |
"ctrl+shift+1" | |
] | |
}, | |
{ | |
"command" : "newTabProfile1", | |
"keys" : | |
[ | |
"ctrl+shift+2" | |
] | |
}, | |
{ | |
"command" : "newTabProfile2", | |
"keys" : | |
[ | |
"ctrl+shift+3" | |
] | |
}, | |
{ | |
"command" : "newTabProfile3", | |
"keys" : | |
[ | |
"ctrl+shift+4" | |
] | |
}, | |
{ | |
"command" : "newTabProfile4", | |
"keys" : | |
[ | |
"ctrl+shift+5" | |
] | |
}, | |
{ | |
"command" : "newTabProfile5", | |
"keys" : | |
[ | |
"ctrl+shift+6" | |
] | |
}, | |
{ | |
"command" : "newTabProfile6", | |
"keys" : | |
[ | |
"ctrl+shift+7" | |
] | |
}, | |
{ | |
"command" : "newTabProfile7", | |
"keys" : | |
[ | |
"ctrl+shift+8" | |
] | |
}, | |
{ | |
"command" : "newTabProfile8", | |
"keys" : | |
[ | |
"ctrl+shift+9" | |
] | |
}, | |
{ | |
"command" : "nextTab", | |
"keys" : | |
[ | |
"ctrl+tab" | |
] | |
}, | |
{ | |
"command" : "openSettings", | |
"keys" : | |
[ | |
"ctrl+," | |
] | |
}, | |
{ | |
"command" : "prevTab", | |
"keys" : | |
[ | |
"ctrl+shift+tab" | |
] | |
}, | |
{ | |
"command" : "scrollDown", | |
"keys" : | |
[ | |
"ctrl+shift+down" | |
] | |
}, | |
{ | |
"command" : "scrollDownPage", | |
"keys" : | |
[ | |
"ctrl+shift+pgdn" | |
] | |
}, | |
{ | |
"command" : "scrollUp", | |
"keys" : | |
[ | |
"ctrl+shift+up" | |
] | |
}, | |
{ | |
"command" : "scrollUpPage", | |
"keys" : | |
[ | |
"ctrl+shift+pgup" | |
] | |
}, | |
{ | |
"command" : "switchToTab0", | |
"keys" : | |
[ | |
"alt+1" | |
] | |
}, | |
{ | |
"command" : "switchToTab1", | |
"keys" : | |
[ | |
"alt+2" | |
] | |
}, | |
{ | |
"command" : "switchToTab2", | |
"keys" : | |
[ | |
"alt+3" | |
] | |
}, | |
{ | |
"command" : "switchToTab3", | |
"keys" : | |
[ | |
"alt+4" | |
] | |
}, | |
{ | |
"command" : "switchToTab4", | |
"keys" : | |
[ | |
"alt+5" | |
] | |
}, | |
{ | |
"command" : "switchToTab5", | |
"keys" : | |
[ | |
"alt+6" | |
] | |
}, | |
{ | |
"command" : "switchToTab6", | |
"keys" : | |
[ | |
"alt+7" | |
] | |
}, | |
{ | |
"command" : "switchToTab7", | |
"keys" : | |
[ | |
"alt+8" | |
] | |
}, | |
{ | |
"command" : "switchToTab8", | |
"keys" : | |
[ | |
"alt+9" | |
] | |
} | |
], | |
"requestedTheme" : "system", | |
"showTabsInTitlebar" : true, | |
"showTerminalTitleInTitlebar" : true, | |
"wordDelimiters" : " ./\\()\"'-:,.;<>~!@#$%^&*|+=[]{}~?\u2502" | |
}, | |
"profiles" : | |
[ | |
{ | |
"acrylicOpacity" : 0.5, | |
"background" : "#012456", | |
"closeOnExit" : false, | |
"colorScheme" : "Material", | |
"commandline" : "pwsh.exe", | |
"cursorColor" : "#FFFFFF", | |
"cursorShape" : "bar", | |
"fontFace" : "Sarasa Mono SC", | |
"fontSize" : 12, | |
"guid" : "{53c9a523-8d38-4366-a5b3-f98e2a4d385c}", | |
"historySize" : 9001, | |
"name" : "Pwsh", | |
"padding" : "0, 0, 0, 0", | |
"snapOnInput" : true, | |
"useAcrylic" : true | |
}, | |
{ | |
"acrylicOpacity" : 0.75, | |
"closeOnExit" : false, | |
"colorScheme" : "Campbell", | |
"commandline" : "cmd.exe", | |
"cursorColor" : "#FFFFFF", | |
"cursorShape" : "bar", | |
"fontFace" : "Consolas", | |
"fontSize" : 12, | |
"guid" : "{bb5c4088-1548-462a-942d-df970aeb0790}", | |
"historySize" : 9001, | |
"name" : "cmd", | |
"padding" : "0, 0, 0, 0", | |
"snapOnInput" : true, | |
"useAcrylic" : true | |
}, | |
{ | |
"acrylicOpacity" : 0.5, | |
"background" : "#012456", | |
"closeOnExit" : false, | |
"colorScheme" : "Campbell", | |
"commandline" : "powershell.exe", | |
"cursorColor" : "#FFFFFF", | |
"cursorShape" : "bar", | |
"fontFace" : "Courier New", | |
"fontSize" : 12, | |
"guid" : "{53c9a523-8d38-4366-a5b3-f98e2a4d385a}", | |
"historySize" : 9001, | |
"name" : "PowerShell", | |
"padding" : "0, 0, 0, 0", | |
"snapOnInput" : true, | |
"useAcrylic" : false | |
} | |
], | |
"schemes" : | |
[ | |
{ | |
"background" : "#0C0C0C", | |
"black" : "#263238", | |
"blue" : "#01579b", | |
"brightBlack" : "#767676", | |
"brightBlue" : "#2196f3", | |
"brightCyan" : "#00bcd4", | |
"brightGreen" : "#4caf50", | |
"brightPurple" : "#9c27b0", | |
"brightRed" : "#f44336", | |
"brightWhite" : "#fafafa", | |
"brightYellow" : "#ffeb3b", | |
"cyan" : "#006064", | |
"foreground" : "#F2F2F2", | |
"green" : "#1b5e20", | |
"name" : "Material", | |
"purple" : "#4a148c", | |
"red" : "#b71c1c", | |
"white" : "#bdbdbd", | |
"yellow" : "#f57f17" | |
}, | |
{ | |
"background" : "#0C0C0C", | |
"black" : "#0C0C0C", | |
"blue" : "#0037DA", | |
"brightBlack" : "#767676", | |
"brightBlue" : "#3B78FF", | |
"brightCyan" : "#61D6D6", | |
"brightGreen" : "#16C60C", | |
"brightPurple" : "#B4009E", | |
"brightRed" : "#E74856", | |
"brightWhite" : "#F2F2F2", | |
"brightYellow" : "#F9F1A5", | |
"cyan" : "#3A96DD", | |
"foreground" : "#F2F2F2", | |
"green" : "#13A10E", | |
"name" : "Campbell", | |
"purple" : "#881798", | |
"red" : "#C50F1F", | |
"white" : "#CCCCCC", | |
"yellow" : "#C19C00" | |
}, | |
{ | |
"background" : "#073642", | |
"black" : "#073642", | |
"blue" : "#268BD2", | |
"brightBlack" : "#002B36", | |
"brightBlue" : "#839496", | |
"brightCyan" : "#93A1A1", | |
"brightGreen" : "#586E75", | |
"brightPurple" : "#6C71C4", | |
"brightRed" : "#CB4B16", | |
"brightWhite" : "#FDF6E3", | |
"brightYellow" : "#657B83", | |
"cyan" : "#2AA198", | |
"foreground" : "#FDF6E3", | |
"green" : "#859900", | |
"name" : "Solarized Dark", | |
"purple" : "#D33682", | |
"red" : "#D30102", | |
"white" : "#EEE8D5", | |
"yellow" : "#B58900" | |
}, | |
{ | |
"background" : "#FDF6E3", | |
"black" : "#073642", | |
"blue" : "#268BD2", | |
"brightBlack" : "#002B36", | |
"brightBlue" : "#839496", | |
"brightCyan" : "#93A1A1", | |
"brightGreen" : "#586E75", | |
"brightPurple" : "#6C71C4", | |
"brightRed" : "#CB4B16", | |
"brightWhite" : "#FDF6E3", | |
"brightYellow" : "#657B83", | |
"cyan" : "#2AA198", | |
"foreground" : "#073642", | |
"green" : "#859900", | |
"name" : "Solarized Light", | |
"purple" : "#D33682", | |
"red" : "#D30102", | |
"white" : "#EEE8D5", | |
"yellow" : "#B58900" | |
} | |
] | |
} |
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
#requires -Version 2 -Modules posh-git | |
function Write-Theme { | |
param( | |
[bool] | |
$lastCommandFailed, | |
[string] | |
$with | |
) | |
#check the last command state and indicate if failed | |
If ($lastCommandFailed) { | |
$prompt = Write-Prompt -Object "$($sl.PromptSymbols.FailedCommandSymbol) " -ForegroundColor $sl.Colors.CommandFailedIconForegroundColor | |
} | |
#check for elevated prompt | |
If (Test-Administrator) { | |
$prompt += Write-Prompt -Object "$($sl.PromptSymbols.ElevatedSymbol) " -ForegroundColor $sl.Colors.AdminIconForegroundColor | |
} | |
$user = "▲"#[System.Environment]::UserName | |
if (Test-NotDefaultUser($user)) { | |
$prompt += Write-Prompt -Object "$user " -ForegroundColor $sl.Colors.PromptForegroundColor | |
} | |
# Writes the drive portion | |
$prompt += Write-Prompt -Object "$(Get-ShortPath -dir $pwd) " -ForegroundColor $sl.Colors.DriveForegroundColor | |
$status = Get-VCSStatus | |
if ($status) { | |
$themeInfo = Get-VcsInfo -status ($status) | |
$prompt += Write-Prompt -Object "git:" -ForegroundColor $sl.Colors.PromptForegroundColor | |
$prompt += Write-Prompt -Object "$($themeInfo.VcInfo) " -ForegroundColor $themeInfo.BackgroundColor | |
} | |
# write virtualenv | |
if (Test-VirtualEnv) { | |
$prompt += Write-Prompt -Object 'env:' -ForegroundColor $sl.Colors.PromptForegroundColor | |
$prompt += Write-Prompt -Object "$(Get-VirtualEnvName) " -ForegroundColor $themeInfo.VirtualEnvForegroundColor | |
} | |
if ($with) { | |
$prompt += Write-Prompt -Object "$($with.ToUpper()) " -BackgroundColor $sl.Colors.WithBackgroundColor -ForegroundColor $sl.Colors.WithForegroundColor | |
} | |
# Writes the postfixes to the prompt | |
$prompt += Write-Prompt -Object $sl.PromptSymbols.PromptIndicator -ForegroundColor $sl.Colors.Prompt1 | |
$prompt += Write-Prompt -Object $sl.PromptSymbols.PromptIndicator -ForegroundColor $sl.Colors.Prompt2 | |
$prompt += Write-Prompt -Object $sl.PromptSymbols.PromptIndicator -ForegroundColor $sl.Colors.Prompt3 | |
$prompt += ' ' | |
$prompt | |
} | |
$sl = $global:ThemeSettings #local settings | |
$sl.PromptSymbols.PromptIndicator = [char]::ConvertFromUtf32(0x276F) | |
$sl.Colors.PromptForegroundColor = [ConsoleColor]::White | |
$sl.Colors.PromptSymbolColor = [ConsoleColor]::White | |
$sl.Colors.PromptHighlightColor = [ConsoleColor]::DarkBlue | |
$sl.Colors.WithForegroundColor = [ConsoleColor]::DarkRed | |
$sl.Colors.WithBackgroundColor = [ConsoleColor]::Magenta | |
$sl.Colors.DriveForegroundColor = [ConsoleColor]::Blue | |
$sl.Colors.Prompt1 = [ConsoleColor]::Red | |
$sl.Colors.Prompt2 = [ConsoleColor]::DarkYellow | |
$sl.Colors.Prompt3 = [ConsoleColor]::Green |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment