summaryrefslogtreecommitdiffstats
path: root/src/__main__.py
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-02-14 19:55:09 +0100
committerMattias Andrée <maandree@operamail.com>2014-02-14 19:55:09 +0100
commit58c38709f4ad6156d1df0f2b6a1adf11eb1bbc6e (patch)
tree99a0dc7c113d0a4c7052f96d10966f45d40dce57 /src/__main__.py
parentm doc (diff)
downloadblueshift-58c38709f4ad6156d1df0f2b6a1adf11eb1bbc6e.tar.gz
blueshift-58c38709f4ad6156d1df0f2b6a1adf11eb1bbc6e.tar.bz2
blueshift-58c38709f4ad6156d1df0f2b6a1adf11eb1bbc6e.tar.xz
add monitor control without native binding
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/__main__.py')
-rwxr-xr-xsrc/__main__.py18
1 files changed, 3 insertions, 15 deletions
diff --git a/src/__main__.py b/src/__main__.py
index a8b15ad..5185e81 100755
--- a/src/__main__.py
+++ b/src/__main__.py
@@ -18,6 +18,7 @@ import os
from colour import *
from curve import *
+from monitor import *
def periodically(year, month, day, hour, minute, second, weekday, fade):
@@ -68,10 +69,10 @@ def periodically(year, month, day, hour, minute, second, weekday, fade):
-## Set globals accessible by rc
+## Set globals variables
periodically = None
wait_period = 60
-monitor_controller = None
+monitor_controller = lambda : randr()
global DATADIR, i_size, o_size, r_curve, g_curve, b_curve, clip_result
global periodically, wait_period, monitor_controller
@@ -97,16 +98,3 @@ for file in ('$XDG_CONFIG_HOME/%/%rc', '$HOME/.config/%/%rc', '$HOME/.%rc', '/et
exec(code, globals)
break
-
-## Translate curve from float to integer
-for curve in (r_curve, g_curve, b_curve):
- for i in range(i_size):
- curve[i] = int(curve[i] * (o_size - 1) + 0.5)
- if clip_result:
- curve[i] = min(max(0, curve[i]), (o_size - 1))
-
-print(r_curve)
-print(g_curve)
-print(b_curve)
-
-