Added location flag to colortool and updated help. Also used path combine for schemes directory
This commit is contained in:
parent
34ff272cfa
commit
66bc1f547e
|
@ -304,7 +304,7 @@ namespace ColorTool
|
|||
|
||||
static void PrintSchemes()
|
||||
{
|
||||
var schemeDirectory = new FileInfo(new Uri(Assembly.GetEntryAssembly().GetName().CodeBase).AbsolutePath).Directory.FullName + "/schemes";
|
||||
var schemeDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "schemes\\");
|
||||
|
||||
if (Directory.Exists(schemeDirectory))
|
||||
{
|
||||
|
@ -343,6 +343,12 @@ namespace ColorTool
|
|||
}
|
||||
}
|
||||
|
||||
static void PrintSchemesDirectory()
|
||||
{
|
||||
string schemeDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "schemes\\");
|
||||
Console.WriteLine(schemeDirectory);
|
||||
}
|
||||
|
||||
private static Color UIntToColor(uint color)
|
||||
{
|
||||
byte r = (byte)(color >> 0);
|
||||
|
@ -502,6 +508,10 @@ namespace ColorTool
|
|||
case "--version":
|
||||
Version();
|
||||
return;
|
||||
case "-l":
|
||||
case "--location":
|
||||
PrintSchemesDirectory();
|
||||
return;
|
||||
case "-x":
|
||||
case "--xterm":
|
||||
setUnixStyle = true;
|
||||
|
|
|
@ -138,29 +138,30 @@
|
|||
<value>Could not find or load "{0}"</value>
|
||||
</data>
|
||||
<data name="Usage" xml:space="preserve">
|
||||
<value>Usage:
|
||||
colortool.exe [options] <schemename>
|
||||
ColorTool is a utility for helping to set the color palette of the Windows Console.
|
||||
By default, applies the colors in the specified .itermcolors or .ini file to the current console window.
|
||||
This does NOT save the properties automatically. For that, you'll need to open the properties sheet and hit "Ok".
|
||||
Included should be a `schemes/` directory with a selection of schemes of both formats for examples.
|
||||
Feel free to add your own preferred scheme to that directory.
|
||||
Arguments:
|
||||
<schemename>: The name of a color scheme. ct will try to first load it as an .itermcolors color scheme.
|
||||
If that fails, it will look for it as an .ini file color scheme.
|
||||
Options:
|
||||
-?, --help : Display this help message
|
||||
-c, --current : Print the color table for the currently applied scheme
|
||||
-q, --quiet : Don't print the color table after applying
|
||||
-d, --defaults : Apply the scheme to only the defaults in the registry
|
||||
-b, --both : Apply the scheme to both the current console and the defaults.
|
||||
-x, --xterm : Set the colors using VT sequences. Used for setting the colors in WSL.
|
||||
Only works in Windows versions >= 17048.
|
||||
-s, --schemes : Displays all available schemes
|
||||
-v, --version : Display the version number
|
||||
-o, --output <filename> : output the current color table to an file (in .ini format)
|
||||
|
||||
Available importers:
|
||||
<value>Usage:
|
||||
colortool.exe [options] <schemename>
|
||||
ColorTool is a utility for helping to set the color palette of the Windows Console.
|
||||
By default, applies the colors in the specified .itermcolors or .ini file to the current console window.
|
||||
This does NOT save the properties automatically. For that, you'll need to open the properties sheet and hit "Ok".
|
||||
Included should be a `schemes/` directory with a selection of schemes of both formats for examples.
|
||||
Feel free to add your own preferred scheme to that directory.
|
||||
Arguments:
|
||||
<schemename>: The name of a color scheme. ct will try to first load it as an .itermcolors color scheme.
|
||||
If that fails, it will look for it as an .ini file color scheme.
|
||||
Options:
|
||||
-?, --help : Display this help message
|
||||
-c, --current : Print the color table for the currently applied scheme
|
||||
-q, --quiet : Don't print the color table after applying
|
||||
-d, --defaults : Apply the scheme to only the defaults in the registry
|
||||
-b, --both : Apply the scheme to both the current console and the defaults.
|
||||
-x, --xterm : Set the colors using VT sequences. Used for setting the colors in WSL.
|
||||
Only works in Windows versions >= 17048.
|
||||
-s, --schemes : Displays all available schemes
|
||||
-l, --location : Displays the full path to the schemes directory
|
||||
-v, --version : Display the version number
|
||||
-o, --output <filename> : output the current color table to an file (in .ini format)
|
||||
|
||||
Available importers:
|
||||
{0}</value>
|
||||
</data>
|
||||
<data name="WroteToDefaults" xml:space="preserve">
|
||||
|
|
Loading…
Reference in a new issue