Files
basementhud/overlay/home/user/.xinitrc
Dustin C. Hatch 878f733025 Set GUI time zone from geolocation
The wonderful *ipapi.co* service can help identify the time zone of a
device based on the geolocation information for its IP address.  We can
use this to set the `TZ` environment variable in the user session, which
Firefox will respect.  This has the effect of showing the correct time
in e.g. Grafana dashboards, without hard-coding the time zone in the
rootfs image.
2022-04-06 18:40:58 -05:00

12 lines
201 B
Bash

#!/bin/sh
xset s off
xset -dpms
TZ="$(curl https://ipapi.co/timezone)"
export TZ
systemctl --user import-environment DISPLAY TZ
systemctl --user start firefox-marionette.socket firefox
exec openbox