Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
82b3a4847d | ||
|
|
c5248c6209 | ||
|
|
d9984d97a6 |
@@ -1,5 +1,3 @@
|
|||||||
# test :)
|
|
||||||
|
|
||||||
require "http/client"
|
require "http/client"
|
||||||
require "json"
|
require "json"
|
||||||
require "toml"
|
require "toml"
|
||||||
@@ -7,7 +5,7 @@ require "./icon-list"
|
|||||||
require "option_parser"
|
require "option_parser"
|
||||||
|
|
||||||
module Wfetch
|
module Wfetch
|
||||||
VERSION = "1.1.0"
|
VERSION = "1.0.0"
|
||||||
orange = "\e[38;5;214m"
|
orange = "\e[38;5;214m"
|
||||||
red = "\e[0;31m"
|
red = "\e[0;31m"
|
||||||
bold = "\e[1m"
|
bold = "\e[1m"
|
||||||
@@ -35,8 +33,7 @@ module Wfetch
|
|||||||
test_config = true
|
test_config = true
|
||||||
}
|
}
|
||||||
parser.on("-v", "--version", "Shows the current version of wfetch") {
|
parser.on("-v", "--version", "Shows the current version of wfetch") {
|
||||||
puts "#{bold}#{orange}Wfetch 1.1.0 KoffeeJava 2026#{reset}"
|
puts "#{bold}#{orange}Wfetch 1.0.0 KoffeeJava 2026#{reset}"
|
||||||
puts "Made in Crystal by KoffeeJava with Love"
|
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
parser.on("-h", "--help", "Show this help") do
|
parser.on("-h", "--help", "Show this help") do
|
||||||
@@ -52,7 +49,7 @@ module Wfetch
|
|||||||
|
|
||||||
print "#{bold}#{orange}Wfetch KoffeeJava 2026#{reset}"
|
print "#{bold}#{orange}Wfetch KoffeeJava 2026#{reset}"
|
||||||
|
|
||||||
config = TOML.parse(File.read("config/config.toml")].expand(home: true)))
|
config = TOML.parse(File.read(Path["~/.local/share/Wfetch/config.toml"].expand(home: true)))
|
||||||
city = config["city"]
|
city = config["city"]
|
||||||
api_key = config["api"]
|
api_key = config["api"]
|
||||||
|
|
||||||
@@ -107,7 +104,7 @@ module Wfetch
|
|||||||
path_config = gets
|
path_config = gets
|
||||||
disp = TOML.parse(File.read(Path["#{path_config}"].expand(home: true)))
|
disp = TOML.parse(File.read(Path["#{path_config}"].expand(home: true)))
|
||||||
else
|
else
|
||||||
disp = TOML.parse(File.read())
|
disp = TOML.parse(File.read(Path["~/.local/share/Wfetch/disp.toml"].expand(home: true)))
|
||||||
end
|
end
|
||||||
|
|
||||||
repeat = 1
|
repeat = 1
|
||||||
|
|||||||
Reference in New Issue
Block a user