Make setting timezone an explicit act

Since we can't always rely on geo guessing everywhere and it is slow
This commit is contained in:
David Heinemeier Hansson
2025-10-17 12:50:02 +03:00
parent a874f6f8a6
commit 1a1c736936
5 changed files with 11 additions and 10 deletions

View File

@@ -1,8 +0,0 @@
#!/bin/bash
notify-send " Updating time and timezone..."
sudo systemctl restart systemd-timesyncd
sudo tzupdate
new_timezone=$(timedatectl show -p Timezone --value)
omarchy-restart-waybar
notify-send " Time updated and timezone set to $new_timezone"

View File

@@ -395,7 +395,7 @@ show_update_menu() {
*Process*) show_update_process_menu ;;
*Hardware*) show_update_hardware_menu ;;
*Firmware*) present_terminal omarchy-update-firmware ;;
*Timezone*) omarchy-cmd-tzupdate ;;
*Timezone*) present_terminal omarchy-tz-select ;;
*Password*) show_update_password_menu ;;
*) show_main_menu ;;
esac

6
bin/omarchy-tz-select Executable file
View File

@@ -0,0 +1,6 @@
#!/bin/bash
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"
omarchy-restart-waybar

View File

@@ -61,7 +61,7 @@
"format": "{:L%A %H:%M}",
"format-alt": "{:L%d %B W%V %Y}",
"tooltip": false,
"on-click-right": "omarchy-cmd-tzupdate"
"on-click-right": "omarchy-launch-floating-terminal-with-presentation omarchy-tz-select"
},
"network": {
"format-icons": ["󰤯", "󰤟", "󰤢", "󰤥", "󰤨"],

3
migrations/1760693222.sh Normal file
View File

@@ -0,0 +1,3 @@
echo "Use explicit timezone selector when right-clicking on clock"
sed -i 's/omarchy-cmd-tzupdate/omarchy-launch-floating-terminal-with-presentation omarchy-tz-select/g' ~/.config/waybar/config.jsonc