From 03af81b91d0b5570fb8fe2d33c16edd810637d2b Mon Sep 17 00:00:00 2001 From: Yaroslav Date: Sun, 21 Jun 2020 04:17:54 +0300 Subject: script for showing time in other timezones --- dotfiles/.local/bin/menutz | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 dotfiles/.local/bin/menutz (limited to 'dotfiles/.local/bin') diff --git a/dotfiles/.local/bin/menutz b/dotfiles/.local/bin/menutz new file mode 100755 index 0000000..eca7b47 --- /dev/null +++ b/dotfiles/.local/bin/menutz @@ -0,0 +1,12 @@ +#!/bin/sh + +# Source settings from .bemenurc +. ~/.config/bemenurc + +timezone=$(cd /usr/share/zoneinfo/posix && find * -type f -or -type l | sort | bemenu -p "Select output: " --tf="$BEMENU_TF" --tb="$BEMENU_NB" --fb="$BEMENU_NB" --fn="$BEMENU_FN" --nb="$BEMENU_NB" --nf="$BEMENU_NF" --hf="$BEMENU_HF" --hb="$BEMENU_HB") + +if [ -n "$timezone" ]; then + notify-send "🗺 Date and time in $timezone" "$(TZ=:$timezone date)" +else + notify-send "🗺 Date and time in your timezone" "$(TZ=:$timezone date)" +fi -- cgit v1.2.3