From 6dbdf013628321f9996efe4a90eaa03b8a8875a4 Mon Sep 17 00:00:00 2001 From: neodarz Date: Tue, 20 Jun 2017 19:03:17 +0200 Subject: Fork of wiki.neodarz.net --- source/notes/2017-02-03-cmus.md | 52 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 source/notes/2017-02-03-cmus.md (limited to 'source/notes/2017-02-03-cmus.md') diff --git a/source/notes/2017-02-03-cmus.md b/source/notes/2017-02-03-cmus.md new file mode 100644 index 00000000..01276ee7 --- /dev/null +++ b/source/notes/2017-02-03-cmus.md @@ -0,0 +1,52 @@ +--- +title: "cmus" +date: 2017-02-03T09:14:00 +date_display: Feb 02, 2017 +--- + +RTFM : [https://github.com/cmus/cmus/wiki/status-display-programs#usage--installation +](https://github.com/cmus/cmus/wiki/status-display-programs#usage--installation +) + +Mettre les droit correct : +```sh +chmod a+x script.sh +``` + +Le code : + +```sh +echo $@ >> script.log +``` + + +Configuration de cmus : + +```sh + :set status_display_program=script.sh +``` + +## cmus-sender + +For use this script you must set the variable `status_display_program` in cmus, for example : + +```sh +:set status_display_program=/home/user/.cmus/status_display_program.sh +``` + +```sh +#!/bin/bash +#echo $@ >> /home/neodarz/test.log +echo "$2ø$6ø$8ø"${10}"ø"${12}"ø"${14}"ø"${16}"ø×" >> /home/neodarz/test.log +#echo "Status: $2" >> /home/neodarz/test.log +#echo "Paths: $4" >> /home/neodarz/test.log +#echo "Artist: $6" >> /home/neodarz/test.log +#echo "Album: $8" >> /home/neodarz/test.log +#echo "Track Number: "${10} >> /home/neodarz/test.log +#echo "Title: "${12} >> /home/neodarz/test.log +#echo "Date:"${14} >> /home/neodarz/test.log +#echo "Duration: "${16} >> /home/neodarz/test.log +PID=$(pidof node server.js) +kill -USR2 $PID +``` + -- cgit v1.2.1