diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-04-26 23:21:34 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-04-26 23:21:34 +0200 |
commit | a1ea9b3dd67a57ad918794d1f2af98f3c1747591 (patch) | |
tree | 91ececd3d29478c1dee0c6ad60753dc48d6383f6 /examples | |
parent | external (?) bug workaround (diff) | |
download | blueshift-a1ea9b3dd67a57ad918794d1f2af98f3c1747591.tar.gz blueshift-a1ea9b3dd67a57ad918794d1f2af98f3c1747591.tar.bz2 blueshift-a1ea9b3dd67a57ad918794d1f2af98f3c1747591.tar.xz |
add brightness to x-window-focus example
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/x-window-focus | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/examples/x-window-focus b/examples/x-window-focus index 81e75d9..5176645 100644 --- a/examples/x-window-focus +++ b/examples/x-window-focus @@ -36,9 +36,12 @@ monitors = [0, 1] gammas = [[1.16, 1.15, 1.11], [1.10, 1.16, 1.10]] -# The colour temperature for normal programs +# The colour temperature for normal applications standard_temperature = 3500 +# The brightness for normal applications +standard_brightness = 0.8 + # Acquire connection to X x_display = Xlib.display.Display() # Get root windows for each screen and list on most events @@ -157,14 +160,19 @@ def periodically(year, month, day, hour, minute, second, weekday, fade): for monitor in range(len(monitors)): start_over() temp = standard_temperature + bright = standard_brightness if window[0] in ('Dooble', 'claws-mail'): temp = 2000 + bright = 0.5 elif window[0] == 'inkscape': temp = 6500 + bright = 1.0 elif window[0].startswith('gimp-'): # continues with the version number temp = 6500 + bright = 1.0 + cie_brightness(bright) temperature(temp, lambda t : clip_whitepoint(divide_by_maximum(cmf_10deg(t)))) gamma(*gammas[monitor]) randr(monitors[monitor]) |