LIRC Infrared Remote Control: Difference between revisions

From WickyWiki
Created page with "2009 Remote control : LIRC * https://help.ubuntu.com/community/LIRC Important files * /etc/init.d/lirc #loads module and starts deamon * /dev/lirc0 #lirc device * /etc/lirc..."
 
mNo edit summary
 
(20 intermediate revisions by 2 users not shown)
Line 1: Line 1:
2009 Remote control : LIRC
[[Category:Ubuntu]]
[[Category:Ubuntu Remote]]
[[Category:2009]]


== Sources ==
* http://www.lirc.org
* https://help.ubuntu.com/community/LIRC
* https://help.ubuntu.com/community/LIRC
* http://ubuntuforums.org/showthread.php?t=2151195
* http://www.voti.nl/ir-2/index_1.html
== Install ==
<syntaxhighlight lang=bash>
sudo apt-get install lirc
</syntaxhighlight>


Important files
Important files:
* /etc/init.d/lirc #loads module and starts deamon
* /etc/init.d/lirc #loads module and starts deamon
* /dev/lirc0 #lirc device
* /dev/lirc0 #lirc device
Line 10: Line 23:
* ~\.lircrc #lirc configuration of actions for vlc, totem etc
* ~\.lircrc #lirc configuration of actions for vlc, totem etc


== Install ==
== Configure ==
 
I use a "Home-brew (16x50 UART compatible serial port)" / tty0
 
For lower voltages on serial port (like laptop):
 
[[File:lirc_home_brew_ir_receiver_schematic-laptop.gif|home brew ir receiver schematic laptop]]


<syntaxhighlight lang=bash>
Best performance schematic:
sudo apt-get install lirc
</syntaxhighlight>


== Configure (see examples) ==
[[File:lirc_home_brew_ir_receiver_schematic.gif|home brew ir receiver schematic]]


I use a "Home-brew (16x50 UART compatible serial port)" / tty0
Reconfigure:


<syntaxhighlight lang=bash>
<syntaxhighlight lang=bash>
Line 24: Line 41:
</syntaxhighlight>
</syntaxhighlight>


== Remote interface ==
Remote interface:


<syntaxhighlight lang=bash>
<syntaxhighlight lang=bash>
Line 35: Line 52:
REMOTE_DEVICE="/dev/lirc0"
REMOTE_DEVICE="/dev/lirc0"
LOAD_MODULES="true"
LOAD_MODULES="true"
LIRC_SERIAL_PORT="0x03f8"
LIRC_SERIAL_PORT="0x03f8"
LIRC_SERIAL_IRQ="4"
LIRC_SERIAL_IRQ="4"
LIRC_SERIAL_CFLAGS=""
LIRC_SERIAL_CFLAGS=""
...
</syntaxhighlight>
</syntaxhighlight>
</blockquote>
</blockquote>


== Remote configuration ==
Setup serial port for use with LIRC:
 
<syntaxhighlight lang=bash>
sudo setserial /dev/ttyS0 uart none
</syntaxhighlight>


Find the conf-file to go with your specific remote on internet:
Restart LIRC services:


<syntaxhighlight lang=bash>
<syntaxhighlight lang=bash>
sudo gedit /etc/lirc/lircd.conf
sudo service lirc restart
</syntaxhighlight>
</syntaxhighlight>
Configure events, this file is used by the irexec daemon
Test raw remote output:


<syntaxhighlight lang=bash>
<syntaxhighlight lang=bash>
gedit ~/.lircrc
sudo mode2 --device=/dev/lirc0
</syntaxhighlight>
</syntaxhighlight>


3. Start LIRC services
Note: never have had the 'home brew' transmitter working.
 
== Mapping the signals to keys ==
 
Record buttons:


<syntaxhighlight lang=bash>
<syntaxhighlight lang=bash>
sudo service lirc restart
irrecord --list-namespace
sudo irrecord --disable-namespace --device=/dev/lirc0 lircremote.conf
</syntaxhighlight>
</syntaxhighlight>
 
