I just pushed some small python Music Player Daemon clients on github.
It may be of use for MPD fans using the device!
I just pushed some small python Music Player Daemon clients on github.
It may be of use for MPD fans using the device!
Bsync is a bidirectional file synchronization tool, using rsync for transfers. Moved files are also synchronized in a smart way.
It uses rsync for file transfers, find to generate filelist snapshots, and ssh for remote transfers.
bsync is an alternative to Unison, written in Python 3. A big strength of bsync: it can detect and apply moved files from one side to the other (Unison uses some copy calls to handle moved files).
I developped it to be able to synchronize my music directory from my laptop to my Raspberry Pi in an efficient way, and to sync with my girlfriend laptop too.
Bsync is released under GPL. Feel free to report any bugs/wishes in GitHub issues.
A small script to listen to mouse events with the mev
command using gpm
(General Purpose Mouse).
Can be used for example on the Raspberry Pi to run mpd commands, to use a mouse as a remote control.
I didn’t find how to isolate the wheel events in order to control the volume. Any idea somebody?
In Archlinux, you can add the following command in /etc/rc.local
to start it at boot time:
nohup /usr/local/bin/mpd_mouse.sh > /tmp/mpd_mouse.log 2>&1 &
#!/bin/sh # This script listen to mouse events with the mev command using gpm. # Can be used for example on the Raspberry Pi to run mpd commands, to use a mouse as a remote control. # You can start it as a daemon with: # nohup /usr/local/bin/mpd_mouse.sh > /tmp/mpd_mouse.log 2>&1 & # start gpm if not already started gpm -m /dev/input/mice -t imps2 # unset TERM variable, otherwise mev refuses to start when detecting xterm unset TERM echo "Listening to mouse events..." # we use script to fake a tty for mev, otherwise it exits (note: mev logs errors in syslog) script -qc "mev -E" /dev/null </dev/null | grep --line-buffered -v "mouse-movement" | while read LINE do echo echo "$LINE" EVENT=$(echo "$LINE" | cut -d' ' -f1 | cut -d'(' -f2) if [ "$EVENT" = "down-mouse-1" ] then echo mpc stop mpc stop elif [ "$EVENT" = "down-mouse-2" ] then echo mpc toggle mpc toggle elif [ "$EVENT" = "down-mouse-3" ] then echo mpc next mpc next else echo "nothing" fi done