|
From: Robin M. <sub...@ro...> - 2007-06-07 00:30:05
|
I was poking around the net every now and then to find a way to set up my remote using modes. Although it was briefly documented on the lirc web site I couldn't find too many places where they were used except here: http://www.turbobit.com/software/lircrc.txt I came up with a solution based on the above which I hope may assist others in setting up their lircs. It's attached (I hope this list accepts .gz files). This is for kde users. I use the newer mce usb remote for this, but obviously it could be easily adapted to others. I also use the osdsh product to communicate what's happening with the remote. I set several modes to talk to various programs like mythtv, amarok, mplayer, vlc and xine. When you switch to that mode you can use the power button to start/stop the application (it toggles depending on if the application is running or not). I also have a "desktop" mode that allows me to switch to the different desktop panes in my kde. In this desktop mode I can hit "Play/Power" to reboot and "Stop/Power" to poweroff. Each mode is in its own file under the ~/.lirc directory and is included in the .lircrc file. I also use lircmd to emulate the mouse in x11 via the "Clear" key on the remote. So using the desktop mode allows me to select my 1-4 desktops, then hitting "Clear" allows me to use the mouse on that desktop. This is very useful for bringing the right window to focus when using "CurrentWindow" in .lircrc. My ~/.kde/Autostart contains a script like so: #! /bin/bash irexec & irxevent & osdsh -d3 -o5 -p0 -a1 sleep 3 ~/startmyth # <== a script to start mythfrontend and capture the logs. Current issues: * Internal lirc support for mythtv will not work with a mode (from all appearances), so I had to resort to irxevent. * When using irxevent with mythtv, I am forced to use "CurrentWindow" instead of the window name. I'm not sure why this won't work. It would be great if mythtv played nicer, but oh well. If anyone has any comments on how to make this better, please let me know. |