Add script to allow user to change timezone from the config menu

This commit is contained in:
Miles Alan 2020-05-27 16:08:57 -05:00
parent 35a432d462
commit e84246021a
2 changed files with 10 additions and 0 deletions

View file

@ -51,6 +51,7 @@ programchoicesinit() {
Modem Log ^ 0 ^ sxmo_modemlog.sh
Flash $(cat /sys/class/leds/white:flash/brightness | grep -E '^0$' > /dev/null && echo -n "Off → On" || echo -n "On → Off") ^ 1 ^ sxmo_flashtoggle.sh
Bar Toggle ^ 1 ^ key Alt+b
Change Timezone ^ 1 ^ sxmo_timezonechange.sh
Rotate ^ 1 ^ sxmo_rotate.sh
Upgrade Pkgs ^ 0 ^ st -e sxmo_upgrade.sh
")" && WINNAME=Config && return

View file

@ -0,0 +1,9 @@
#!/usr/bin/env sh
T="$(
find /usr/share/zoneinfo -type f |
sed 's#^/usr/share/zoneinfo/##g' |
sort |
sxmo_dmenu_with_kb.sh -p Timezone -c -l 10 -fn Terminus-20 -i
)"
st -e sh -c 'sudo setup-timezone -z '$T' && echo 1 > /tmp/sxmo_bar && echo Timezone changed ok && read'