mirror of https://github.com/tildeclub/welcome.git
fix indentation
This commit is contained in:
parent
83804b2cf8
commit
0b3f6cfb2c
20
welcome.rb
20
welcome.rb
|
@ -5,9 +5,9 @@ require "tty-prompt"
|
||||||
require "tty-screen"
|
require "tty-screen"
|
||||||
|
|
||||||
def sep
|
def sep
|
||||||
puts
|
puts
|
||||||
puts "~" * TTY::Screen.width
|
puts "~" * TTY::Screen.width
|
||||||
puts
|
puts
|
||||||
end
|
end
|
||||||
|
|
||||||
prompt = TTY::Prompt.new
|
prompt = TTY::Prompt.new
|
||||||
|
@ -49,10 +49,10 @@ puts " note that the list of shells extends beyond one page"
|
||||||
puts
|
puts
|
||||||
|
|
||||||
shells = File.readlines("/etc/shells")
|
shells = File.readlines("/etc/shells")
|
||||||
.select { |line| !line.start_with?("#") }
|
.select { |line| !line.start_with?("#") }
|
||||||
.map(&:chomp)
|
.map(&:chomp)
|
||||||
.map { |line| [File.basename(line), line] }
|
.map { |line| [File.basename(line), line] }
|
||||||
.to_h
|
.to_h
|
||||||
|
|
||||||
shell = prompt.select(" which shell would you like to use?", shells, per_page: shells.count)
|
shell = prompt.select(" which shell would you like to use?", shells, per_page: shells.count)
|
||||||
puts
|
puts
|
||||||
|
@ -80,8 +80,8 @@ puts
|
||||||
enable_byobu = prompt.yes?(" would you like to set byobu to launch automatically when you log in?")
|
enable_byobu = prompt.yes?(" would you like to set byobu to launch automatically when you log in?")
|
||||||
|
|
||||||
if enable_byobu
|
if enable_byobu
|
||||||
system "byobu-enable"
|
system "byobu-enable"
|
||||||
puts "our default configs will connect you to chat and open a mail client when you log in"
|
puts "our default configs will connect you to chat and open a mail client when you log in"
|
||||||
end
|
end
|
||||||
|
|
||||||
# tz
|
# tz
|
||||||
|
@ -155,6 +155,6 @@ puts "have a look at our wiki: https://tilde.club/wiki/ (ctrl-click will let you
|
||||||
File.delete("#{Dir.home}/.new_user")
|
File.delete("#{Dir.home}/.new_user")
|
||||||
|
|
||||||
if enable_byobu
|
if enable_byobu
|
||||||
exec "byobu"
|
exec "byobu"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue