summaryrefslogtreecommitdiffstats
path: root/examples/sleepmode
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/sleepmode
parentreduce allocations in drm (diff)
downloadblueshift-a1042d6148c4502718f7e4725a0ef864c80201fc.tar.gz
blueshift-a1042d6148c4502718f7e4725a0ef864c80201fc.tar.bz2
blueshift-a1042d6148c4502718f7e4725a0ef864c80201fc.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/sleepmode')
-rw-r--r--examples/sleepmode8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/sleepmode b/examples/sleepmode
index 00ec3dd..8713b63 100644
--- a/examples/sleepmode
+++ b/examples/sleepmode
@@ -123,9 +123,9 @@ def periodically(year, month, day, hour, minute, second, weekday, fade):
# Flush settings to monitor.
if len(monitors) == 0:
- randr()
+ (drm if ttymode else randr)()
else:
- randr(monitors[m % len(monitors)])
+ (drm if ttymode else randr)(monitors[m % len(monitors)])
def reset():
@@ -144,7 +144,7 @@ def reset():
# Flush settings to monitor.
if len(monitors) == 0:
- randr()
+ (drm if ttymode else randr)()
else:
- randr(monitors[m % len(monitors)])
+ (drm if ttymode else randr)(monitors[m % len(monitors)])