1Macros
2 The default plugin supports 9 Macros. Since lineakd 0.7 macros can also
3 take one or more arguments.
4
5 Macro definitions are as follows.
6
7 For the EAK_MUTE,EAK_PCM_MUTE macro. We have three forms that are acceptible.
8
9 EAK_MUTE, EAK_PCM_MUTE
10 This is the default and original macro form. In this form you
11 require a directive in your config file in order for the macro
12 to know which mixer device to adjust. e.g. MixerDevice =
13 /dev/mixer
14
15 EAK_MUTE(X), EAK_PCM_MUTE(X)
16 Here X is a number. The number is a volume to mute to. Currently
17 this needs revisiting. If the number is too low it will merely
18 change the balance. I suggest a value around 10000. I will fix
19 this later so that it's a relative value from the minimum. In
20 this form you require a directive in your config file in order
21 for the macro to know which mixer device to adjust. e.g. Mix-
22 erDevice = /dev/mixer
23
24 EAK_MUTE(X,device,X2,device2,X3,device3,...)
25 EAK_PCM_MUTE(X,device,X2,device2,X3,device3,...)
26 X is a volume to mute to, and device is a string name of a mixer
27 device (e.g. "/dev/mixer" to mute to. As with the previous
28 macro, you will have to experiment with a good value.
29
30 For the EAK_VOLUP, EAK_PCM_UP and EAK_VOLDOWN, EAK_PCM_DOWN macros.
31 Each have the following three forms.
32
33 EAK_VOLUP, EAK_PCM_UP or EAK_VOLDOWN, EAK_PCM_DOWN
34 Increment or decrement the sound by the default amount. In this
35 form you require a directive in your config file such as: Mix-
36 erDevice = /dev/mixer in order for the macro to know which mixer
37 device to adjust.
38
39 EAK_VOLUP(X), EAK_PCM_UP(X) or EAK_VOLDOWN(X), EAK_PCM_DOWN(X)
40 Increment or decrement the sound by X. This value is best used
41 between 1 and 5, and the sound modification code scales the
42 value, unlike the MUTE macro. In this form you require a direc-
43 tive in your config file such as: MixerDevice = /dev/mixer in
44 order for the macro to know which mixer device to adjust.
45
46 EAK_VOLUP(X,device,X2,device2,X3,device3,...)
47 EAK_PCM_UP(X,device,X2,device2,X3,device3,...)
48 EAK_VOLDOWN(X,device,X2,device2,X3,device3,...)
49 EAK_PCM_DOWN(X,device,X2,device2,X3,device3,...)
50 X is the volume to adjust the following device by. Like the pre-
51 vious form of this macro, a value of 1-5 is best.
52
53 For the EAK_EJECT macros. There are two forms.
54
55 EAK_EJECT
56 This is the default macro. It will eject the device defined in
57 your config file as: CdromDevice = /dev/cdrom
58
59 EAK_EJECT(device1,device2,device3,...)
60 This macro form allows you to choose the device to eject. You
61 can have a list of one or more devices separated by a comma.
62
63 For the EAK_SLEEP macro. It currently does nothing. In the future I
64 will probably use it to invoke software suspend.
65
66 EAK_SENDKEYS("<options>") || EAK_SENDKEYS_ROOT("<options>")
67 <options> := <modifers>+<character>
68 <modifiers> := <modifier>[+<modifier>]
69 <character> := A single alphanumeric character, (i.e. 0-9 or a-z) or
70 an arrow key (Right, Left, Up, Down) or other printible character.
71 <modifier> := A modifier such as shift, control or alt.
72
73 For example: "shift+a" or "control+shift+f"
74
75 These macros allows you to send events to X. EAK_SENDKEYS sends the keys
76 to the current input window. EAK_SENDKEYS_ROOT sends the keys to the ROOT
77 window.
78
79 You can send a single character,
80 such as a,b or c, or you can send combinations of keys. If you send key
81 combinations, all of the previous keys must be modifiers such as shift,
82 control or alt. All modifiers must precede the character you wish to send.
83
84 More Examples:
85
86 To send the '$' key, your options would be:
87 "shift+4"
88
89 To and alt+tab combination, your options would be:
90 "alt+Tab"
91
92 To send a capital a 'A', your options would be:
93 "shift+a"
94
95 EAK_MEDIADETECT(COMMAND)
96 This macro allows you to use the media detect plugin to run
97 one of the supported commands. This plugins requires that you
98 have a configuration file in your ~/.lineak directory called
99 media-detect.conf
100
101 Valid commands are:
102 PLAY
103 STOP
104 PAUSE
105 PLAYPAUSE
106 NEXT
107 PREVIOUS
108 See the media-detect.conf file below.
109
110#############################################################################
111# Media Detect configuration file.
112#
113# The Media Detect lineak plugin is inspired by the Media-Detect scripts
114# created by Daemon Kaswell, and is copyright the lineak project and
115# Sheldon Lee-Wen October 22, 2004.
116#
117# Each entry in this configuration file must adhere to the format
118# given below. The entries are case sensitive.
119#
120# [IDENTIFIER]
121# NAME = This is a plain text description of the program.
122# PROGRAM = This is the command line name of the program. It will be
123# used to run the program or as the dcop identifier.
124# The following commands are those used to issue to the program identified in
125# the PROGRAM configuration directive above. The entries for the commands will
126# vary depending on the type given under the TYPE directive.
127# For TYPE = macro, these are the macros hat you want to be run for each command.
128# For TYPE = dcop, these are the actual dcop command minus the dcop <program> part.
129# For TYPE = program, the command is whatever options would be given to the
130# program PROGRAM on the command line to produce the desired effect.
131#
132# PLAY =
133# STOP =
134# PAUSE =
135# PLAYPAUSE =
136# NEXT =
137# PREVIOUS =
138# TYPE = This is the entry type. There are three valid types. macro, dcop or
139# program.
140# PRIORITY = This is the priority to be given to this entry if there is more
141# than one of the configured programs running. If two entries
142# with the same priority are found the first one found running
143# will be selected.
144# [END]
145#
146# The following entries are examples of each type.
147
148[AMAROK]
149 NAME = Amarok Media Player
150 PROGRAM = amarok
151 PLAY = AMAROK_PLAY
152 STOP = AMAROK_STOP
153 PAUSE = AMAROK_PAUSE
154 PLAYPAUSE = AMAROK_PLAYPAUSE
155 NEXT = AMAROK_FORWARD
156 PREVIOUS = AMAROK_BACK
157 TYPE = macro
158 PRIORITY = 1
159[END]
160
161[JUK]
162 NAME = Juk Media Player
163 PROGRAM = juk
164 PLAY = Player play
165 STOP = Player stop
166 PAUSE = Player pause
167 PLAYPAUSE = Player playPause
168 NEXT = Player forward
169 PREVIOUS = Player back
170 TYPE = dcop
171 PRIORITY = 2
172[END]
173
174[XMMS]
175 NAME = X Multi Media System
176 PROGRAM = xmms
177 PLAY = --play
178 STOP = --stop
179 PAUSE = --pause
180 PLAYPAUSE = --play-pause
181 NEXT = --fwd
182 PREVIOUS = --rew
183 TYPE = program
184 PRIORITY = 3
185[END]
186
187