diff --git a/bin/omarchy-menu-timezone b/bin/omarchy-menu-timezone new file mode 100755 index 00000000..52d55635 --- /dev/null +++ b/bin/omarchy-menu-timezone @@ -0,0 +1,10 @@ +#!/bin/bash + +# omarchy:summary=Select and set the system timezone +# omarchy:group=menu +# omarchy:name=timezone + +timezone=$(timedatectl list-timezones | omarchy-menu-select "Set timezone" -- --width 520 --maxheight 520) || exit 1 +sudo timedatectl set-timezone "$timezone" +omarchy-shell -q Clock refresh +omarchy-notification-send "Timezone is now set to $timezone" diff --git a/bin/omarchy-tz-select b/bin/omarchy-tz-select deleted file mode 100755 index 6c8ffe49..00000000 --- a/bin/omarchy-tz-select +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -# omarchy:summary=Select and set the system timezone -# omarchy:requires-sudo=true - -timezone=$(timedatectl list-timezones | gum filter --height 20 --header "Set timezone") || exit 1 -sudo timedatectl set-timezone "$timezone" -echo "Timezone is now set to $timezone" diff --git a/default/omarchy/omarchy-menu.jsonc b/default/omarchy/omarchy-menu.jsonc index 224ff314..5a07e8f3 100644 --- a/default/omarchy/omarchy-menu.jsonc +++ b/default/omarchy/omarchy-menu.jsonc @@ -286,7 +286,7 @@ "update.hardware": {"icon":"󰇅","label":"Hardware","keywords":"restart audio wifi bluetooth trackpad"}, "update.firmware": {"icon":"","label":"Firmware","keywords":"fwupd","action":"omarchy-launch-floating-terminal-with-presentation omarchy-update-firmware"}, "update.password": {"icon":"","label":"Password","keywords":"drive user"}, - "update.timezone": {"icon":"","label":"Timezone","keywords":"time zone","action":"omarchy-launch-floating-terminal-with-presentation omarchy-tz-select"}, + "update.timezone": {"icon":"","label":"Timezone","keywords":"time zone","action":"omarchy-menu-timezone"}, "update.time": {"icon":"","label":"Time","keywords":"clock ntp","action":"omarchy-launch-floating-terminal-with-presentation omarchy-update-time"}, "update.channel.stable": {"icon":"🟢","label":"Stable","action":"omarchy-launch-floating-terminal-with-presentation 'omarchy-channel-set stable'"}, "update.channel.rc": {"icon":"🟡","label":"RC","keywords":"release candidate","action":"omarchy-launch-floating-terminal-with-presentation 'omarchy-channel-set rc'"}, diff --git a/install/config/timezones.sh b/install/config/timezones.sh index 24e96a0f..1dbda987 100644 --- a/install/config/timezones.sh +++ b/install/config/timezones.sh @@ -1,5 +1,5 @@ -# Ensure timezone can be updated without needing to sudo +# Ensure timezone can be updated without a password prompt sudo tee /etc/sudoers.d/omarchy-tzupdate >/dev/null </dev/null <