repo: music
action: blob
revision: 
path_from: music-setnowplaying-xwintitle
revision_from: refs/heads/master:
path_to: 
revision_to: 
git.thebackupbox.net
music
git clone git://git.thebackupbox.net/music

blob of:

music

/ music-setnowplaying-xwintitle

blob_plain of this file

refs/heads/master:/music-setnowplaying-xwintitle

 #!/bin/sh
 wid="$(xwininfo | grep ^xwin | tail -n1 | cut '-d ' -f4)"
 if [ ! "$wid" ];then
   exit 1
 fi
 while xdotool getwindowname "$wid";do
   sleep 1
 done \
   | stdbuf -oL sed 's/[ -]*Mozilla Firefox$//g' \
   | stdbuf -oL grep '..' \
   | stdbuf -oL uniq \
   | stdbuf -o0 tr '\n' '\0' \
   | xargs -n1 -0 music-setnowplaying