/[scripts]/trunk/play-toggle.sh
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /trunk/play-toggle.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 100 - (hide annotations)
Thu Nov 20 19:52:11 2008 UTC (15 years, 4 months ago) by dpavlin
File MIME type: application/x-sh
File size: 795 byte(s)
fix comments

1 dpavlin 99 #!/bin/sh
2    
3 dpavlin 100 # moc(p) support for audio transcribing
4     #
5     # 2008-11-20 Dobrica Pavlinusic <dpavlin@rot13.org>
6    
7 dpavlin 99 cmd="--toggle-pause"
8    
9     if echo "x$1x" | grep '^x-*[0-9][0-9]*x$' > /dev/null ; then
10     cmd="--seek $1"
11     elif [ ! -z "$1" ] ; then
12     mocp --info | grep "^$1: " | sed 's/^.*: //'
13     exit
14     fi
15    
16     mocp $cmd
17     mocp --info |\
18     egrep '^(State|File|Title|CurrentTime|TotalTime)' |\
19     egrep '^(State|File|Title|CurrentTime|TotalTime)' | sed 's/^[^:]*: *//' |\
20     osd_cat -p bottom -A center -s 3 -f neep-24 -O 2 -d 1 -l 5
21    
22     exit
23    
24     # insert following in ~/.vimrc:
25    
26     " play-pause
27     noremap [33~ :silent execute "! play-toggle.sh &"<cr>:redraw!<cr>
28     " seek 5 sec backward
29     noremap [34~ :silent execute "! play-toggle.sh -5 &"<cr>:redraw!<cr>
30     " CurrentTime from mocp --info
31     noremap [29~ :r !play-toggle.sh CurrentTime<cr>

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26