jD91mZM2/xidlehook

Second timer doesn't seem to be executing

Closed this issue · 4 comments

Hey I am trying to run the following script on boot:

#!/bin/bash

# Disable defaults
# https://wiki.archlinux.org/index.php/Display_Power_Management_Signaling
# https://www.linuxquestions.org/questions/arch-29/screen-goes-blank-after-ten-minutes-in-lxde-how-to-change-this-769000/
xset s off -dpms

# Run xidlehook
xidlehook \
    --not-when-fullscreen --not-when-audio \
    --timer normal 600 '~/.utility/lock' '' \
    --timer normal 300 'systemctl suspend' ''

The second --timer (system suspend) never seems to execute, am I correct in thinking that the second timer starts after the first one is executed? Or does it need to be more like 600 and 900 instead of 600 then 300?

Cheers.

It's relative, seems like you did it correctly. So 300 would mean 300 seconds after it locks.

Have you tried without --not-when-fullscreen? I'm thinking maybe your lockscreen counts as a fullscreen application or something...

Try changing the lock timer to be primary instead of normal.

@thetarkus changing to primary did indeed fix this, may I ask what the issue was?

Oh, the question was why using the socket didn't trigger the timer? Yeah the socket triggers the timer marked as primary, so if no timer is the primary timer, nothing happens.