irexec daemon added system -> preferences -> sessions:
Recording keys does not work very well, you better try to find the conf file for your remote on the internet and place its contents in '/etc/lirc/lircd.conf'.
 
* http://lirc.sourceforge.net/remotes/philips/


<syntaxhighlight lang=bash>
<syntaxhighlight lang=bash>
irexec -d
sudo gedit /etc/lirc/lircd.conf
</syntaxhighlight>
</syntaxhighlight>


4. Test:
Test remote keys pressed:
 
raw remote interface output:


<syntaxhighlight lang=bash>
<syntaxhighlight lang=bash>
sudo mode2 -d /dev/lirc0
sudo irw /dev/lircd
</syntaxhighlight>
</syntaxhighlight>


remote keys output:
== Configure commands ==
 
Configure events, this file is used by the irexec daemon:
 
<syntaxhighlight lang=bash>
<syntaxhighlight lang=bash>
sudo irw /dev/lircd
gedit ~/.lircrc
</syntaxhighlight>
</syntaxhighlight>


Note: never have had the receiver working, but I didnt need it either, record buttons:
Start irexec deamon, you could make this start automatically:


<syntaxhighlight lang=bash>
<syntaxhighlight lang=bash>
irrecord --list-namespace
irexec -d
sudo irrecord --disable-namespace --device=/dev/lirc0 lircremote.conf
</syntaxhighlight>
</syntaxhighlight>


5. Notifications
== Notifications ==
 
I use this for notifications with remote events.


<syntaxhighlight lang=bash>
sudo apt-get install libnotify-bin
sudo apt-get install libnotify-bin
</syntaxhighlight>
<syntaxhighlight lang=bash>
notify-send -t 6000 -i ~/Scripts/lirc.ico "Remote"
notify-send -t 6000 -i ~/Scripts/lirc.ico "Remote"
</syntaxhighlight>
== Problem with automatically starting at boot ==
Note: don't change anything if you don't have this problem


6. problem to start lirc at boot, modules load fine, daemon fails
Problem to start lirc at boot, modules load fine, daemon fails


<blockquote>
<syntaxhighlight lang=bash>
remote: lirc: starting LIRC modules [ok]  
remote: lirc: starting LIRC modules [ok]  
starting remote control daemon(s): LIRC Terminated [fail]
starting remote control daemon(s): LIRC Terminated [fail]
</syntaxhighlight>
</blockquote>


Added "sleep 1" directly after "modprobe":
Added "sleep 1" directly after "modprobe":
Line 103: Line 149:
</syntaxhighlight>
</syntaxhighlight>


Note: this was not needed for Urbuntu 11.04
== Example event script ==


== Script ==
Example ".lircrc":


#extract full list of VLC .lirc keys
Note: not all supporting scripts are provided.
vlc -H --advanced 2>&1 |sed -n '/--key/ {s/^\ *--//; s/^\(.*\) <[^>]*>\ *\(.*\)$/\2 -> \1/;h}; /^.*[^ ].*-> key/ p; /^ -> key/ { n; s/^[ \t\n]*//M; G; s/\n//; p}'
 
<syntaxhighlight lang=bash>
 
#
# Uses by irexec as daemon (irexec -d)
#
# - General mode can be found at the bottom.
# - To prevent execution within a mode AND the general section use "flags = quit"
# - run irw in a terminal and press your remote buttons to see what they are
# - in most software you need to enable the lirc remote plugin
#
# In this file:
# - banshee
# - vlc
# - totem
# - rhythmbox
# - general mode
 
 
# banshee - music player
 
begin banshee
begin
prog = irexec
button = dcc_start
config = banshee --toggle-playing
#config = banshee --pause
#config = banshee --play
        delay = 1000
end
begin
prog = irexec
button = dcc_stop
config = banshee --pause
#config = banshee --stop
end
 
