From 71a777d0bd4aa21e7a5043766696ea5db5ec673a Mon Sep 17 00:00:00 2001 From: VetheonGames Date: Sat, 3 Jun 2023 12:35:00 -0600 Subject: [PATCH] Create First Run TUI skeleton --- TUI/First_run_tui.rb | 37 +++++++++++++++++++++++++++++++++++++ lib/Gemfile | 2 ++ lib/Gemfile.lock | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 74 insertions(+) create mode 100644 TUI/First_run_tui.rb diff --git a/TUI/First_run_tui.rb b/TUI/First_run_tui.rb new file mode 100644 index 0000000..b9f1ffd --- /dev/null +++ b/TUI/First_run_tui.rb @@ -0,0 +1,37 @@ +require 'curses' + +def init_screen + Curses.init_screen + Curses.start_color + # Define color pairs + Curses.init_pair(1, Curses::COLOR_WHITE, Curses::COLOR_BLUE) # Default + Curses.init_pair(2, Curses::COLOR_RED, Curses::COLOR_BLUE) # Alert + Curses.init_pair(3, Curses::COLOR_BLACK, Curses::COLOR_RED) # Emergent Alert +end + +def first_run_setup + # Ask for preferred color + # TODO: Implement function to ask for color + + # Ask for uplink speed + # TODO: Implement function to ask for uplink speed + + # Ask for total bandwidth + # TODO: Implement function to ask for total bandwidth + + # Ask for services the system should be aware of + # TODO: Implement function to ask for services + + # Ask for default mode + # TODO: Implement function to ask for default mode +end + +def main + init_screen + first_run_setup + # TODO: Implement the rest of the program +ensure + Curses.close_screen +end + +main \ No newline at end of file diff --git a/lib/Gemfile b/lib/Gemfile index a1c0a9f..2c0ae41 100644 --- a/lib/Gemfile +++ b/lib/Gemfile @@ -8,3 +8,5 @@ gem "curses", "~> 1.4" gem 'console' gem "rubocop", "~> 1.52" + +gem "solargraph", "~> 0.49.0" diff --git a/lib/Gemfile.lock b/lib/Gemfile.lock index c7feb79..1c70e16 100644 --- a/lib/Gemfile.lock +++ b/lib/Gemfile.lock @@ -2,16 +2,31 @@ GEM remote: https://rubygems.org/ specs: ast (2.4.2) + backport (1.2.0) + benchmark (0.2.1) console (1.16.2) fiber-local curses (1.4.4) + diff-lcs (1.5.0) + e2mmap (0.1.0) fiber-local (1.0.0) + jaro_winkler (1.5.6) json (2.6.3) + kramdown (2.4.0) + rexml + kramdown-parser-gfm (1.1.0) + kramdown (~> 2.0) + nokogiri (1.15.2-x86_64-linux) + racc (~> 1.4) parallel (1.23.0) parser (3.2.2.1) ast (~> 2.4.1) + racc (1.6.2) rainbow (3.1.1) + rbs (2.8.4) regexp_parser (2.8.0) + reverse_markdown (2.1.1) + nokogiri rexml (3.2.5) rubocop (1.52.0) json (~> 2.3) @@ -26,7 +41,26 @@ GEM rubocop-ast (1.29.0) parser (>= 3.2.1.0) ruby-progressbar (1.13.0) + solargraph (0.49.0) + backport (~> 1.2) + benchmark + bundler (~> 2.0) + diff-lcs (~> 1.4) + e2mmap + jaro_winkler (~> 1.5) + kramdown (~> 2.3) + kramdown-parser-gfm (~> 1.1) + parser (~> 3.0) + rbs (~> 2.0) + reverse_markdown (~> 2.0) + rubocop (~> 1.38) + thor (~> 1.0) + tilt (~> 2.0) + yard (~> 0.9, >= 0.9.24) + thor (1.2.2) + tilt (2.1.0) unicode-display_width (2.4.2) + yard (0.9.34) PLATFORMS x86_64-linux @@ -35,6 +69,7 @@ DEPENDENCIES console curses (~> 1.4) rubocop (~> 1.52) + solargraph (~> 0.49.0) BUNDLED WITH 2.4.13