Updated name in wf-tool and updated shard.yml to make compileing easier
This commit is contained in:
@@ -7,6 +7,9 @@ authors:
|
|||||||
targets:
|
targets:
|
||||||
wfetch:
|
wfetch:
|
||||||
main: src/wfetch.cr
|
main: src/wfetch.cr
|
||||||
|
|
||||||
|
wf-tool:
|
||||||
|
main: src/wf-tool.cr
|
||||||
|
|
||||||
crystal: '>= 1.19.1'
|
crystal: '>= 1.19.1'
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ sudo_user = ENV["SUDO_USER"]?
|
|||||||
home = "/home/#{sudo_user}"
|
home = "/home/#{sudo_user}"
|
||||||
|
|
||||||
OptionParser.parse do |parser|
|
OptionParser.parse do |parser|
|
||||||
parser.banner = "Usage: installer [arguments]"
|
parser.banner = "Usage: wf-tool [arguments]"
|
||||||
parser.on("-i", "--install-only", "Only instals wfetch; Does not run setup") {
|
parser.on("-i", "--install-only", "Only instals wfetch; Does not run setup") {
|
||||||
if LibC.getuid != 0
|
if LibC.getuid != 0
|
||||||
puts "#{red}#{bold}You must be in root to install wfetch!#{reset}"
|
puts "#{red}#{bold}You must be in root to install wfetch!#{reset}"
|
||||||
@@ -90,5 +90,5 @@ OptionParser.parse do |parser|
|
|||||||
end
|
end
|
||||||
|
|
||||||
if ARGV.empty?
|
if ARGV.empty?
|
||||||
puts "Run installer -h"
|
puts "Run wf-tool -h"
|
||||||
end
|
end
|
||||||
@@ -84,17 +84,17 @@ module Wfetch
|
|||||||
if debug == true
|
if debug == true
|
||||||
disp = TOML.parse("
|
disp = TOML.parse("
|
||||||
1 = \"{icon}\"
|
1 = \"{icon}\"
|
||||||
2 = \"Live Temperature: {temp_f}°F\"
|
2 = \"Live Temperature: {temp_f}°F\"
|
||||||
3 = \"Live Temperature: {temp_c}°C\"
|
3 = \"Live Temperature: {temp_c}°C\"
|
||||||
4 = \"Feels like: {feels_like_f}°F\"
|
4 = \"Feels like: {feels_like_f}°F\"
|
||||||
5 = \"Feels like: {feels_like_c}°C\"
|
5 = \"Feels like: {feels_like_c}°C\"
|
||||||
6 = \"Wind Speed: {wind_mph} MPH\"
|
6 = \"Wind Speed: {wind_mph} MPH\"
|
||||||
7 = \"Wind Speed: {wind_kph} KPH\"
|
7 = \"Wind Speed: {wind_kph} KPH\"
|
||||||
8 = \"Humidity: {humidity}%\"
|
8 = \"Humidity: {humidity}%\"
|
||||||
9 = \"Pressure: {pressure_in} IN\"
|
9 = \"Pressure: {pressure_in} IN\"
|
||||||
10 = \"Pressure: {pressure_mb} MB\"
|
10 = \"Pressure: {pressure_mb} MB\"
|
||||||
11 = \"Description: {orange}{bold}{description}{reset}\"
|
11 = \"Description: {orange}{bold}{description}{reset}\"
|
||||||
12 = \"{goodbye}\"
|
12 = \"{goodbye}\"
|
||||||
")
|
")
|
||||||
else
|
else
|
||||||
disp = TOML.parse(File.read(Path["~/.local/share/Wfetch/disp.toml"].expand(home: true)))
|
disp = TOML.parse(File.read(Path["~/.local/share/Wfetch/disp.toml"].expand(home: true)))
|
||||||
@@ -110,7 +110,6 @@ module Wfetch
|
|||||||
elsif time >= 1200
|
elsif time >= 1200
|
||||||
message = "#{bold}#{orange}Have a good afternoon!#{reset}"
|
message = "#{bold}#{orange}Have a good afternoon!#{reset}"
|
||||||
end
|
end
|
||||||
|
|
||||||
elsif Time.local.minute >= 10
|
elsif Time.local.minute >= 10
|
||||||
time = (Time.local.hour.to_s + Time.local.minute.to_s).to_i
|
time = (Time.local.hour.to_s + Time.local.minute.to_s).to_i
|
||||||
if time < 1200
|
if time < 1200
|
||||||
|
|||||||
Reference in New Issue
Block a user