aboutsummaryrefslogtreecommitdiff
path: root/dotfiles
diff options
context:
space:
mode:
authorYaroslav <contact@yaroslavps.com>2020-06-21 04:17:54 +0300
committerYaroslav <contact@yaroslavps.com>2020-06-21 04:17:54 +0300
commit03af81b91d0b5570fb8fe2d33c16edd810637d2b (patch)
treed81deecc110aa13369e19cc6c0efaa169e8765ca /dotfiles
parent7b8854b566447d85bb003d43e53e0ad83ba15a62 (diff)
downloadswayrice-03af81b91d0b5570fb8fe2d33c16edd810637d2b.tar.gz
swayrice-03af81b91d0b5570fb8fe2d33c16edd810637d2b.zip
script for showing time in other timezones
Diffstat (limited to 'dotfiles')
-rw-r--r--dotfiles/.config/sway/config1
-rwxr-xr-xdotfiles/.local/bin/menutz12
2 files changed, 13 insertions, 0 deletions
diff --git a/dotfiles/.config/sway/config b/dotfiles/.config/sway/config
index 1613f85..5504b6e 100644
--- a/dotfiles/.config/sway/config
+++ b/dotfiles/.config/sway/config
@@ -187,6 +187,7 @@ bindsym --to-code {
$mod+F2 exec menumako
$mod+F3 exec menudisplay
$mod+F4 exec menublk
+ $mod+F12 exec menutz
$mod+r exec kitty -e ranger
$mod+s exec "xway steam"
$mod+m exec $term -e ncmpcpp
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