2
# mplayer.sh -- mplayer pausing script for vlock,
3
# the VT locking program for linux
5
# To use this script do run the following command
6
# $ mkfifo ~/.mplayer/control
8
# input=file=/home/<user>/.mplayer/control
9
# to your ~/.mplayer/config.
11
# This program is copyright (C) 2007 Frank Benkstein, and is free software. It
12
# comes without any warranty, to the extent permitted by applicable law. You
13
# can redistribute it and/or modify it under the terms of the Do What The Fuck
14
# You Want To Public License, Version 2, as published by Sam Hocevar. See
15
# http://sam.zoy.org/wtfpl/COPYING for more details.
22
while read hook_name ; do
23
case "${hook_name}" in
25
if fuser "${HOME}/.mplayer/control" > /dev/null 2>&1 ; then
26
echo "pausing seek -4" > "${HOME}/.mplayer/control"
30
if fuser "${HOME}/.mplayer/control" > /dev/null 2>&1 ; then
31
echo "pause" > "${HOME}/.mplayer/control"
38
if [ $# -ne 1 ] ; then
39
echo >&2 "Usage: $0 <command>"
66
echo >&2 "$0: unknown command '$1'"