summaryrefslogtreecommitdiffstats
path: root/examples/current-settings
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-03-14 03:06:20 +0100
committerMattias Andrée <maandree@operamail.com>2014-03-14 03:08:02 +0100
commit581dbd784a5f6bdd1b064e44e27066ce687f5dd8 (patch)
tree47ea9153c1079ea6abe53b043451ab2efba6cd6b /examples/current-settings
parentreduce allocations in drm (diff)
downloadblueshift-581dbd784a5f6bdd1b064e44e27066ce687f5dd8.tar.gz
blueshift-581dbd784a5f6bdd1b064e44e27066ce687f5dd8.tar.bz2
blueshift-581dbd784a5f6bdd1b064e44e27066ce687f5dd8.tar.xz
add ttymode support for all examples missing it and uses randr or vidmode, except the xmonad example becuase xmonad does not run in tty1.10
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'examples/current-settings')
-rw-r--r--examples/current-settings4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/current-settings b/examples/current-settings
index 8c8afe8..62d5e7d 100644
--- a/examples/current-settings
+++ b/examples/current-settings
@@ -15,7 +15,7 @@ temperature_to = int(parser.opts['--temperature'][0])
# Get current colour curves
-randr_get(0)()
+(drm_get if ttymode else randr_get)(0)()
r_, g_, b_ = r_curve[:], g_curve[:], b_curve[:]
start_over()
@@ -41,7 +41,7 @@ def adjust(alpha):
ccc = [(out, list(map(f, zip(old, new)))) for out, (old, new) in ccc]
for out, curve in ccc:
out[:] = curve
- randr(0)
+ (drm if ttymode else randr)(0)
# Perform transition
if divergence and not panicgate: