Skip to content

Instantly share code, notes, and snippets.

@ggirou
Last active October 22, 2017 20:53
Show Gist options
  • Save ggirou/20b2ece3b1f7bad5e1408afb36122bec to your computer and use it in GitHub Desktop.
Save ggirou/20b2ece3b1f7bad5e1408afb36122bec to your computer and use it in GitHub Desktop.
Keyboard jukebox
#!/bin/bash
cd songs/1
while true
do
clear
echo 'Running Keyboard Jukebox...'
echo 'Tape a key to play a song'
echo; ls -la; echo
echo 'Ctrl^c to exit'; echo
[[ $prevchar ]] && echo Playing `ls -la $prevchar`; echo
read -n 1 char
char=${char,}
if [ "$char" != "$prevchar" ] || ! pidof omxplayer.bin && [ -f $char ];
then
pkill omxplayer
prevchar=$char
omxplayer --no-keys $char &
fi
done
@ggirou
Copy link
Author

ggirou commented May 29, 2017

ln -s path/to/some.mp3 songs/a
alias yaudio='youtube-dl --format m4a --add-metadata'

function song-ln {
     ln -sr "$2" ~/songs/$1
}

Install MPD

sudo apt-get install mpd
sudo nano /etc/mpd.conf
sudo service mpd start

Install Kodi

sudo apt-get install kodi kodi-audiodecoder-*
# Tester sans ? sudo apt-get --no-install-recommends install xserver-xorg xserver-xorg-video-fbdev xinit pciutils xinput xfonts-100dpi xfonts-75dpi xfonts-scalable
nano  ~/.kodi/userdata/guisettings.xml
# Enable services > webserver and remove attribute default="true"
kodi # or kodi-standalone ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment