Sometimes I like to watch VLC media on my TV connected to the HDMI port on my laptop and I now have to:
- Start VLC on the TV:
- Positioned on the TV by CCSM.
- The screen saver is being turned off by VLC.
- Close the laptop
- Turn off the monitor (If it's on)
because I like to sit in the dark while watching TV!
Has anyone solved the above already for themselves through a script?
The TV is always connected to HDMI and the monitor always to the VGA port if that makes things easier.
I've created a script that slowly dims two monitors after 5 minutes of keyboard or mouse inactivity while you watch a movie on a third monitor. When you move your mouse or use your keyboard the two dimmed monitors quickly brighten (but not suddenly to shock you).
Sample status screen
Before you think I watch too much TV note this is a laptop and the program has been running for many days and the laptop is suspended / resumed twice a day at least.
Setup Instructions
Save the script below to a filename in your path such as
/usr/local/bin/movie.sh
or/home/your_user_name/bin/movie.sh
and then use:Xorg's package
xprintidle
is required to track how long your computer has been idle since a mouse movement or keyboard activity:Then to launch the script use:
Note: When testing, change
TIME_TO_FADE
from200000
to10000
so you only have to wait 10 seconds instead of 200 seconds for fading to start.The script