aboutsummaryrefslogtreecommitdiff
path: root/source/notes/2017-02-03-cmus.md
blob: 01276ee7a48257a4fd9e34f4e23f83812e10e35b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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
```