mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-02 19:31:10 +01:00
Weather: add new module
This commit is contained in:
@@ -1151,6 +1151,12 @@ static void parseOption(FFinstance* instance, FFdata* data, const char* key, con
|
||||
optionParseString(key, value, &instance->config.publicIP.outputFormat);
|
||||
else if(strcasecmp(key, "--public-ip-error") == 0)
|
||||
optionParseString(key, value, &instance->config.publicIP.errorFormat);
|
||||
else if(strcasecmp(key, "--weather-key") == 0)
|
||||
optionParseString(key, value, &instance->config.weather.key);
|
||||
else if(strcasecmp(key, "--weather-format") == 0)
|
||||
optionParseString(key, value, &instance->config.weather.outputFormat);
|
||||
else if(strcasecmp(key, "--weather-error") == 0)
|
||||
optionParseString(key, value, &instance->config.weather.errorFormat);
|
||||
else if(strcasecmp(key, "--player-key") == 0)
|
||||
optionParseString(key, value, &instance->config.player.key);
|
||||
else if(strcasecmp(key, "--player-format") == 0)
|
||||
@@ -1295,6 +1301,10 @@ static void parseOption(FFinstance* instance, FFdata* data, const char* key, con
|
||||
optionParseString(key, value, &instance->config.publicIpUrl);
|
||||
else if(strcasecmp(key, "--public-ip-timeout") == 0)
|
||||
instance->config.publicIpTimeout = optionParseUInt32(key, value);
|
||||
else if(strcasecmp(key, "--weather-output-format") == 0)
|
||||
optionParseString(key, value, &instance->config.weatherOutputFormat);
|
||||
else if(strcasecmp(key, "--weather-timeout") == 0)
|
||||
instance->config.weatherTimeout = optionParseUInt32(key, value);
|
||||
else if(strcasecmp(key, "--gl") == 0)
|
||||
{
|
||||
optionParseEnum(key, value, &instance->config.glType,
|
||||
@@ -1430,6 +1440,8 @@ static void parseStructureCommand(FFinstance* instance, FFdata* data, const char
|
||||
ffPrintLocalIp(instance);
|
||||
else if(strcasecmp(line, "publicip") == 0)
|
||||
ffPrintPublicIp(instance);
|
||||
else if(strcasecmp(line, "weather") == 0)
|
||||
ffPrintWeather(instance);
|
||||
else if(strcasecmp(line, "player") == 0)
|
||||
ffPrintPlayer(instance);
|
||||
else if(strcasecmp(line, "media") == 0 || strcasecmp(line, "song") == 0)
|
||||
|
||||
Reference in New Issue
Block a user