mirror of
https://github.com/basecamp/omarchy.git
synced 2025-07-27 12:19:24 +00:00
5
bin/omarchy-cmd-tzupdate
Executable file
5
bin/omarchy-cmd-tzupdate
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
sudo tzupdate
|
||||||
|
new_timezone=$(timedatectl show -p Timezone --value)
|
||||||
|
notify-send "Timezone has been set to $new_timezone"
|
@ -50,7 +50,8 @@
|
|||||||
"clock": {
|
"clock": {
|
||||||
"format": "{:%A %H:%M}",
|
"format": "{:%A %H:%M}",
|
||||||
"format-alt": "{:%d %B W%V %Y}",
|
"format-alt": "{:%d %B W%V %Y}",
|
||||||
"tooltip": false
|
"tooltip": false,
|
||||||
|
"on-click-right": "omarchy-cmd-tzupdate"
|
||||||
},
|
},
|
||||||
"network": {
|
"network": {
|
||||||
"format-icons": ["","","","",""],
|
"format-icons": ["","","","",""],
|
||||||
|
9
install/config/timezones.sh
Normal file
9
install/config/timezones.sh
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [[ ! -f /etc/sudoers.d/omarchy-tzupdate ]]; then
|
||||||
|
yay -S --noconfirm --needed tzupdate
|
||||||
|
sudo tee /etc/sudoers.d/omarchy-tzupdate >/dev/null <<EOF
|
||||||
|
%wheel ALL=(root) NOPASSWD: /usr/bin/tzupdate, /usr/bin/timedatectl
|
||||||
|
EOF
|
||||||
|
sudo chmod 0440 /etc/sudoers.d/omarchy-tzupdate
|
||||||
|
fi
|
5
migrations/1753495989.sh
Normal file
5
migrations/1753495989.sh
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
echo "Allow updating of timezone by right-clicking on the clock (or running omarchy-cmd-tzupdate)"
|
||||||
|
if [[ ! -f /etc/sudoers.d/omarchy-tzupdate ]]; then
|
||||||
|
bash ~/.local/share/omarchy/install/config/timezones.sh
|
||||||
|
omarchy-refresh-waybar
|
||||||
|
fi
|
Reference in New Issue
Block a user