begin
prog = irexec
button = dcc_track_down
config = banshee --previous
end
begin
prog = irexec
button = dcc_track_up
config = banshee --next
end
 
    begin
        prog  =    rhythmbox
        button =    power
        config =    quit
        flags  =    mode
    end
 
#20110925 there seems to be a bug so the following does not work
    begin
        prog = irexec
        button = dcc_right
        config = banshee --set-position=`banshee --query-position | sed 's/.*: /10+/'|bc`
    end
 
    begin
        prog = irexec
        button = dcc_left
        config = banshee --set-position=`banshee --query-position | sed 's/.*: /-10+/'|bc`
    end
 
#volume up
begin
        prog = irexec
        button = dcc_counter_reset
        config = banshee --set-volume=`banshee --query-volume | sed 's/.*: /10+/'|bc`
repeat = 0
end
#volume down
begin
        prog = irexec
        button = dcc_time
        config = banshee --set-volume=`banshee --query-volume | sed 's/.*: /-10+/'|bc`
repeat = 0
end
end banshee
 
 
# vlc - video player
#
# full list of VLC .lirc keys:
# vlc -H --advanced 2>&1 |sed -n '/--key/ {s/^\ *--//; s/^\(.*\) <[^>]*>\ *\(.*\)$/\2 -> \1/; h}; /^.*[^ ].*-> key/ p; /^ -> key/ { n; s/^[ \t\n]*//M; G; s/\n//; p}'
 
begin vlc
    begin
        prog = vlc
        remote = *
        button = dcc_start
        repeat = 1
        config = key-play-pause
        delay  = 1000
    end
 
    # key-position - shows where you are in the video
    begin
        prog = vlc
        remote = *
        button = dcc_stop
        repeat = 1
        config = key-position
    end
 
    begin
        prog = vlc
        remote = *
        button = dcc_right
        repeat = 1
        #config = key-jump+medium
        config = key-jump+short
    end
 
    begin
        prog = vlc
        remote = *
        button = dcc_left
        repeat = 1
        #config = key-jump-medium
        config = key-jump-short
    end
 
    begin
        prog = vlc
        remote = *
        button = dcc_track_up
        repeat = 1
        config = key-next
        delay  = 1000
    end
 
    begin
        prog = vlc
        remote = *
        button = dcc_track_down
        repeat = 1
        config = key-previous
        delay  = 1000
    end
 
    begin
        prog = vlc
        remote = *
        button = dcc_counter_reset
        repeat = 1
        config = key-vol-up
    end
 
    begin
        prog = vlc
        remote = *
        button = dcc_time
        repeat = 1
        config = key-vol-down
    end
 
    begin
        prog = vlc
        remote = *
        button = dcc_rec_mute
        repeat = 1
        config = key-toggle-fullscreen
        delay  = 1000
    end
 
    begin
        prog = vlc
        remote = *
        button = dcc_record
        repeat = 1
        config = key-quit
    end
 
    # Cycle aspect ratio
    begin
        prog = vlc
        remote = *
        button = dcc_append
        repeat = 1
        config = key-aspect-ratio
        delay  = 1000
    end
 
    # Subtitles
    begin
        prog = vlc
        remote = *
        button = dcc_start_mark
        repeat = 1
        config = key-subtitle-track
        delay  = 1000
    end
 
# Faster
begin
prog = vlc
button = <remotebutton>
repeat = 3
config = key-faster
end
 
# Slower
begin
prog = vlc
button = <remotebutton>
repeat = 3
config = key-slower
end
 
# Snapshots
begin
prog = vlc
button = <remotebutton>
repeat = 3
config = key-snapshot
end
 
# Audio Syncing
begin
prog = vlc
button = <remotebutton>
repeat = 3
config = key-audiodelay-up
end
 
# Audio Delay DOWN
begin
prog = vlc
button = <remotebutton>
repeat = 3
config = key-audiodelay-down
end
end vlc
 
# totem - video player
 
