Create First Run TUI skeleton
This commit is contained in:
parent
87c3a0c65a
commit
71a777d0bd
37
TUI/First_run_tui.rb
Normal file
37
TUI/First_run_tui.rb
Normal file
|
@ -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
|
|
@ -8,3 +8,5 @@ gem "curses", "~> 1.4"
|
||||||
gem 'console'
|
gem 'console'
|
||||||
|
|
||||||
gem "rubocop", "~> 1.52"
|
gem "rubocop", "~> 1.52"
|
||||||
|
|
||||||
|
gem "solargraph", "~> 0.49.0"
|
||||||
|
|
|
@ -2,16 +2,31 @@ GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
ast (2.4.2)
|
ast (2.4.2)
|
||||||
|
backport (1.2.0)
|
||||||
|
benchmark (0.2.1)
|
||||||
console (1.16.2)
|
console (1.16.2)
|
||||||
fiber-local
|
fiber-local
|
||||||
curses (1.4.4)
|
curses (1.4.4)
|
||||||
|
diff-lcs (1.5.0)
|
||||||
|
e2mmap (0.1.0)
|
||||||
fiber-local (1.0.0)
|
fiber-local (1.0.0)
|
||||||
|
jaro_winkler (1.5.6)
|
||||||
json (2.6.3)
|
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)
|
parallel (1.23.0)
|
||||||
parser (3.2.2.1)
|
parser (3.2.2.1)
|
||||||
ast (~> 2.4.1)
|
ast (~> 2.4.1)
|
||||||
|
racc (1.6.2)
|
||||||
rainbow (3.1.1)
|
rainbow (3.1.1)
|
||||||
|
rbs (2.8.4)
|
||||||
regexp_parser (2.8.0)
|
regexp_parser (2.8.0)
|
||||||
|
reverse_markdown (2.1.1)
|
||||||
|
nokogiri
|
||||||
rexml (3.2.5)
|
rexml (3.2.5)
|
||||||
rubocop (1.52.0)
|
rubocop (1.52.0)
|
||||||
json (~> 2.3)
|
json (~> 2.3)
|
||||||
|
@ -26,7 +41,26 @@ GEM
|
||||||
rubocop-ast (1.29.0)
|
rubocop-ast (1.29.0)
|
||||||
parser (>= 3.2.1.0)
|
parser (>= 3.2.1.0)
|
||||||
ruby-progressbar (1.13.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)
|
unicode-display_width (2.4.2)
|
||||||
|
yard (0.9.34)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
x86_64-linux
|
x86_64-linux
|
||||||
|
@ -35,6 +69,7 @@ DEPENDENCIES
|
||||||
console
|
console
|
||||||
curses (~> 1.4)
|
curses (~> 1.4)
|
||||||
rubocop (~> 1.52)
|
rubocop (~> 1.52)
|
||||||
|
solargraph (~> 0.49.0)
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
2.4.13
|
2.4.13
|
||||||
|
|
Loading…
Reference in New Issue
Block a user