jD91mZM2 / xidlehook

GitLab: https://gitlab.com/jD91mZM2/xidlehook
MIT License
387 stars 33 forks source link

Second timer doesn't seem to be executing #12

Closed chopfitzroy closed 5 years ago

chopfitzroy commented 5 years ago

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.

jD91mZM2 commented 5 years ago

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...

michaelmob commented 5 years ago

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

chopfitzroy commented 5 years ago

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

jD91mZM2 commented 5 years ago

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.