SinAc

Aus Ethersex_Wiki
Wechseln zu: Navigation, Suche

Sinac

Sinac ( simple inactive ) is an little tool to monitor the inactive time of you Xsession. So you can easily implement your own autolock feature, e.g with slock.

OPTIONS

  • -p: print out the actual inactivity in seconds
  • -w <seconds>: wait until the inactivity timer has reached an specific value and the exit if watching is enabled (see SIGNAL for details on toggle watching )

SIGNAL

  • SIGUSR1: Enables watching the inactivity timer.
  • SIGUSR2: Disables watching the inactivity timer. When watching is disabled sinac won't exit, even when the inactivity timer has reached the specified value.

If watching is enabled or disabled you can see in the process list. ("en" for enabled and "di" for disabled )

An simple autolocker would be:

while true; do sinac -w 300 && slock; done &

You can download the source from here, build instructions are located in the source file.