fixed formatting in installer and added a goodbye message to wfetch! :)

This commit is contained in:
koffeejava
2026-03-13 16:46:20 -06:00
parent a1b3b7baf8
commit b19406a076
2 changed files with 23 additions and 2 deletions

View File

@@ -97,7 +97,8 @@ city = gets
puts "#{orange}#{bold}Config setup finished. Starting disp setup.#{reset}"
File.write("/home/#{sudo_user}/.local/share/Wfetch/config.toml", "api = \"#{api}\"
File.write("/home/#{sudo_user}/.local/share/Wfetch/config.toml", "
api = \"#{api}\"
city = \"#{city}\"")
puts "#{orange}#{bold}Would you like customary (1), metric (2), or both (3)?#{reset}"

View File

@@ -86,6 +86,25 @@ module Wfetch
repeat = 1
if Time.local.minute < 10
time = (Time.local.hour.to_s + 0.to_s + Time.local.minute.to_s).to_i
if time < 1200
message = "#{bold}#{orange}Have a good morning!#{reset}"
elsif time >= 1200
message = "#{bold}#{orange}Have a good afternoon!#{reset}"
end
elsif Time.local.minute >= 10
time = (Time.local.hour.to_s + Time.local.minute.to_s).to_i
if time < 1200
message = "#{bold}#{orange}Have a good morning!#{reset}"
elsif time >= 1200
message = "#{bold}#{orange}Have a good afternoon!#{reset}"
end
end
vars = {
"{temp_f}" => temp_f,
"{temp_c}" => temp_c,
@@ -104,7 +123,8 @@ module Wfetch
"{orange}" => orange,
"{bold}" => bold,
"{reset}" => reset,
"{icon}" => nil
"{icon}" => nil,
"{goodbye}" => message
}
File.each_line("/home/koffeejava/.local/share/Wfetch/disp.toml") do |line|