summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorSimon Rettberg2024-03-18 17:30:19 +0100
committerSimon Rettberg2024-03-18 17:30:19 +0100
commit001ccc69cbff3761bd099b44ca2cdffed1bca335 (patch)
tree656dc86e0864dbe966a4457a8c4e081bd7b9abe3 /core
parent[run-virt] dhcpd config: Remove fallback for entries if not known (diff)
downloadmltk-001ccc69cbff3761bd099b44ca2cdffed1bca335.tar.gz
mltk-001ccc69cbff3761bd099b44ca2cdffed1bca335.tar.xz
mltk-001ccc69cbff3761bd099b44ca2cdffed1bca335.zip
[kiosk-chromium] Poke idle-daemon some more to get accurate idle times
Diffstat (limited to 'core')
-rw-r--r--core/modules/kiosk-chromium/data/opt/openslx/scripts/kiosk-launch.d/00-chromium8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/modules/kiosk-chromium/data/opt/openslx/scripts/kiosk-launch.d/00-chromium b/core/modules/kiosk-chromium/data/opt/openslx/scripts/kiosk-launch.d/00-chromium
index 0c949044..8ae8a917 100644
--- a/core/modules/kiosk-chromium/data/opt/openslx/scripts/kiosk-launch.d/00-chromium
+++ b/core/modules/kiosk-chromium/data/opt/openslx/scripts/kiosk-launch.d/00-chromium
@@ -89,6 +89,8 @@ fi
if [ -n "$SLX_BROWSER_RELOAD_SECS" ] && [ "$SLX_BROWSER_RELOAD_SECS" -gt 0 ]; then
(
+ # Wake up to force refresh
+ idle-daemon --send 'get :0' &> /dev/null
wid=
while [ -z "$wid" ]; do
sleep 1
@@ -105,7 +107,8 @@ if [ -n "$SLX_BROWSER_RELOAD_SECS" ] && [ "$SLX_BROWSER_RELOAD_SECS" -gt 0 ]; th
fi
readonly wpid
activity=init
- last=
+ last="$(idle-daemon --send 'get :0' | grep -oP '(?<=idleSeconds=)[0-9]+')"
+ sleep 1
while true; do
if [ ! -d "/proc/$wpid" ]; then
echo "Process with PID $wpid stopped, exiting auto-reload loop."
@@ -122,6 +125,9 @@ if [ -n "$SLX_BROWSER_RELOAD_SECS" ] && [ "$SLX_BROWSER_RELOAD_SECS" -gt 0 ]; th
xdotool key Alt+Home
last="$current_idle"
sleep "$SLX_BROWSER_RELOAD_SECS"
+ # Wake up to force refresh
+ idle-daemon --send 'get :0' &> /dev/null
+ sleep 1
activity=init
continue
fi