You are not logged in.
I have a script to turn off my screen which I mapped to Fn F3. I often like to go to sleep right after I watch a movie with mplayer. Is there a way to make it so I can start the movie, then run the script which will wait until mplayer closes to actually execute? (my computer is far from my bed
I used to just use "at" but my favorite part of linux is messing with something to make it as easy as possible later.
Here is the original (my first script ever):
#!/bin/sh
sleep .25; xset dpms force off
Last edited by pw_f100_220 (2010-02-05 13:34:09)
Sometimes I just want people to expect me to do what I would do instead of what most people would do.
Offline
I don't want it to happen every time. That does sound like it would do the trick though.
Sometimes I just want people to expect me to do what I would do instead of what most people would do.
Offline
If you start mplayer from the command line then you could add your script so it executes once the mplayer command returns.
mplayer myfilm.avi && ./screenoff.sh
You should be able to add a similar line to a graphical launcher as well (perhaps a second button that starts it like that) but that depends on your DE/WM
Offline
awesome! works like a charm. I only use mplayer from the command line so it's perfect. Thanks man. I looked around for something like that first but it's so hard knowing exactly what to search for sometimes.
Sometimes I just want people to expect me to do what I would do instead of what most people would do.
Offline
hehe glad to be of service.
Offline
Or you can make a wrapper script for mplayer that first plays the movie of your selection and then executes the screen off script you wrote. Either way works.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline