diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-03-04 17:33:20 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-03-04 17:33:20 +0100 |
commit | 79fd402d820e88f7ca75ab6b568d428c57e2fae4 (patch) | |
tree | cb2860892a118517bbe74cf9bd1d4a3ecfb47e0f /examples/comprehensive | |
parent | add xpybar port of xmobar example (diff) | |
download | blueshift-79fd402d820e88f7ca75ab6b568d428c57e2fae4.tar.gz blueshift-79fd402d820e88f7ca75ab6b568d428c57e2fae4.tar.bz2 blueshift-79fd402d820e88f7ca75ab6b568d428c57e2fae4.tar.xz |
add -r support for one shot mode in comprehensive example
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | examples/comprehensive | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/examples/comprehensive b/examples/comprehensive index b055a76..ce6adbf 100644 --- a/examples/comprehensive +++ b/examples/comprehensive @@ -6,7 +6,7 @@ # sigmoid correction, or free function modifier. Neither does it # support multiple screens, this is normally not an issue because # Xinerama is normally used to put all monitors on the same screen; -# nor does it parse ad-hoc settings or configuration options, or +# nor does it parse options other than -r from ad-hoc settigns, or # use monitor identifiation. @@ -132,8 +132,8 @@ icc_calibration_profile = [None] # -p (--panicgate) is used. current_calibration = [None] if not panicgate: - #calib_get = None - calib_get = randr_get + calib_get = None + #calib_get = randr_get #calib_get = vidmode_get current_calibration = [calib_get] @@ -184,12 +184,16 @@ monitor_controller = lambda : randr(*monitors) ''' -uses_adhoc_opts = False +uses_adhoc_opts = True ''' -:bool `True` if the configuration screens parses the ad-hoc settings +:bool `True` if the configuration script parses the ad-hoc settings ''' +# Get --reset from Blueshift ad-hoc settigns +doreset = parser.opts['--reset'] + + last_dayness = None def periodically(year, month, day, hour, minute, second, weekday, fade): ''' @@ -400,13 +404,16 @@ else: if not panicgate: signal.signal(signal.SIGTERM, signal_SIGTERM) trans = 0 - apply(trans) + apply((1 - trans) if doreset else trans) while running: time.sleep(0.1) if trans >= 1: break trans += 0.05 - apply(trans) - apply(None) + apply((1 - trans) if doreset else trans) + if not doreset: + apply(None) + else: + reset() periodically = None |