aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.Main/Terminal/Commands/startx.cs
diff options
context:
space:
mode:
authorAShifter <[email protected]>2017-11-25 08:59:48 -0700
committerAShifter <[email protected]>2017-11-25 08:59:48 -0700
commitc81573594f509177214bbc9b64427c8aabdc30a6 (patch)
tree0f16be1fffc1e1557adafbd1baa9ff7aa16a3381 /ShiftOS.Main/Terminal/Commands/startx.cs
parent90b1bdca5f8f2bf634a0b83ed9b623843ada5661 (diff)
downloadshiftos-rewind-c81573594f509177214bbc9b64427c8aabdc30a6.tar.gz
shiftos-rewind-c81573594f509177214bbc9b64427c8aabdc30a6.tar.bz2
shiftos-rewind-c81573594f509177214bbc9b64427c8aabdc30a6.zip
Add SaveSystem, FullScreen Terminal and stuff
Git had a horrible seizure and removed our repo but Alex-TIMEHACK helped us get it back.
Diffstat (limited to 'ShiftOS.Main/Terminal/Commands/startx.cs')
-rw-r--r--ShiftOS.Main/Terminal/Commands/startx.cs57
1 files changed, 57 insertions, 0 deletions
diff --git a/ShiftOS.Main/Terminal/Commands/startx.cs b/ShiftOS.Main/Terminal/Commands/startx.cs
new file mode 100644
index 0000000..38a8fdf
--- /dev/null
+++ b/ShiftOS.Main/Terminal/Commands/startx.cs
@@ -0,0 +1,57 @@
+using ShiftOS.Main.ShiftOS;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using ShiftOS.Engine;
+using static ShiftOS.Engine.CodepointUpgrade;
+using static ShiftOS.Engine.SaveSystem;
+
+
+namespace ShiftOS.Main.Terminal.Commands
+{
+ public class startx : TerminalCommand, ICodepointUpgrade
+ {
+ private bool hasGUI = false;
+ private bool autostart = false;
+ public override string Name { get; } = "startx";
+ public override string Summary { get; } = "Starts the ShiftX driver.";
+ public override string Usage { get; } = "startx";
+ public override bool Unlocked { get; set; } = false;
+ public int codePoints { get; set; } = 150;
+
+ public override void Run(params string[] args)
+ {
+ if (args.Length > 0)
+ {
+ if (args[0] == "autostart")
+ {
+ if (!autostart)
+ {
+ WriteLine("startx: Toggled autostart ON.");
+ return;
+ }
+ else
+ {
+ WriteLine("startx: Toggled autostart OFF.");
+ return;
+ }
+ }
+ WriteLine($"sbash: unexpected token: {args[0]}");
+ return;
+ }
+ if (!hasGUI)
+ {
+ var d = new Desktop();
+ d.Show();
+ hasGUI = true;
+ }
+ if (hasGUI == true)
+ {
+ WriteLine("The ShiftX driver has already been intialized.");
+ return;
+ }
+ }
+ }
+}