Dead simple cli remote control wrapping pactl and xdotool.
Why? I'm often running e.g. netflix on my desktop computer 3 meters away and I'm lazy. So, I'm logged in over ssh with my laptop and this allows me to control the netflix window.
I originally had aliases for the underlying xdotool
and pactl
commands but it's painful to type and hit enter.
$ npm i cliplayer -g
Start on command line:
$ cliplayer
And hit some of the following keys:
-
space
-> toggle pause/play -
left arrow
-> skip left -
right arrow
-> skip right -
up arrow
-> increase the volume 10% -
down arrow
-> decrease the volume 10% -
m
-> toggle the volume on and off
Abort execution with ctrl + c
.
NOTE! When running xdotool
it's important to set the DISPLAY
environment so xdotool
knows which display to target. It defaults to :0.0
.
MIT