Skip to content

Commit

Permalink
Pass units to launch action. Addresses #120.
Browse files Browse the repository at this point in the history
  • Loading branch information
kgilmer committed Jun 11, 2021
1 parent 56adc2f commit 867ad81
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -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 <[email protected]> Thu, 10 Jun 2021 21:49:22 -0700

regolith-i3xrocks-config (3.6.4-1) bionic; urgency=medium

[ Ken Gilmer ]
Expand Down
3 changes: 2 additions & 1 deletion scripts/weather
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -29,6 +30,6 @@ fi
echo "<span font_desc=\"${VALUE_FONT}\" color=\"${VALUE_COLOR}\">${WEATHER}</span>"

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

0 comments on commit 867ad81

Please sign in to comment.