From: Siraaj Khandkar Date: Fri, 6 Nov 2020 14:57:16 +0000 (-0500) Subject: Add time-in-zones script and notification key bindings X-Git-Url: https://git.xandkar.net/?a=commitdiff_plain;h=d1ea24987962658ef6442d5be47558dfa95beac5;p=khome.git Add time-in-zones script and notification key bindings --- diff --git a/home/.xbindkeysrc b/home/.xbindkeysrc index ac751f3..ebf8c14 100644 --- a/home/.xbindkeysrc +++ b/home/.xbindkeysrc @@ -163,3 +163,6 @@ # Status "notify_status" Mod4 + s + +"notify_time-in-zones" + Mod4 + z diff --git a/home/bin/notify_time-in-zones b/home/bin/notify_time-in-zones new file mode 100755 index 0000000..0d73edc --- /dev/null +++ b/home/bin/notify_time-in-zones @@ -0,0 +1,3 @@ +#! /bin/sh + +notify-send "$(time-in-zones)" -u low diff --git a/home/bin/time-in-zones b/home/bin/time-in-zones new file mode 100755 index 0000000..6428f8d --- /dev/null +++ b/home/bin/time-in-zones @@ -0,0 +1,12 @@ +#! /bin/bash + +set -e + +ZONES='US/Eastern Europe/Rome Poland NZ' + +for tz in $ZONES +do + printf '%s ' "$tz" + TZ="$tz" date '+%a %b %d %H:%M:%S' +done \ +| column -t