From d1ea24987962658ef6442d5be47558dfa95beac5 Mon Sep 17 00:00:00 2001 From: Siraaj Khandkar Date: Fri, 6 Nov 2020 09:57:16 -0500 Subject: [PATCH] Add time-in-zones script and notification key bindings --- home/.xbindkeysrc | 3 +++ home/bin/notify_time-in-zones | 3 +++ home/bin/time-in-zones | 12 ++++++++++++ 3 files changed, 18 insertions(+) create mode 100755 home/bin/notify_time-in-zones create mode 100755 home/bin/time-in-zones 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 -- 2.20.1