begin totem
    begin
        prog = totem
        remote = *
        button = dcc_start
        repeat = 1
        config = pause
        config = play
        delay  = 1000
    end
 
    begin
        prog = totem
        remote = *
        button = dcc_stop
        repeat = 1
        config = pause
    end
 
    begin
        prog = totem
        remote = *
        button = dcc_right
        repeat = 1
        config = seek_forward
    end
 
    begin
        prog = totem
        remote = *
        button = dcc_left
        repeat = 1
        config = seek_backward
    end
 
    begin
        prog = totem
        remote = *
        button = dcc_rec_mute
        repeat = 1
        config = fullscreen
        delay  = 1000
    end
 
    begin
        prog = totem
        remote = *
        button = dcc_counter_reset
        repeat = 1
        config = volume_up
    end
 
    begin
        prog = totem
        remote = *
        button = dcc_time
        repeat = 1
        config = volume_down
    end
 
    begin
        prog = totem
        remote = *
        button = dcc_track_up
        repeat = 1
        config = next
    end
 
    begin
        prog = totem
        remote = *
        button = dcc_track_up
        repeat = 1
        config = previous
    end
 
    begin
        prog = totem
        remote = *
        button = dcc_record
        repeat = 1
        config = quit
    end
end totem
 
# rhythmbox - audio player
 
begin rhythmbox
    begin
        prog  =    rhythmbox
        button =    power
        config =    quit
        flags  =    mode
    end
 
    begin
        prog = rhythmbox
        button = dcc_start
        config = play
        config = pause
        delay  = 1000
    end
 
    begin
        prog = rhythmbox
        button = dcc_stop
        config = pause
    end
 
    begin
        prog = rhythmbox
        button =
        config = stop
    end
 
    begin
        prog = rhythmbox
        button = dcc_counter_reset
        config = volume_up
        repeat = 3
    end
 
    begin
        prog = rhythmbox
        button = dcc_time
        config = volume_down
        repeat = 3
    end
    begin
        prog = rhythmbox
        button = dcc_track_up
        config = next
    end
 
    begin
        prog = rhythmbox
        button = dcc_track_down
        config = previous
    end
 
    begin
        prog = rhythmbox
        button =
        config = mute
    end
 
    begin
        prog = rhythmbox
        button =
        config = shuffle
    end
 
    begin
        prog = rhythmbox
        button =
        config = repeat
    end
 
    begin
        prog = rhythmbox
        button = dcc_right
        config = seek_forward
    end
 
    begin
        prog = rhythmbox
        button = dcc_left
        config = seek_backward
    end
end rhythmbox
 
 
# general mode
 
#mode
begin
prog = irexec
button = dcc_mode
config = ~/Scripts/lirc/lirc-menu.sh &
end
 
 
#0
begin
prog = irexec
button = dcc_0
config = ~/Scripts/lirc/lirc-mode-0-*.sh &
#mode=unchanged
end
 
#1
begin
prog = irexec
button = dcc_1
config = ~/Scripts/lirc/lirc-mode-1-*.sh &
#mode = banshee
mode = rhythmbox
end
 
#2
begin
prog = irexec
button = dcc_2
config = ~/Scripts/lirc/lirc-mode-2-*.sh &
mode = totem
end
 
#3
begin
prog = irexec
button = dcc_3
config =  ~/Scripts/lirc/lirc-mode-3-*.sh &
mode = vlc
end
 
#4 toggle media server
begin
prog = irexec
button = dcc_4
config =  ~/Scripts/lirc/lirc-mode-4-*.sh &
#mode=unchanged
end
 
#5 toggle remote desktop
begin
prog = irexec
button = dcc_5
config =  ~/Scripts/lirc/lirc-mode-5-*.sh &
#mode=unchanged
end
 
#6 random quote
begin
prog = irexec
button = dcc_6
config =  ~/Scripts/lirc/lirc-mode-6-*.sh &
#mode=unchanged
end
 
#7 monitor off
begin
prog = irexec
button = dcc_7
config = ~/Scripts/lirc/lirc-mode-7-*.sh &
#mode=unchanged
end
 
