summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-03-20 01:10:13 +0100
committerMattias Andrée <maandree@operamail.com>2014-03-20 01:10:13 +0100
commit9ee9c0db896a4a722a1c5406c8bf1a6480f94e0a (patch)
tree523a5b4f85296c00b78e105c8fb971dde203cc8d /examples
parentmissed to rm command before the filename when cython fails (diff)
downloadblueshift-9ee9c0db896a4a722a1c5406c8bf1a6480f94e0a.tar.gz
blueshift-9ee9c0db896a4a722a1c5406c8bf1a6480f94e0a.tar.bz2
blueshift-9ee9c0db896a4a722a1c5406c8bf1a6480f94e0a.tar.xz
fix textconf
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/textconf7
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/textconf b/examples/textconf
index c02b9ab..e0e723b 100644
--- a/examples/textconf
+++ b/examples/textconf
@@ -50,7 +50,7 @@ def remove_comment(text, spawn_aware):
if not spawn_aware:
return text[:text.replace('#', ';').find(';')]
buf, cmd, stack = '', 0, 0
- for c in buf:
+ for c in text:
if cmd > 0:
if c == '(':
stack += 1
@@ -268,7 +268,7 @@ def add_adjustments(adjsections, adjustments):
def f(x):
global backlight_value
backlight_value *= f
- new_adjustment = make_f(f, [[float(v)] for v in value], [6500])
+ new_adjustment = make_f(f, [[float(v)] for v in value], [1])
elif setting == 'temperature':
f = lambda x : temperature(x, lambda t : divide_by_maximum(cmf_10deg(t)))
new_adjustment = make_f(f, [[float(v)] for v in value], [6500])
@@ -507,6 +507,7 @@ def periodically(year, month, day, hour, minute, second, weekday, fade):
(*) Can be exceeded if the calendar system is changed, like in 1712-(02)Feb-30
(**) See https://en.wikipedia.org/wiki/Leap_second
'''
+ global backlight_value
start_over()
alpha = 1 if fade is None else abs(fade)
@@ -527,7 +528,7 @@ def periodically(year, month, day, hour, minute, second, weekday, fade):
for screen in screens:
set_method(*(crtcs[screen]), screen = screen)
for bldev in bldevs:
- bldev.brightness = backlight_value
+ bldev.brightness = backlight_value * bldev.maximum
def reset():