musikcube icon indicating copy to clipboard operation
musikcube copied to clipboard

CLI start/stop/pause calls?

Open stratacast opened this issue 1 year ago • 5 comments

Really happy to see the 3.0 release. Using it today, I remembered why I put it on the shelf. There's no way for me to toggle pause/play except to go to the command line window and pause. This is pretty inconvenient.

With something like Music On Console, you can call mocp --toggle-pause to play/pause and mocp --stop to stop playback. It would be really cool if musikcube would honor XF86AudioPlay keystrokes or have a command line argument that could be parsed that could be mapped to XF86AudioPlay or some other keyboard shortcut outside of the terminal

stratacast avatar May 31 '23 23:05 stratacast

As a workaround you can use playerctl or kill to play-pause musikcube:

playerctl --help
man kill

playerctl play-pause

kill -s 19 musikcube     # pause
kill -s 18 musikcube     # play again

237dmitry avatar Jun 01 '23 06:06 237dmitry

playerctl doesn't seem to work. It doesn't appear to be an mpris player. Those kill signals look to be Linux only too.

stratacast avatar Jun 01 '23 07:06 stratacast

playerctl doesn't seem to work.

Works... (on ArcoLinux in my case). Musikcube is the static build from release page.

Those kill signals look to be Linux only too.

On windows you can download pssuspend64.exe from Sysinternals suite. I symlinked it in $env:PATH as pssuspend.exe

pssuspend musikcube-cmd        # pause
pssuspend musikcube-cmd -r     # play

I agreed with your issue. This is just a workaround. The CLI is wanted.

237dmitry avatar Jun 01 '23 07:06 237dmitry

I don't run Windows either. It would be nice to have a broadly generic option built into the player itself vs rely on various third party tooling. But I appreciate you checking these options out for me. I guess I'll do what I did before and keep using Music on Console. Makes me wish I was able to contribute code to make this feature work, overall I prefer Musikcube

stratacast avatar Jun 02 '23 04:06 stratacast

playerctl doesn't work with musikcube for me either. I'm using 3.0.0 on Void Linux.

Dakedres avatar Oct 03 '23 20:10 Dakedres