#8 rsync backup notify
begin
prog = irexec
button = dcc_8
config = ~/Scripts/lirc/lirc-mode-8-*.sh &
#mode=unchanged
end
 
#9 toggle metacity
begin
prog = irexec
button = dcc_9
config = ~/Scripts/lirc/lirc-mode-9-*.sh &
#mode=unchanged
end
</syntaxhighlight>

Latest revision as of 08:21, 16 August 2014


Sources

Install

sudo apt-get install lirc

Important files:

  • /etc/init.d/lirc #loads module and starts deamon
  • /dev/lirc0 #lirc device
  • /etc/lirc/hardware.conf #lirc device configuration
  • /etc/lirc/lircd.conf #lirc remote configuration
  • ~\.lircrc #lirc configuration of actions for vlc, totem etc

Configure

I use a "Home-brew (16x50 UART compatible serial port)" / tty0

For lower voltages on serial port (like laptop):

home brew ir receiver schematic laptop

Best performance schematic:

home brew ir receiver schematic

Reconfigure:

sudo dpkg-reconfigure lirc

Remote interface:

sudo gedit /etc/lirc/hardware.conf
REMOTE_MODULES="lirc_dev lirc_serial"
REMOTE_DEVICE="/dev/lirc0"
LOAD_MODULES="true"

LIRC_SERIAL_PORT="0x03f8"
LIRC_SERIAL_IRQ="4"
LIRC_SERIAL_CFLAGS=""

...

Setup serial port for use with LIRC:

sudo setserial /dev/ttyS0 uart none

Restart LIRC services:

sudo service lirc restart

Test raw remote output:

sudo mode2 --device=/dev/lirc0

Note: never have had the 'home brew' transmitter working.

Mapping the signals to keys

Record buttons:

irrecord --list-namespace
sudo irrecord --disable-namespace --device=/dev/lirc0 lircremote.conf

Recording keys does not work very well, you better try to find the conf file for your remote on the internet and place its contents in '/etc/lirc/lircd.conf'.

sudo gedit /etc/lirc/lircd.conf

Test remote keys pressed:

sudo irw /dev/lircd

Configure commands

Configure events, this file is used by the irexec daemon:

gedit ~/.lircrc

Start irexec deamon, you could make this start automatically:

irexec -d

Notifications

I use this for notifications with remote events.

sudo apt-get install libnotify-bin
notify-send -t 6000 -i ~/Scripts/lirc.ico "Remote"

Problem with automatically starting at boot

Note: don't change anything if you don't have this problem

Problem to start lirc at boot, modules load fine, daemon fails

remote: lirc: starting LIRC modules [ok] 
starting remote control daemon(s): LIRC Terminated [fail]

Added "sleep 1" directly after "modprobe":

sudo gedit /etc/init.d/lirc

Example event script

Example ".lircrc":

Note: not all supporting scripts are provided.


#
# Uses by irexec as daemon (irexec -d)
#
# - General mode can be found at the bottom.
# - To prevent execution within a mode AND the general section use "flags = quit"
# - run irw in a terminal and press your remote buttons to see what they are
# - in most software you need to enable the lirc remote plugin
#
# In this file:
# - banshee
# - vlc
# - totem
# - rhythmbox
# - general mode


# banshee - music player

begin banshee
	begin
		prog = irexec
		button = dcc_start
		config = banshee --toggle-playing
		#config = banshee --pause
		#config = banshee --play
        delay = 1000
	end
	 
	begin
		prog = irexec
		button = dcc_stop
		config = banshee --pause
		#config = banshee --stop
	end

	begin
		prog = irexec
		button = dcc_track_down
		config = banshee --previous
	end
	 
	begin
		prog = irexec
		button = dcc_track_up
		config = banshee --next
	end

    begin
        prog   =    rhythmbox
        button =    power
        config =    quit
        flags  =    mode
    end

	#20110925 there seems to be a bug so the following does not work
    begin
        prog = irexec
        button = dcc_right
        config = banshee --set-position=`banshee --query-position | sed 's/.*: /10+/'|bc`
    end

    begin
        prog = irexec
        button = dcc_left
        config = banshee --set-position=`banshee --query-position | sed 's/.*: /-10+/'|bc`
    end

	#volume up
	begin
        prog = irexec
        button = dcc_counter_reset
        config = banshee --set-volume=`banshee --query-volume | sed 's/.*: /10+/'|bc`
		repeat = 0
	end
	
	#volume down
	begin
        prog = irexec
        button = dcc_time
        config = banshee --set-volume=`banshee --query-volume | sed 's/.*: /-10+/'|bc`
		repeat = 0
	end
