You are not logged in.
Hi All,
using mocp I would like to be able to double click a song in my file manager and the song starts playing in mocp which gets displayed in terminal.
Any hints on how to do that? By now I have created a .desktop file for mocp and I have
Exec=urxvt -e mocp
this opens mocp when I double click a song in my music folder, but the song that I selected with the double click doesn't start automatically and I need to press enter once in mocp.
I know it sounds a simple question, but although I have done my great deal of search I couldn't find a solution...also, I am a new mocp user.
Thanks in advance!
Last edited by ap (2017-09-10 07:57:15)
Offline
Off the top of my head, try
Exec=urxvt -e mocp %F
John
--------------------
( a boring Japan blog , Japan Links, idle twitterings and GitStuff )
In case you forget, the rules.
Offline
Hi johnraff,
thanks for the hint, I also tried this before but this just opens mocp but doesn't autostart the song I double clicked
Offline
Why not try the same as a Custom Action in Thunar?
BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System: Host: s12 Kernel: 3.16.0-4-amd64 x86_64 (64 bit gcc: 4.8.4)
Desktop: Openbox 3.5.2 dm: (startx) Distro: Debian GNU/Linux 8
Offline
Hi Sector11,
the command used for the custom action I believe should be the same as the one for the .desktop file...then yes, I can use either the .desktop file or the custom action, but before I need to figure the right command thanks!
Offline
ap, unfortunately mocp doesn't lend itself easily to this sort of action, but it is possible.
first of all, you don't need to use a terminal window.
all commands can be issued without opening moc's user interface.
you need a wrapper script that will be called from the .desktop file:
#!/bin/sh
mocp -S
mocp -s
mocp -c
mocp -q "$1"
mocp -p
#~ urxvt -e mocp # if you so desire you can add this at the end
and the desktop file:
[Desktop Entry]
Name=mocp-playnow
Icon=
Exec=/home/ap/bin/mocp-playnow %f
Terminal=false
StartupNotify=false
Type=Application
Categories=AudioVideo;Player;
caveat:
the current playlist will be cleared so that the song can start playing immediately.
otherwise it would just be appended to the end of the playlist.
i know of no other way to accomplish this with MOC.
Last edited by ohnonot (2017-09-10 06:56:27)
Offline
Awesome, works exactly as requested! Thanks for the detailed and clear response, I'll mark it as solved :-D
Offline
you're welcome :-)
Offline