-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Address emojis not visible even in unicode-supported terminal #46 and…
… expose sixel support test function
- Loading branch information
1 parent
1deea2c
commit 0ada503
Showing
7 changed files
with
43 additions
and
13 deletions.
There are no files selected for viewing
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
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
Binary file modified
BIN
+512 Bytes
(100%)
...treConsole/overrides/Spectre.Console.ImageSharp/lib/net6.0/Spectre.Console.ImageSharp.dll
Binary file not shown.
Binary file modified
BIN
+512 Bytes
(100%)
PwshSpectreConsole/overrides/Spectre.Console/lib/net6.0/Spectre.Console.dll
Binary file not shown.
This file was deleted.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
PwshSpectreConsole/public/config/Test-SpectreSixelSupport.ps1
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
function Test-SpectreSixelSupport { | ||
<# | ||
.SYNOPSIS | ||
Tests if the terminal supports Sixel graphics. | ||
.DESCRIPTION | ||
Tests if the terminal supports Sixel graphics. Sixel allows the terminal to display images. | ||
Windows Terminal Preview and other terminals support sixel, see https://www.arewesixelyet.com/ for more. | ||
Returns $true if the terminal supports Sixel graphics, otherwise $false. | ||
.EXAMPLE | ||
if (Test-SpectreSixelSupport) { | ||
Write-SpectreHost "Sixel graphics are supported :)" | ||
} else { | ||
Write-SpectreHost "Sixel graphics are not supported :(" | ||
} | ||
#> | ||
[Reflection.AssemblyMetadata("title", "Set-SpectreColors")] | ||
param () | ||
$response = Get-ControlSequenceResponse -ControlSequence "[c" | ||
return $response.Contains(";4;") | ||
} |
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