diff options
author | Jon Lund Steffensen <jonlst@gmail.com> | 2014-12-28 19:26:29 -0500 |
---|---|---|
committer | Jon Lund Steffensen <jonlst@gmail.com> | 2014-12-28 19:26:29 -0500 |
commit | 59023d86f4275128751bcb84ecda5a630bf51857 (patch) | |
tree | ff9f17eba3bdfec0fac22332e1689a93b33209bb /redshift.1 | |
parent | README: Add flattr button at the end (diff) | |
parent | redshift.1: Add description of hooks in man page (diff) | |
download | redshift-ng-59023d86f4275128751bcb84ecda5a630bf51857.tar.gz redshift-ng-59023d86f4275128751bcb84ecda5a630bf51857.tar.bz2 redshift-ng-59023d86f4275128751bcb84ecda5a630bf51857.tar.xz |
Merge branch 'hooks-dir'
Diffstat (limited to 'redshift.1')
-rw-r--r-- | redshift.1 | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -148,6 +148,25 @@ location\-provider=manual lat=55.7 lon=12.6 .fi +.SH HOOKS +Executable files (e.g. scripts) placed in `~/.config/redshift/hooks' +will be run when a certain event happens. The first parameter to the +script indicates the event and further parameters may indicate +more details about the event. The event `period-changed' is indicated +when the period changes (`night', `daytime', `transition'). The second +parameter is the old period and the third is the new period. The event +is also signaled when Redshift starts up with the old period set to +`none'. + +A simple script to handle these events can be written like this: +.IP +.nf +#!/bin/sh +case \fB$1\fR in + \fBperiod-changed\fR) + exec notify-send "Redshift" "Period changed to \fB$3\fR" +esac +.fi .SH AUTHOR .B redshift was written by Jon Lund Steffensen <jonlst@gmail.com>. |