renamed installer to wf-tools. updated wf-tools
This commit is contained in:
@@ -42,7 +42,7 @@ OptionParser.parse do |parser|
|
|||||||
exit(0)
|
exit(0)
|
||||||
end
|
end
|
||||||
|
|
||||||
Dir.mkdir("~//.local/share/Wfetch")
|
Dir.mkdir(Path["~/.local/share/Wfetch"].expand(home: true))
|
||||||
|
|
||||||
|
|
||||||
puts "Please enter your WeatherApi key (Learn to get one at README.md):"
|
puts "Please enter your WeatherApi key (Learn to get one at README.md):"
|
||||||
@@ -55,21 +55,23 @@ OptionParser.parse do |parser|
|
|||||||
|
|
||||||
puts "#{orange}#{bold}Config setup finished. Starting disp setup.#{reset}"
|
puts "#{orange}#{bold}Config setup finished. Starting disp setup.#{reset}"
|
||||||
|
|
||||||
File.write("/home/#{sudo_user}/.local/share/Wfetch/config.toml", "api = \"#{api}\"
|
File.write(Path["~/.local/share/Wfetch/config.toml"].expand(home: true), "
|
||||||
city = \"#{city}\"")
|
api = \"#{api}\"
|
||||||
|
city = \"#{city}\"
|
||||||
|
")
|
||||||
|
|
||||||
puts "#{orange}#{bold}Would you like customary (1), metric (2), or both (3)?#{reset}"
|
puts "#{orange}#{bold}Would you like customary (1), metric (2), or both (3)?#{reset}"
|
||||||
|
|
||||||
choice = gets
|
choice = gets
|
||||||
|
|
||||||
if choice == "1"
|
if choice == "1"
|
||||||
File.copy("data/1.toml", "/home/#{sudo_user}/.local/share/Wfetch/disp.toml")
|
File.copy("data/1.toml", Path["~/.local/share/Wfetch/disp.toml"].expand(home: true))
|
||||||
elsif choice == "2"
|
elsif choice == "2"
|
||||||
File.copy("data/2.toml", "/home/#{sudo_user}/.local/share/Wfetch/disp.toml")
|
File.copy("data/2.toml", Path["~/.local/share/Wfetch/disp.toml"].expand(home: true))
|
||||||
elsif choice == "3"
|
elsif choice == "3"
|
||||||
File.copy("data/3.toml", "/home/#{sudo_user}/.local/share/Wfetch/disp.toml")
|
File.copy("data/3.toml", Path["~/.local/share/Wfetch/disp.toml"].expand(home: true))
|
||||||
else
|
else
|
||||||
File.copy("data/1.toml", "/home/#{sudo_user}/.local/share/Wfetch/disp.toml")
|
File.copy("data/1.toml", Path["~/.local/share/Wfetch/disp.toml"].expand(home: true))
|
||||||
end
|
end
|
||||||
|
|
||||||
puts "#{orange}#{bold}Setup finnished. Enjoy!#{reset}"
|
puts "#{orange}#{bold}Setup finnished. Enjoy!#{reset}"
|
||||||
Reference in New Issue
Block a user