summaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--TODO4
-rw-r--r--examples/textconf7
2 files changed, 7 insertions, 4 deletions
diff --git a/TODO b/TODO
index 2e3cf77..dd91775 100644
--- a/TODO
+++ b/TODO
@@ -1,7 +1,6 @@
High priority:
Add support for monitor hotplugging
Add models for calculating fade and refresh rate parameters
- Test backlight in textconf
Medium priority:
Test and demo _ICC_PROFILE
@@ -12,6 +11,7 @@ Low priority:
Add a section in manual for information on which order
to apply settings and how it affects the result.
Document examples in info manual
+ Make an example that inverts the colours when the battery is low
Future stuff:
Add wayland support (could not find an API for it, but xwayland works)
@@ -25,4 +25,6 @@ Future stuff:
computer or soul being violated with proprietary software.)
Raw ramp applying functions with recalcuated interpolation, linear and
polynomial
+ Make an example that warns about UPS states
+ (not too important, you should have that in /etc/inittab)
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():