8000 Add function to preview theme · Issue #107 · jasonmarcher/PowerTab · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add function to preview theme #107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jasonmarcher opened this issue Apr 4, 2019 · 0 comments
Open

Add function to preview theme #107

jasonmarcher opened this issue Apr 4, 2019 · 0 comments
Assignees
Milestone

Comments

@jasonmarcher
Copy link
Owner

Convert this code into a usable function:

function Show-ConsoleListPreview {
    $Colors = $PowerTabConfig.ConsoleList.Colors
    Write-Host " " -NoNewLine
    Write-Host "┌─"           -ForegroundColor $Colors.BorderColor     -BackgroundColor $Colors.BorderBackColor -NoNewLine
    Write-Host " I"           -ForegroundColor $Colors.BorderTextColor -BackgroundColor $Colors.BorderBackColor -NoNewLine
    Write-Host "tem "         -ForegroundColor $Colors.FilterColor     -BackgroundColor $Colors.BorderBackColor -NoNewLine
    Write-Host "───────────┐" -ForegroundColor $Colors.BorderColor     -BackgroundColor $Colors.BorderBackColor

    Write-Host " " -NoNewLine
    Write-Host "│"                   -ForegroundColor $Colors.BorderColor -BackgroundColor $Colors.BorderBackColor -NoNewLine
    Write-Host "Item              "  -ForegroundColor $Colors.TextColor   -BackgroundColor $Colors.BackColor -NoNewLine
    Write-Host "│"                   -ForegroundColor $Colors.BorderColor -BackgroundColor $Colors.BorderBackColor
    Write-Host " " -NoNewLine
    Write-Host "│"                   -ForegroundColor $Colors.BorderColor -BackgroundColor $Colors.BorderBackColor -NoNewLine
    Write-Host "Item Selected     "  -ForegroundColor $Colors.SelectedTextColor -BackgroundColor $Colors.SelectedBackColor -NoNewLine
    Write-Host "│"                   -ForegroundColor $Colors.BorderColor -BackgroundColor $Colors.BorderBackColor
    Write-Host " " -NoNewLine
    Write-Host "│"                   -ForegroundColor $Colors.BorderColor -BackgroundColor $Colors.BorderBackColor -NoNewLine
    Write-Host "Item              "  -ForegroundColor $Colors.TextColor   -BackgroundColor $Colors.BackColor -NoNewLine
    Write-Host "│"                   -ForegroundColor $Colors.BorderColor -BackgroundColor $Colors.BorderBackColor
    Write-Host " " -NoNewLine
    Write-Host "│"                   -ForegroundColor $Colors.BorderColor -BackgroundColor $Colors.BorderBackColor -NoNewLine
    Write-Host "Item              "  -ForegroundColor $Colors.TextColor   -BackgroundColor $Colors.BackColor -NoNewLine
    Write-Host "│"                   -ForegroundColor $Colors.BorderColor -BackgroundColor $Colors.BorderBackColor

    Write-Host " " -NoNewLine
    Write-Host "└─"           -ForegroundColor $Colors.BorderColor     -BackgroundColor $Colors.BorderBackColor -NoNewLine
    Write-Host "[1] 1-4 [4]"  -ForegroundColor $Colors.BorderTextColor -BackgroundColor $Colors.BorderBackColor -NoNewLine
    Write-Host "──────┘"      -ForegroundColor $Colors.BorderColor     -BackgroundColor $Colors.BorderBackColor
}

$themes = (dir .\Documents\WindowsPowerShell\Modules\PowerTab\ColorThemes\*.csv | select -ExpandProperty Name) -replace '.csv',''
$themes = $themes -replace 'Theme',''
$themes | ForEach-Object {
    Import-TabExpansionTheme $_
    Write-Host "Testing Theme $_"
    Write-Host ""
    Show-ConsoleListPreview
    Write-Host ""
    Write-Host ""
}
@jasonmarcher jasonmarcher added this to the v1.2 milestone Apr 4, 2019
@jasonmarcher jasonmarcher self-assigned this Apr 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant
0