summaryrefslogtreecommitdiff
path: root/.local/sbin/chtz
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2023-11-18 20:21:50 +0100
committerThomas Voss <mail@thomasvoss.com> 2023-11-18 20:21:50 +0100
commitfd2c508cde1393cbaf4d25abdf9eaebbe5f73895 (patch)
treedbb46663dc495da2ffdd5d7da66c2b6c38de5eb4 /.local/sbin/chtz
parentf8f144c9810fd6f16f843de4297cc20498a11291 (diff)
bin/sbin: Use the new ‘notify’ API
Diffstat (limited to '.local/sbin/chtz')
-rwxr-xr-x.local/sbin/chtz10
1 files changed, 6 insertions, 4 deletions
diff --git a/.local/sbin/chtz b/.local/sbin/chtz
index f6a6444..2a02e79 100755
--- a/.local/sbin/chtz
+++ b/.local/sbin/chtz
@@ -2,7 +2,9 @@
set -e
-choice="`timedatectl list-timezones | grep './.' | osel`" \
- && sudo timedatectl set-timezone "$choice" \
- && notify "${0##*/}" timezone 'Timezone Changed' \
- "The system timezone was changed to ‘$choice’"
+export NOTIFY_LONG=timezone
+export NOTIFY_SHORT="${0##*/}"
+
+choice="$(timedatectl list-timezones | grep './.' | osel)" \
+&& sudo timedatectl set-timezone "$choice" \
+&& notify 'Timezone Changed' "The system timezone was changed to ‘$choice’"