summaryrefslogtreecommitdiffstats
path: root/src/__main__.py
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-02-22 13:09:39 +0100
committerMattias Andrée <maandree@operamail.com>2014-02-22 13:09:39 +0100
commit23919685c7321e073376b8ba5a6c596fdb9fd3b9 (patch)
tree2a6757f971378714995c9edc2a3b7109bd0342bd /src/__main__.py
parentupdate todo (diff)
downloadblueshift-23919685c7321e073376b8ba5a6c596fdb9fd3b9.tar.gz
blueshift-23919685c7321e073376b8ba5a6c596fdb9fd3b9.tar.bz2
blueshift-23919685c7321e073376b8ba5a6c596fdb9fd3b9.tar.xz
support C-c in one shot mode
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/__main__.py')
-rwxr-xr-xsrc/__main__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/__main__.py b/src/__main__.py
index f803824..27c025e 100755
--- a/src/__main__.py
+++ b/src/__main__.py
@@ -419,7 +419,10 @@ if (config_file is None) and any([doreset, location] + settings):
while running:
apply(alpha(), trans if doreset else 1 - trans)
trans += 0.05
- time.sleep(0.1)
+ try:
+ time.sleep(0.1)
+ except KeyboardInterrupt:
+ signal_SIGTERM(0, None)
if trans >= 1:
break
apply(alpha(), 1 if doreset else 0)