2012-11-16 15:38:01 |
Bob Merhebi |
description |
Here's what I did:
Stimulus: Application Starts
Application: Gnome Mplayer
Reactions:
1) Stop an application: Redshift
2) Start an application (advanced mode):
executable: redshift
Parameters: -m vidmode
Wait until application exists: On
Redshift redenns the screen color according to the time of day. It has 2 modes: randr & vidmode. By default I have randr as the mode.
What I want to do is that when a video starts (there's a feature request for this), in this case when Gnome Mplayer starts, redshift is killed & another instance with the vidmode is started.
The problem: opening any new window within the player (e.g;; File > Open or Edit > Preferences) causes the stimulus to do its work again. |
Here's what I did (2 triggers):
------------------------------
Stimulus: Application Starts
Application: Gnome Mplayer
Reactions:
1) Stop an application: Redshift
2) Start an application (advanced mode):
executable: redshift
Parameters: -m vidmode
Wait until application exists: On
and
Stimulus: Application Stops
Application: Gnome Mplayer
Reactions:
1) Stop an application: Redshift
2) Start an application: redshift
Wait until application exists: On
Redshift redenns the screen color according to the time of day. It has 2 modes: randr & vidmode. By default I have randr as the mode.
What I want to do is that when a video starts (there's a feature request for this), in this case when Gnome Mplayer starts, redshift is killed & another instance with the vidmode is started. And when the video stops (i.e; in this case player exists), the vidmode session is killed & the normal session is started.
Problems:
--------
1)opening any new window within the player (e.g;; File > Open or Edit > Preferences) causes the stimulus to do its work again.
2)
when my system starts, redshift autostarts:
$ ps aux | grep -i redshift
2278 0.1 0.5 564960 22972 ? Sl 17:25 0:00 python /usr/bin/gtk-redshift
2364 0.0 0.0 70656 2280 ? S 17:25 0:00 /usr/bin/redshift
3023 0.0 0.0 13588 928 pts/2 S+ 17:26 0:00 grep --color=auto -i redshift
when Gnome mplayer is started, I see:
$ ps aux | grep -i redshift
2364 0.0 0.0 70656 2280 ? S 17:25 0:00 /usr/bin/redshift
3323 0.1 0.0 70652 2456 ? S 17:34 0:00 /usr/bin/redshift -m vidmode
3326 0.0 0.0 13588 932 pts/2 S+ 17:35 0:00 grep --color=auto -i redshift
when Gnome mplayer is stopped, I see:
$ ps aux | grep -i redshift
2364 0.0 0.0 70656 2280 ? S 17:25 0:00 /usr/bin/redshift
3323 0.0 0.0 70652 2456 ? S 17:34 0:00 /usr/bin/redshift -m vidmode
3329 0.7 0.5 571012 20104 ? Sl 17:35 0:00 python /usr/bin/gtk-redshift
3332 0.2 0.0 70656 2280 ? S 17:35 0:00 /usr/bin/redshift
3340 0.0 0.0 13588 932 pts/2 S+ 17:35 0:00 grep --color=auto -i redshift
Notice that there are 2 instances of "/usr/bin/redshift" & the instance "/usr/bin/redshift -m vidmode" wasn't killed!
Guess of cause:
--------------
In the 1st rigger, the application started is: redshift (with paramters: -m vidmode) while in the 2nd trigger, the application stopped is redshift (w/o parameters). So I guess that the "Stop application" in the 2nd trigger isn't enough to kill the "advanced mode"! |
|
2012-11-16 15:41:04 |
Bob Merhebi |
description |
Here's what I did (2 triggers):
------------------------------
Stimulus: Application Starts
Application: Gnome Mplayer
Reactions:
1) Stop an application: Redshift
2) Start an application (advanced mode):
executable: redshift
Parameters: -m vidmode
Wait until application exists: On
and
Stimulus: Application Stops
Application: Gnome Mplayer
Reactions:
1) Stop an application: Redshift
2) Start an application: redshift
Wait until application exists: On
Redshift redenns the screen color according to the time of day. It has 2 modes: randr & vidmode. By default I have randr as the mode.
What I want to do is that when a video starts (there's a feature request for this), in this case when Gnome Mplayer starts, redshift is killed & another instance with the vidmode is started. And when the video stops (i.e; in this case player exists), the vidmode session is killed & the normal session is started.
Problems:
--------
1)opening any new window within the player (e.g;; File > Open or Edit > Preferences) causes the stimulus to do its work again.
2)
when my system starts, redshift autostarts:
$ ps aux | grep -i redshift
2278 0.1 0.5 564960 22972 ? Sl 17:25 0:00 python /usr/bin/gtk-redshift
2364 0.0 0.0 70656 2280 ? S 17:25 0:00 /usr/bin/redshift
3023 0.0 0.0 13588 928 pts/2 S+ 17:26 0:00 grep --color=auto -i redshift
when Gnome mplayer is started, I see:
$ ps aux | grep -i redshift
2364 0.0 0.0 70656 2280 ? S 17:25 0:00 /usr/bin/redshift
3323 0.1 0.0 70652 2456 ? S 17:34 0:00 /usr/bin/redshift -m vidmode
3326 0.0 0.0 13588 932 pts/2 S+ 17:35 0:00 grep --color=auto -i redshift
when Gnome mplayer is stopped, I see:
$ ps aux | grep -i redshift
2364 0.0 0.0 70656 2280 ? S 17:25 0:00 /usr/bin/redshift
3323 0.0 0.0 70652 2456 ? S 17:34 0:00 /usr/bin/redshift -m vidmode
3329 0.7 0.5 571012 20104 ? Sl 17:35 0:00 python /usr/bin/gtk-redshift
3332 0.2 0.0 70656 2280 ? S 17:35 0:00 /usr/bin/redshift
3340 0.0 0.0 13588 932 pts/2 S+ 17:35 0:00 grep --color=auto -i redshift
Notice that there are 2 instances of "/usr/bin/redshift" & the instance "/usr/bin/redshift -m vidmode" wasn't killed!
Guess of cause:
--------------
In the 1st rigger, the application started is: redshift (with paramters: -m vidmode) while in the 2nd trigger, the application stopped is redshift (w/o parameters). So I guess that the "Stop application" in the 2nd trigger isn't enough to kill the "advanced mode"! |
Here's what I did (2 triggers):
------------------------------
Stimulus: Application Starts
Application: Gnome Mplayer
Reactions:
1) Stop an application: Redshift
2) Start an application (advanced mode):
executable: redshift
Parameters: -m vidmode
Wait until application exists: On
and
Stimulus: Application Stops
Application: Gnome Mplayer
Reactions:
1) Stop an application: Redshift
2) Start an application: redshift
Wait until application exists: On
Redshift redenns the screen color according to the time of day. It has 2 modes: randr & vidmode. By default I have randr as the mode.
What I want to do is that when a video starts (there's a feature request for this), in this case when Gnome Mplayer starts, redshift is killed & another instance with the vidmode is started. And when the video stops (i.e; in this case player exists), the vidmode session is killed & the normal session is started.
Problems:
--------
1)opening any new window within the player (e.g;; File > Open or Edit > Preferences) causes the stimulus to do its work again.
2) 2nd trigger doesn't kill required processes causing several instances of redshift:
when my system starts, redshift autostarts:
$ ps aux | grep -i redshift
2278 0.1 0.5 564960 22972 ? Sl 17:25 0:00 python /usr/bin/gtk-redshift
2364 0.0 0.0 70656 2280 ? S 17:25 0:00 /usr/bin/redshift
3023 0.0 0.0 13588 928 pts/2 S+ 17:26 0:00 grep --color=auto -i redshift
when Gnome mplayer is started, I see:
$ ps aux | grep -i redshift
2364 0.0 0.0 70656 2280 ? S 17:25 0:00 /usr/bin/redshift
3323 0.1 0.0 70652 2456 ? S 17:34 0:00 /usr/bin/redshift -m vidmode
3326 0.0 0.0 13588 932 pts/2 S+ 17:35 0:00 grep --color=auto -i redshift
when Gnome mplayer is stopped, I see:
$ ps aux | grep -i redshift
2364 0.0 0.0 70656 2280 ? S 17:25 0:00 /usr/bin/redshift
3323 0.0 0.0 70652 2456 ? S 17:34 0:00 /usr/bin/redshift -m vidmode
3329 0.7 0.5 571012 20104 ? Sl 17:35 0:00 python /usr/bin/gtk-redshift
3332 0.2 0.0 70656 2280 ? S 17:35 0:00 /usr/bin/redshift
3340 0.0 0.0 13588 932 pts/2 S+ 17:35 0:00 grep --color=auto -i redshift
Notice that there are 2 instances of "/usr/bin/redshift" & the instance "/usr/bin/redshift -m vidmode" wasn't killed!
Guess of cause:
--------------
In the 1st rigger, the application started is: redshift (with paramters: -m vidmode) while in the 2nd trigger, the application stopped is redshift (w/o parameters). So I guess that the "Stop application" in the 2nd trigger isn't enough to kill the "advanced mode"! |
|