summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2023-08-22 15:41:43 +0300
committerThomas Voss <mail@thomasvoss.com> 2023-08-22 15:41:43 +0300
commit08fd877c33d3f5d0c387a15e01a8af565ba3a33d (patch)
tree0c4dac2f3ae811479a862cb1a8c5fcb06b1d6b63
parent9f6244fc8ea19cede03daa1760b0f2ec13ae36f5 (diff)
stz: Add script to change timezone
-rwxr-xr-x.local/sbin/stz12
1 files changed, 12 insertions, 0 deletions
diff --git a/.local/sbin/stz b/.local/sbin/stz
new file mode 100755
index 0000000..9091d29
--- /dev/null
+++ b/.local/sbin/stz
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+set -e
+
+choice="`timedatectl list-timezones \
+ | grep './.' \
+ | wofi -dMfuzzy -Oalphabetical`"
+
+[ -n "$choice" ] \
+ && sudo timedatectl set-timezone "$choice" \
+ && notify-send -a "${0##*/}" -u normal 'Timezone changed' \
+ "The system timezone was changed to ‘$choice’."