In my previous post, I promised I’d show how to control your media player to skip to the next song when you press a combination of keys.
Admittedly, I should’ve posted this earlier (especially since it’s not that big a post), but better late than never, isn’t it?
The basic idea is that you can run a command with so-called arguments. Most (if not all) media players on Linux also take arguments to skip to the previous or next song in your playlist, or to play/pause the current track. This is extremely useful if you just want to listen to music without the program you use to play it bothering you.
You know how to find the command of your media player (I explained it in Your wish is Xubuntu’s command). My media player is Exaile, the command of which is “exaile”. This is what I’ll be using in this post, but you can replace it by the command of your preferred media player.
To find out which arguments a program takes, you have to resort to a terminal window (Applications->Accessories->Terminal). From there, you can read a program’s manual by typing man <command>
, so I’d use man exaile
:
You can read through it by using the arrow keys and exit the manual by pressing “q” (so “Esc” won’t work!).
Some programs don’t have a manual, but if they don’t, they mostly take the --help
argument, which gives you an overview of all other arguments available. I’d use exaile --help
:
As you see, Exaile supports both of these commands. It doesn’t really matter which I use, both tell me I can skip to the next song with the --next
argument (or -n
), to the previous one with --prev
(or -p
), and play/pause (depending on its current state) with --play-pause
(or -t
, from toggle).
Knowing that, I opened up the Keyboard Settings (Applications->Settings->Keyboard Settings) and in the Shortcuts-tab I set the commands exaile --prev
, exaile --play-pause
and exaile --next
to some keyboard shortcuts. I could then control Exaile using my keyboard! Now, every time I start Exaile I minimize it to the system tray so that it would just be an icon in my panel. Using the “LibNotify Plugin” I get a notification which song I skip to, making my media player as unobtrusive as possible:
Customisations like this are the reason I love using Xubuntu – it adapts to you instead of the other way around. It are these little things that makes using a computer just that extra bit more pleasant.
Latest comments