You are not logged in.
hey.. i am trying to show the filename of the currently playing file in mplayer with dzen2.
this is what i tried by now:
mplayer Last\ Action\ Hero.mkv |&grep Playing | dzen2 -dock -p 2
while this does show what i want it has 2 major issues:
- It displays the filename AFTER mplayer quits, which is definately not what i want.
- it does not work with wildcards (mplayer *.avi)
Any ideas?
Last edited by Rasi (2010-09-25 17:20:11)
He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.
Douglas Adams
Offline
Here is a snippet I extract from my another script:
#!/bin/bash
exec 8> >(mplayer -msglevel all=5 *.avi | grep Playing)
subshell_pid=$!
while true; do
ps $subshell_pid &> /dev/null
(( $? != 0 )) && break
done
exec 8>&-
I was trying to get real-time output of mplayer when I was writing that script. It should resolve well for your two issues.
Last edited by livibetter (2010-09-25 17:59:26)
Offline