end banshee


# vlc - video player
#
# full list of VLC .lirc keys:
# vlc -H --advanced 2>&1 |sed -n '/--key/ {s/^\ *--//; s/^\(.*\) <[^>]*>\ *\(.*\)$/\2 -> \1/; h}; /^.*[^ ].*-> key/ p; /^ -> key/ { n; s/^[ \t\n]*//M; G; s/\n//; p}'

begin vlc
    begin
        prog = vlc
        remote = *
        button = dcc_start
        repeat = 1
        config = key-play-pause
        delay  = 1000
    end

    # key-position - shows where you are in the video
    begin
        prog = vlc
        remote = *
        button = dcc_stop
        repeat = 1
        config = key-position
    end

    begin
        prog = vlc
        remote = *
        button = dcc_right
        repeat = 1
        #config = key-jump+medium
        config = key-jump+short
    end

    begin
        prog = vlc
        remote = *
        button = dcc_left
        repeat = 1
        #config = key-jump-medium
        config = key-jump-short
    end

    begin
        prog = vlc
        remote = *
        button = dcc_track_up
        repeat = 1
        config = key-next
        delay  = 1000
    end

    begin
        prog = vlc
        remote = *
        button = dcc_track_down
        repeat = 1
        config = key-previous
        delay  = 1000
    end

    begin
        prog = vlc
        remote = *
        button = dcc_counter_reset
        repeat = 1
        config = key-vol-up
    end

    begin
        prog = vlc
        remote = *
        button = dcc_time
        repeat = 1
        config = key-vol-down
    end

    begin
        prog = vlc
        remote = *
        button = dcc_rec_mute
        repeat = 1
        config = key-toggle-fullscreen
        delay  = 1000
    end

    begin
        prog = vlc
        remote = *
        button = dcc_record
        repeat = 1
        config = key-quit
    end

    # Cycle aspect ratio
    begin
        prog = vlc
        remote = *
        button = dcc_append
        repeat = 1
        config = key-aspect-ratio
        delay  = 1000
    end

    # Subtitles
    begin
        prog = vlc
        remote = *
        button = dcc_start_mark
        repeat = 1
        config = key-subtitle-track
        delay  = 1000
    end

	# Faster
	begin
		prog = vlc
		button = <remotebutton>
		repeat = 3
		config = key-faster
	end

	# Slower
	begin
		prog = vlc
		button = <remotebutton>
		repeat = 3
		config = key-slower
	end

	# Snapshots
	begin
		prog = vlc
		button = <remotebutton>
		repeat = 3
		config = key-snapshot
	end

	# Audio Syncing
	begin
		prog = vlc
		button = <remotebutton>
		repeat = 3
		config = key-audiodelay-up
	end

	# Audio Delay DOWN
	begin
		prog = vlc
		button = <remotebutton>
		repeat = 3
		config = key-audiodelay-down
	end
 
end vlc

# totem - video player

