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

master
Miles Alan 5 years ago
parent 35a432d462
commit e84246021a
  1. 1
      scripts/core/sxmo_appmenu.sh
  2. 9
      scripts/core/sxmo_timezonechange.sh

@ -51,6 +51,7 @@ programchoicesinit() {
Modem Log ^ 0 ^ sxmo_modemlog.sh 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 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 Bar Toggle ^ 1 ^ key Alt+b
Change Timezone ^ 1 ^ sxmo_timezonechange.sh
Rotate ^ 1 ^ sxmo_rotate.sh Rotate ^ 1 ^ sxmo_rotate.sh
Upgrade Pkgs ^ 0 ^ st -e sxmo_upgrade.sh Upgrade Pkgs ^ 0 ^ st -e sxmo_upgrade.sh
")" && WINNAME=Config && return ")" && WINNAME=Config && return

@ -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'
Loading…
Cancel
Save