[Remind-Fans] Ways to Use Remind
Dianne Skoll
dianne at skoll.ca
Thu Feb 22 15:01:05 EST 2024
On Thu, 22 Feb 2024 14:03:24 -0500
Michael DeBusk via Remind-fans <remind-fans at lists.skoll.ca> wrote:
> A couple of days ago I started writing a bash script to put the
> current weather conditions into a notify-send popup and wanted a way
> to use different icons based on the conditions and whether or not it
> was day or night.
> ```
> BANNER %
> REM Sunrise: [sunrise()] Sunset: [sunset()]
> ```
Neat! Another option is to do some of the logic in Remind itself. For
example, if your icons are in separate directories "day" and "night",
your reminder file could look like this:
# File day-or-night.rem
BANNER %
IF now() < sunrise() || now() > sunset()
MSG night%
ELSE
MSG day%
ENDIF
Then your Bash script could look like this:
ICONDIR=`remind day-or-night.rem`
# ...
ICON=$ICONDIR/$CONDITIONS
Regards,
Dianne.
More information about the Remind-fans
mailing list