begin totem
    begin
        prog = totem
        remote = *
        button = dcc_start
        repeat = 1
        config = pause
        config = play
        delay  = 1000
    end

    begin
        prog = totem
        remote = *
        button = dcc_stop
        repeat = 1
        config = pause
    end

    begin
        prog = totem
        remote = *
        button = dcc_right
        repeat = 1
        config = seek_forward
    end

    begin
        prog = totem
        remote = *
        button = dcc_left
        repeat = 1
        config = seek_backward
    end

    begin
        prog = totem
        remote = *
        button = dcc_rec_mute
        repeat = 1
        config = fullscreen
        delay  = 1000
    end

    begin
        prog = totem
        remote = *
        button = dcc_counter_reset
        repeat = 1
        config = volume_up
    end

    begin
        prog = totem
        remote = *
        button = dcc_time
        repeat = 1
        config = volume_down
    end

    begin
        prog = totem
        remote = *
        button = dcc_track_up
        repeat = 1
        config = next
    end

    begin
        prog = totem
        remote = *
        button = dcc_track_up
        repeat = 1
        config = previous
    end

    begin
        prog = totem
        remote = *
        button = dcc_record
        repeat = 1
        config = quit
    end
end totem

# rhythmbox - audio player

begin rhythmbox
    begin
        prog   =    rhythmbox
        button =    power
        config =    quit
        flags  =    mode
    end

    begin
        prog = rhythmbox
        button = dcc_start
        config = play
        config = pause
        delay  = 1000
    end

    begin
        prog = rhythmbox
        button = dcc_stop
        config = pause
    end

    begin
        prog = rhythmbox
        button = 
        config = stop
    end

    begin
        prog = rhythmbox
        button = dcc_counter_reset
        config = volume_up
        repeat = 3
    end

    begin
        prog = rhythmbox
        button = dcc_time
        config = volume_down
        repeat = 3
    end
    begin
        prog = rhythmbox
        button = dcc_track_up
        config = next
    end

    begin
        prog = rhythmbox
        button = dcc_track_down
        config = previous
    end

    begin
        prog = rhythmbox
        button = 
        config = mute
    end

    begin
        prog = rhythmbox
        button = 
        config = shuffle
    end

    begin
        prog = rhythmbox
        button = 
        config = repeat
    end

    begin
        prog = rhythmbox
        button = dcc_right
        config = seek_forward
    end

    begin
        prog = rhythmbox
        button = dcc_left
        config = seek_backward
    end
end rhythmbox


# general mode

#mode
begin
	prog = irexec
	button = dcc_mode
	config = ~/Scripts/lirc/lirc-menu.sh &
end


#0
begin
	prog = irexec
	button = dcc_0
	config = ~/Scripts/lirc/lirc-mode-0-*.sh &
	#mode=unchanged
end

#1
begin
	prog = irexec
	button = dcc_1
	config = ~/Scripts/lirc/lirc-mode-1-*.sh &
	#mode = banshee
	mode = rhythmbox
end

#2
begin
	prog = irexec
	button = dcc_2
	config = ~/Scripts/lirc/lirc-mode-2-*.sh &
	mode = totem
end

#3
begin
	prog = irexec
	button = dcc_3
	config =  ~/Scripts/lirc/lirc-mode-3-*.sh &
	mode = vlc
end

#4 toggle media server
begin
	prog = irexec
	button = dcc_4
	config =  ~/Scripts/lirc/lirc-mode-4-*.sh &
	#mode=unchanged
end

#5 toggle remote desktop
begin
	prog = irexec
	button = dcc_5
	config =  ~/Scripts/lirc/lirc-mode-5-*.sh &
	#mode=unchanged
end

#6 random quote
begin
	prog = irexec
	button = dcc_6
	config =  ~/Scripts/lirc/lirc-mode-6-*.sh &
	#mode=unchanged
end

#7 monitor off
begin
	prog = irexec
	button = dcc_7
	config = ~/Scripts/lirc/lirc-mode-7-*.sh &
	#mode=unchanged
end 

#8 rsync backup notify
begin
	prog = irexec
	button = dcc_8
	config = ~/Scripts/lirc/lirc-mode-8-*.sh &
	#mode=unchanged
end

#9 toggle metacity
begin
	prog = irexec
	button = dcc_9
	config = ~/Scripts/lirc/lirc-mode-9-*.sh &
	#mode=unchanged
end