-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from pyrretsoftware/axellse-4
better support for linux and a brand new pallete system
- Loading branch information
Showing
10 changed files
with
175 additions
and
34 deletions.
There are no files selected for viewing
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Drawing; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using TerminalPilot.Enums; | ||
using TerminalPilot.Parser; | ||
|
||
namespace TerminalPilot.Classes | ||
{ | ||
//base class | ||
public class Palletes { | ||
public class PalleteClass | ||
{ | ||
public Color LargeColor { get; set; } | ||
public Color SmallColor1 { get; set; } | ||
public Color SmallColor2 { get; set; } | ||
public Color SmallColor3 { get; set; } | ||
} | ||
|
||
public static string CurrentPallete = "NeonPurple"; | ||
|
||
public static Color GetCurrentPallete(PalleteType type) | ||
{ | ||
PalleteClass currentpallete = IncludedPalletes[CurrentPallete]; | ||
if (type == PalleteType.Large) | ||
{ | ||
return currentpallete.LargeColor; | ||
} | ||
else if (type == PalleteType.Small1) | ||
{ | ||
return currentpallete.SmallColor1; | ||
} | ||
else if (type == PalleteType.Small2) | ||
{ | ||
return currentpallete.SmallColor2; | ||
} | ||
else if (type == PalleteType.Small3) | ||
{ | ||
return currentpallete.SmallColor3; | ||
} | ||
return Color.White; | ||
} | ||
public static void SetCurrentPallete(string pallete) | ||
{ | ||
CurrentPallete = pallete; | ||
} | ||
public static Dictionary<string, PalleteClass> IncludedPalletes = new Dictionary<string, PalleteClass>() | ||
{ | ||
//neon purple (defualt and my favorite) | ||
{"NeonPurple", new PalleteClass() | ||
{ | ||
LargeColor = Color.FromArgb(0, 101, 40, 247), | ||
SmallColor1 = Color.FromArgb(0, 160, 118, 249), | ||
SmallColor2 = Color.FromArgb(0, 215, 187, 245), | ||
SmallColor3 = Color.FromArgb(0, 237, 228, 255), | ||
}}, | ||
// sunset pastel | ||
{"SunsetPastel", new PalleteClass() | ||
{ | ||
LargeColor = Color.FromArgb(0, 101, 40, 247), | ||
SmallColor1 = Color.FromArgb(0, 160, 118, 249), | ||
SmallColor2 = Color.FromArgb(0, 215, 187, 245), | ||
SmallColor3 = Color.FromArgb(0, 237, 228, 255), | ||
} | ||
} | ||
}; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
namespace TerminalPilot.Enums | ||
{ | ||
public enum PalleteType | ||
{ | ||
Large, | ||
Small1, | ||
Small2, | ||
Small3 | ||
|
||
} | ||
} |
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,40 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Runtime.InteropServices; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using TerminalPilot.Classes; | ||
|
||
namespace TerminalPilot.OSSupport | ||
{ | ||
public class AutomaticConfigConfigurer | ||
{ | ||
public static void StartupConfigure() | ||
{ | ||
//check if were on a unix system | ||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) | ||
{ | ||
//options are | ||
// /bin/bash | ||
// custom | ||
ConfigManager.SetShell("/bin/bash", "-c \"{COMMAND}\""); | ||
} | ||
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) | ||
{ | ||
//options are | ||
// cmd | ||
// powershell | ||
// custom | ||
ConfigManager.SetShell("cmd.exe", "/c \"{COMMAND}\""); | ||
} else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) | ||
{ | ||
//options are | ||
// zsh | ||
// /bin/bash | ||
// custom | ||
ConfigManager.SetShell("/bin/zsh", "-c \"{COMMAND}\""); | ||
} | ||
} | ||
} | ||
} |
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
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