From 24c87751ea37c948565d40cb84d7726466b0c4b0 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 13 Mar 2014 23:31:48 +0100 Subject: ttymode variable + document drm support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/__main__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/__main__.py') diff --git a/src/__main__.py b/src/__main__.py index e894221..39e880f 100755 --- a/src/__main__.py +++ b/src/__main__.py @@ -89,7 +89,12 @@ wait_period = 60 :float The number of seconds to wait before invoking `periodically` again ''' -monitor_controller = lambda : randr() +ttymode = not (('DISPLAY' in os.environ) and (':' in os.environ['DISPLAY'])) +''' +:bool Whether blueshift is running in a TTY, determined by the DISPLAY environment variable +''' + +monitor_controller = (lambda : drm()) if ttymode else (lambda : randr()) ''' :()→void Function used by Blueshift on exit to apply reset colour curves, if using preimplemented `reset` ''' -- cgit v1.2.3-70-g09d2