From 048c0870d3fead86db41891abe82283b9f16651d Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 21 Mar 2014 08:55:55 +0100 Subject: demo _ICC_PROFILE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 2 +- TODO | 1 - examples/comprehensive | 2 +- examples/icc-profile-atoms | 28 ++++++++++++++++++++++++++++ 4 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 examples/icc-profile-atoms diff --git a/Makefile b/Makefile index bbd2e16..2969a16 100644 --- a/Makefile +++ b/Makefile @@ -69,7 +69,7 @@ CBINDINGS = $(foreach B,$(SERVER_BINDINGS),blueshift_$(B).so) # Configuration script example files EXAMPLES = comprehensive sleepmode crtc-detection crtc-searching logarithmic \ xmobar xpybar stored-settings current-settings xmonad threaded \ - backlight darkroom textconf textconf.conf modes weather + backlight darkroom textconf textconf.conf modes weather icc-profile-atoms # Build rules diff --git a/TODO b/TODO index f84b8b9..66f7aad 100644 --- a/TODO +++ b/TODO @@ -3,7 +3,6 @@ High priority: Add models for calculating fade and refresh rate parameters Medium priority: - Demo _ICC_PROFILE Demo functionise Low priority: diff --git a/examples/comprehensive b/examples/comprehensive index 1004608..e701c12 100644 --- a/examples/comprehensive +++ b/examples/comprehensive @@ -3,7 +3,7 @@ # This example covers most of what Blueshift offers. For a complete # coverage of Blueshift complement this example with: # backlight, crtc-detection, crtc-searching, logarithmic, -# stored-settings, modes, textconf +# stored-settings, modes, textconf, icc-profile-atoms # However the are features that are only covered by the info manual: # Methods for calculating correlated colour temperature diff --git a/examples/icc-profile-atoms b/examples/icc-profile-atoms new file mode 100644 index 0000000..a5f5a13 --- /dev/null +++ b/examples/icc-profile-atoms @@ -0,0 +1,28 @@ +# -*- python -*- + +# This example demonstrates how to use read and +# use the _ICC_PROFILE(_n) atoms for X screens. + + +# Copyright © 2014 Mattias Andrée (maandree@member.fsf.org) +# +# Permission is granted to copy, distribute and/or modify this document +# under the terms of the GNU Free Documentation License, Version 1.3 +# or any later version published by the Free Software Foundation; +# with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. +# You should have received a copy of the GNU General Public License +# along with this software package. If not, see . + + +for screen, crtc, profile in get_current_icc(): + start_over() + profile() + randr(crtc, screen = screen) + +# Or equivalently: +# +#for screen, crtc, profile in get_current_icc_raw(): +# start_over() +# parse_icc(profile)() +# randr(crtc, screen = screen) + -- cgit v1.2.3-70-g09d2