From 867ad81dadaed1105f3e03cef6b6138a80cdab7b Mon Sep 17 00:00:00 2001 From: Ken Gilmer Date: Thu, 10 Jun 2021 21:49:13 -0700 Subject: [PATCH] Pass units to launch action. Addresses https://github.com/regolith-linux/regolith-i3xrocks-config/issues/120. --- debian/changelog | 7 +++++++ scripts/weather | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 72f449a..6f7e8ff 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +regolith-i3xrocks-config (3.6.5-1) bionic; urgency=medium + + [ Ken Gilmer ] + * Pass units to launch action. Addresses https://github.com/regolith-linux/regolith-i3xrocks-config/issues/120. + + -- Regolith Linux Thu, 10 Jun 2021 21:49:22 -0700 + regolith-i3xrocks-config (3.6.4-1) bionic; urgency=medium [ Ken Gilmer ] diff --git a/scripts/weather b/scripts/weather index d08e660..78f7c12 100755 --- a/scripts/weather +++ b/scripts/weather @@ -14,6 +14,7 @@ VALUE_WEATHER_FORMAT="?format=${VALUE_WEATHER_FORMAT}" # We don't supply a default here because wttr.in is "smart" enough to choose for us WEATHER_UNIT=${weather_unit:-$(xrescat i3xrocks.weather.units "")} if [ -n "${WEATHER_UNIT}" ]; then + ACTION_WEATHER_UNIT="?${WEATHER_UNIT}" WEATHER_UNIT="&${WEATHER_UNIT}" fi @@ -29,6 +30,6 @@ fi echo "${WEATHER}" if [ ! "x${BUTTON}" == "x" ]; then - ACTION=$(xrescat i3xrocks.action.weather "xdg-open https://wttr.in/${VALUE_WEATHER_LOCATION}") + ACTION=$(xrescat i3xrocks.action.weather "xdg-open https://wttr.in/${VALUE_WEATHER_LOCATION}${ACTION_WEATHER_UNIT}") /usr/bin/i3-msg -q exec "$ACTION" fi