
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
Minor feature and bugfix release - See changelog for details. As usual, please report bugs and strange behavior to d a m o n k at e f n dot o r g
*******
The "Manifesto"
Media-Detect is a script designed to make your multimedia shortcuts more powerful and easier to configure. It is intended for use with LinEAK, but can be called by any shortcuts or applications you like - such as khotkeys - or executed from the command line.
LinEAK is a program that enables the multimedia keys on specialty keyboards, such as the Logitech iTouch (my particular model). I use LinEAK, but have been frustrated by its lack of flexibility. Each button can only be configured to do one thing. If you configure the fast-forward button to skip to the next song in XMMS, that's all it will do. It won't skip to the next DVD chapter in xine if you happen to have that program open instead.
I wanted my keys to do more. I decided to scratch this itch and write myself a handy script that decides what each key does based on which app is currently open. Specifically, it takes parameters that have been passed to it and converts them into commands that your multimedia applications can use.
Now, instead of calling the app directly, LinEAK calls the script. Media-Detect then decides which multimedia application is open and provides the correct command. XMMS fast-forwards and rewinds, as does xine, KsCD, and any other application that can accept DCOP or command line calls. My buttons work the way I want them to, no matter what I happen to be doing. Life is good again.
15 years ago
0.55 - Minor feature and bugfix release
FEATURES
* Enhanced Feature: Added mute/unmute to Volume control. Now you can mute just the channel used by the open application.
* Menu system: Added ability to exit the menu from anywhere in it.
BUGFIXES
* Media-Detect: Locking files for alternate commands weren't application-specific. Fixed.
* Menu system: Every time you canceled from one menu to the previous menu, it would generate a new instance of the previous menu instead of gracefully exiting from the current menu loop. This could slow the menu down if you were editing or adding multiple applications. Fixed by implementing a proper canceling mechanism from each menu.
0.54 - Feature and bugfix release
FEATURES
* New Feature: Volume control module. You can now use Media-Detect to control the mixer and channel number of your choice. For instance, if your television tuner card and program use the AUX channel on your second mixer, you can configure Media-Detect to adjust the volume up and down on *that* channel and mixer while your television program is running. If no configured applications are running, you can set a default mixer and channel to adjust (usually the master volume on your first mixer). This feature requires aumix.
* New Feature: DCOP Applications. Some multimedia applications can use DCOP, the built-in KDE interface that allows programs like Media-Detect to control them via scripted commands. Media-Detect can now use this interface. While this was possible before by including the entire DCOP command in the configuration for each command, now Media-Detect can search DCOP, which is useful for programs which register a different name with DCOP every time they start, such as KMplayer.
BUGFIXES
* Menu system: I knew a logic bug would be found with the previous release, and one was. If you edited two applications in a row without restarting the menu, it would garble the view under certain circumstances. Fixed.
* Menu system: A bug prevented new applications from accepting Alternates when they were first created. Fixed.
* Command line menu: Sometimes cancel options wouldn't display properly. Fixed.
15 years ago
0.55 - Minor feature and bugfix release
FEATURES
* Enhanced Feature: Added mute/unmute to Volume control. Now you can mute just the channel used by the open application.
* Menu system: Added ability to exit the menu from anywhere in it.
BUGFIXES
* Media-Detect: Locking files for alternate commands weren't application-specific. Fixed.
* Menu system: Every time you canceled from one menu to the previous menu, it would generate a new instance of the previous menu instead of gracefully exiting from the current menu loop. This could slow the menu down if you were editing or adding multiple applications. Fixed by implementing a proper canceling mechanism from each menu.
0.54 - Feature and bugfix release
FEATURES
* New Feature: Volume control module. You can now use Media-Detect to control the mixer and channel number of your choice. For instance, if your television tuner card and program use the AUX channel on your second mixer, you can configure Media-Detect to adjust the volume up and down on *that* channel and mixer while your television program is running. If no configured applications are running, you can set a default mixer and channel to adjust (usually the master volume on your first mixer). This feature requires aumix.
* New Feature: DCOP Applications. Some multimedia applications can use DCOP, the built-in KDE interface that allows programs like Media-Detect to control them via scripted commands. Media-Detect can now use this interface. While this was possible before by including the entire DCOP command in the configuration for each command, now Media-Detect can search DCOP, which is useful for programs which register a different name with DCOP every time they start, such as KMplayer.
BUGFIXES
* Menu system: I knew a logic bug would be found with the previous release, and one was. If you edited two applications in a row without restarting the menu, it would garble the view under certain circumstances. Fixed.
* Menu system: A bug prevented new applications from accepting Alternates when they were first created. Fixed.
* Command line menu: Sometimes cancel options wouldn't display properly. Fixed.
Throx
15 years ago
Thanks for that wonderful script
Why not joining lineak and develop it there, cuz a script will always be a script
Report
Daemon-K
15 years ago
Report
bepcyc
15 years ago
Do you plan to provide an .ebuild file for it?
Report
Daemon-K
15 years ago
There's nothing to be compiled or built. Just place the scripts in a directory on your path (or run the install script, which will do the same thing), and they should work.
Let me know if you have any problems.
Report
forestie
15 years ago
It is a great piece of software, and an excellent idea!
Let me please make a suggestion: would it be possible to integrate it into Lineak, so it becomes part of the same code and therefore it is not necessary to have both a Lineakd configurator and a Media-Detect configurator? This would also probably ease a clean extension of the Keyboard KDE control module?
Report
Daemon-K
15 years ago
Ideally, all the buttons on a keyboard will be configurable from a single, easy-to-use location, and you won't need a program like mine to make the keyboard respond intelligently, because that will just be a feature of the keyboard control module in KDE, like you mention. But I have no idea how soon that will occur.
I'm no programmer, and I wrote Media-Detect to scratch an itch. I don't have even the vaguest notion how complicated it might be to duplicate this script's features in lineak or in the keyboard module, so I'm just assuming at the moment it is VERY complicated, and basing my time estimates on that.
Does anyone from the KDE team want to help me with this? I'd love to be proven wrong. :)
Report
linuxpoweredtrekkie
15 years ago
In case this is any use to anyone I followed the instructions here:
http://www.linuxformat.co.uk/modules.php?op=modload&name=phpBB_14&file=index&action=viewtopic&topic=8460&forum=16&3
The keys are then configurable from the khotkeys module.
Report
Daemon-K
15 years ago
Basically, khotkeys rocks at turning the keys on, but doesn't make it easy to change what the keys do based on which applications are open. I know it's theoretically possible, but with every application you add it becomes ridiculously more complex. I prefer being able to simply assign which apps have higher priority.
Report
Daemon-K
15 years ago
Oy, what a day...
Report
Daemon-K
15 years ago
Adding new configurations is unaffected, and works normally.
Report
Daemon-K
15 years ago
Report