MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
Nightingale Forums - [SOLVED] Use media keys to control Nightingale

Nightingale Forums

Full Version: [SOLVED] Use media keys to control Nightingale
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I finally worked out a way to map media keys to control Nightingale. Since the Songbird media-key plugins have not been ported yet, this is a workaround. Install the "Command Line Support" add-on. Then, using the command line, try
Code:
/path/to/applications/nightingale/nightingale -pause
to play/pause Nightingale. Caveat: every time I run this, I get "Segmentation fault" returned, but it does seem to work.

In Ubuntu 11.10, to map this to a key, go to System Settings > Keyboard > Shortcuts, then click on Custom Shortcuts, and +. Name it whatever you like, and use the same command as above. Map the key to your media key, or whatever you like! The only (other) problem is that Ubuntu might complain that the media key is mapped to something else, so you have to disable the normal function of that key. It's not a problem for me, as I only use that key for my music player, but I guess it might be an issue if you want media keys to continue controlling your video player, etc.
I'm working on a proper way Wink
Excellent! I can't wait. My way is certainly suboptimal…
Is this still relevant? I have the add-on but it's not working for me, using the instructions above.
Ah yeah, this was how I did it when I manually downloaded Nightingale from the webpage. I'm not sure how you've installed it, but I'm installed it from this ppa: trebelnik-stefina/nightingale .

The command now is
Code:
/usr/share/nightingale/nightingale-bin -pause
I see. This does work from the command line, but I'm trying to bind it to my IR remote using lirc. My .lircrc file looks like this:

begin
prog = usr/share/nightingale/nightingale-bin
button = KEY_PAUSE
config = -pause
end

This doesn't do anything, though. I've tried using this:

config = pause

but that doesn't do anything either.
Can't help you there, sorry. I don't even know what lirc is. Since the Nightingale side of things do work fine, it might be worth chasing this up with lirc support. Good luck.

(Also, FWIW, you're missing an initial slash from your path in the script. I don't know if that's important. Again, I know nothing about it, but you might try putting the entire command in prog? i.e. include `-pause`? You might need quotation marks for the space.)
Thanks, sparhawk.
One more question: Is there a way to get this to trigger only when nightingale is running? navigating to the path and then adding a flag at the end will open nightingale and run the command, if it's closed, and will simply send along the command if it's open.

The reason I ask is that I was able to map the commands but I only want them to trigger when nightingale is already open, and not open nightingale if it isn't already.
(02-06-2013, 03:07 AM)3×5 Wrote: [ -> ]One more question: Is there a way to get this to trigger only when nightingale is running?

I doubt it. AFAIK the only way to use the media keys is via the command-line hack, which does have this consequence. GeekShadow mentioned that he was developing a better way, but that was a year ago, and I've not heard anything since. (I presume this method would not suffer from the same bug.)
Pages: 1 2