From 1cc93937e58a67e1a196958d038b0052b6f3edc3 Mon Sep 17 00:00:00 2001 From: Erik Johnson Date: Wed, 22 Jun 2016 15:21:44 -0500 Subject: [PATCH 1/3] Change default weather icon for thunderstorm I had added this to be able to use a different icon for thunderstorms, which were at the time not even being detected as a weather condition and were just falling back to the default (i.e. no colorization nor icon). However, the only thunder/lightning unicode icon that is widely available is too tall, leading to the entire module's text being vertically-aligned on a different plane from the rest of the modules in the status bar. This commit changes the default icon to the same one used for "Rainy" conditions, while preserving it as a distinct weather type so that others can still use their own icon if they so choose. --- i3pystatus/weather/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i3pystatus/weather/__init__.py b/i3pystatus/weather/__init__.py index 8ac9eb8..eaa972e 100644 --- a/i3pystatus/weather/__init__.py +++ b/i3pystatus/weather/__init__.py @@ -88,7 +88,7 @@ class Weather(IntervalModule): 'Cloudy': (u'\u2601', '#f8f8ff'), 'Partly Cloudy': (u'\u2601', '#f8f8ff'), # \u26c5 is not in many fonts 'Rainy': (u'\u26c8', '#cbd2c0'), - 'Thunderstorm': (u'\u03de', '#cbd2c0'), + 'Thunderstorm': (u'\u26c8', '#cbd2c0'), 'Sunny': (u'\u2600', '#ffff00'), 'Snow': (u'\u2603', '#ffffff'), 'default': ('', None), From 7298b7782be1f5b50924a6af802d2b04dee4179e Mon Sep 17 00:00:00 2001 From: Erik Johnson Date: Thu, 23 Jun 2016 11:30:18 -0500 Subject: [PATCH 2/3] Add "Fog" weather condition --- i3pystatus/weather/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/i3pystatus/weather/__init__.py b/i3pystatus/weather/__init__.py index eaa972e..7b7e935 100644 --- a/i3pystatus/weather/__init__.py +++ b/i3pystatus/weather/__init__.py @@ -85,6 +85,7 @@ class Weather(IntervalModule): colorize = False color_icons = { 'Fair': (u'\u263c', '#ffcc00'), + 'Fog': (u'', '#949494'), 'Cloudy': (u'\u2601', '#f8f8ff'), 'Partly Cloudy': (u'\u2601', '#f8f8ff'), # \u26c5 is not in many fonts 'Rainy': (u'\u26c8', '#cbd2c0'), @@ -131,6 +132,8 @@ class Weather(IntervalModule): condition = 'Sunny' elif 'clear' in condition_lc or 'fair' in condition_lc: condition = 'Fair' + elif 'fog' in condition_lc: + condition = 'Fog' return self.color_icons['default'] \ if condition not in self.color_icons \ From 495b736038fda745c434d9b62ac6e95a162780b6 Mon Sep 17 00:00:00 2001 From: Erik Johnson Date: Thu, 23 Jun 2016 11:31:22 -0500 Subject: [PATCH 3/3] Better thunderstorm icon --- i3pystatus/weather/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i3pystatus/weather/__init__.py b/i3pystatus/weather/__init__.py index 7b7e935..a82ff33 100644 --- a/i3pystatus/weather/__init__.py +++ b/i3pystatus/weather/__init__.py @@ -89,7 +89,7 @@ class Weather(IntervalModule): 'Cloudy': (u'\u2601', '#f8f8ff'), 'Partly Cloudy': (u'\u2601', '#f8f8ff'), # \u26c5 is not in many fonts 'Rainy': (u'\u26c8', '#cbd2c0'), - 'Thunderstorm': (u'\u26c8', '#cbd2c0'), + 'Thunderstorm': (u'\u26a1', '#cbd2c0'), 'Sunny': (u'\u2600', '#ffff00'), 'Snow': (u'\u2603', '#ffffff'), 'default': ('', None),