xsecurelock  1.7.0
XSecureLock is an X11 screen lock utility.
Functions | Variables
until_nonidle.c File Reference
#include <X11/X.h>
#include <X11/Xlib.h>
#include <signal.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <sys/time.h>
#include <time.h>
#include <unistd.h>
#include "../env_settings.h"
#include "../logging.h"
#include "../wait_pgrp.h"

Functions

static void HandleSIGTERM (int signo)
 
uint64_t GetIdleTimeForSingleTimer (Display *display, Window w, const char *timer)
 
uint64_t GetIdleTime (Display *display, Window w, const char *timers)
 
int main (int argc, char **argv)
 

Variables

pid_t childpid = 0
 Screen dimmer helper. More...
 

Function Documentation

◆ GetIdleTime()

uint64_t GetIdleTime ( Display *  display,
Window  w,
const char *  timers 
)

◆ GetIdleTimeForSingleTimer()

uint64_t GetIdleTimeForSingleTimer ( Display *  display,
Window  w,
const char *  timer 
)

◆ HandleSIGTERM()

static void HandleSIGTERM ( int  signo)
static

◆ main()

int main ( int  argc,
char **  argv 
)

Variable Documentation

◆ childpid

pid_t childpid = 0

Screen dimmer helper.

A simple tool to run a tool to dim the screen, and - depending on which comes first:

  • On leaving idle status, kill the dimming tool and exit with success status.
  • On dimming tool exiting, exit with error status.

Sample usage: until_nonidle dim-screen || xsecurelock