XBMC Boxee UI Switcher

I bind this script to a button on my LIRC remote to easily switch between XBMC and Boxee on my HTPC. XBMC’s interface using the Rapier skin and fanart is much more attractive, but Boxee offers great social network integration (read: Youtube).

#/bin/bash
# Switch between XBMC and Boxee
if ps ax | grep -v grep | grep xbmc.bin > /dev/null
then
	echo "XBMC running, killing process"
	kill `pidof xbmc.bin`
	sleep 7
	echo "running Boxee"
	/usr/bin/runBoxee &
elif ps ax | grep -v grep | grep Boxee > /dev/null
then
	echo "Boxee running, killing process"
	kill `pidof Boxee`
	sleep 7
	echo "running XBMC"
	/usr/bin/runXBMC &
else
	echo "No UI running, starting XBMC"
	/usr/bin/runXBMC &
fi

Start irexec daemon

Count files and folders

Find text in files

Strip ID3 Tags from FLAC

ID3 tags are not part of the FLAC specification so I decided to strip them from my FLAC files.

# Strip ID3 Tags from FLAC
find . -name "*.flac" -exec id3v2 --delete-all {} \;