This file is indexed.

/usr/share/anyremote/cfg-data/Server-mode/qmmp.cfg is in anyremote-data 6.3.2-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
%
% anyremote configuration file for qmmp/KDE4 management. (Server-mode)
%

% STATUS nonstable
% XTEST no
% SOUND app/amixer
% ENV no
% DEF_PLAYER   
% ALL_IN_ONE
% MEDIACENTER audio
% TODO Wait MPRIS v2.0 to support playlist operations (v1 do not allow to select track in playlist)

GuiAppName=QMMP
GuiAppBinary=qmmp
GuiAppRun= A=`ps -ef|grep qmmp|grep -v grep`; if [ "x$A" = "x" ]; then echo NOK; else echo OK; fi
GuiAppIcon=qmmp.png
GuiAppType=Application
GuiAppProtocols=Server
GuiAppDesc=QMMP is an audio-player, written with help of Qt library. The user interface is similar to winamp or xmms. It is suggested to activate MPRIS module for more comprehensive control.

[Protocol]=Server

(Init)=\
	Include($(CfgDir)/Utils/aliases-server.cfg);\
	Macro(SETUP_DEFAULT_MIXER);\
	Make(var,player_name,by_value,QMMP);\
	Include($(CfgDir)/Utils/aliases-server-player.cfg);\
	Make(var,cover_size,by_value,);\
	Make(var,qmmp_mpris,by_value,NOMPRIS);\
	Make(var,qmmp_layout,\
	     V=`$(CfgDir)/Utils/registry.sh $(TmpDir) get qmmp_layout`;\
	     if [ "x$V" = "x" ]; then echo "3x4"; else echo $V; fi);

(Exit)=\
	Exec($(CfgDir)/Utils/registry.sh $(TmpDir) set qmmp_layout $(qmmp_layout));

(Connect)=\
	Make(mode,qmmp_$(qmmp_layout));

[Mode]=qmmp_general

VOL_DOWN=\
	Exec(qmmp --volume-dec)

TOGGLE_MUTE=\
	Macro(TOGGLE_MUTE_$(qmmp_mpris));

VOL_UP=\
	Exec(qmmp --volume-inc)

RWD=\
	Macro(RWD_$(qmmp_mpris));

PLAY=\
	Macro(PLAY_$(qmmp_mpris));

FF=\
	Macro(FF_$(qmmp_mpris));

PREV=\
	Macro(PREV_$(qmmp_mpris));

NEXT=\
	Macro(NEXT_$(qmmp_mpris));

STOP=\
	Macro(STOP_$(qmmp_mpris));

PAUSE=\
	Macro(PAUSE_$(qmmp_mpris));

APP_QUIT=\
	Macro(QUIT_$(qmmp_mpris));

QMMP_TIMER_START=\
	Macro(QMMP_TITLE);\
	Timer(QMMP_TITLE,$(UpdateTimeout),0);
	
QMMP_TIMER_CANCEL=\
	Timer(QMMP_TITLE,cancel);\
	Set(title,);\
	Set(status,);

%
% MPRIS versions
%

% VolumeGet add \n to value. Use some tricks to strip it
TOGGLE_MUTE_MPRIS=\
	Make(var,qmmp_volume,\
                if [ "x$(qmmp_volume)" = "x-1" ] || [ "x$(qmmp_volume)" = "x" ]; \
		then \
		     qdbus org.mpris.qmmp /Player VolumeGet;qdbus org.mpris.qmmp /Player VolumeSet 0; \
		else \
		     qdbus org.mpris.qmmp /Player VolumeSet $(qmmp_volume); echo "-1"; fi);\
	Make(var,qmmp_volume,echo "$(qmmp_volume) an-trick-to-strip-new-line"|tr -d '\n'|cut -f 1 -d ' ');

RWD_MPRIS=\
	Macro(QMMP_POS);\
        Make(var,qmmp_pos,echo "$(qmmp_pos)-10000"|bc);\
        Exec(qdbus org.mpris.qmmp /Player PositionSet $(qmmp_pos)  2> /dev/null);\
	Macro(QMMP_SETTITLE);

PLAY_ONLY_MPRIS=\
	Exec(qdbus org.mpris.MediaPlayer2.qmmp /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause);

PLAY_MPRIS=\
	Macro(PLAY_ONLY_MPRIS);\
	Macro(QMMP_TIMER_START);

FF_MPRIS=\
	Macro(QMMP_POS);\
        Make(var,qmmp_pos,echo "$(qmmp_pos)+10000"|bc);\
        Exec(qdbus org.mpris.qmmp /Player PositionSet $(qmmp_pos)  2> /dev/null);\
	Macro(QMMP_SETTITLE);

PREV_MPRIS=\
	Exec(qdbus org.mpris.MediaPlayer2.qmmp /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous);\
	Macro(QMMP_SETTITLE);

PAUSE_MPRIS=\
	Exec(qdbus org.mpris.MediaPlayer2.qmmp /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Pause);\
	Macro(QMMP_SETTITLE);

NEXT_MPRIS=\
	Exec(qdbus org.mpris.MediaPlayer2.qmmp /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next);\
	Macro(QMMP_SETTITLE);

STOP_MPRIS=\
	Macro(QMMP_TIMER_CANCEL);\
	Exec(qdbus org.mpris.MediaPlayer2.qmmp /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop);

QUIT_MPRIS=\
	Macro(QMMP_TIMER_CANCEL);\
	Exec(qdbus org.mpris.MediaPlayer2.qmmp /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Quit);
%
% NO-MPRIS versions
%

TOGGLE_MUTE_NOMPRIS=\
	Macro(DEFAULT_TOGGLE_MUTE)

RWD_NOMPRIS=\
	Exec(qmmp --previous > /dev/null);
	
PLAY_NOMPRIS=\
	Exec(qmmp --play-pause > /dev/null);
	
FF_NOMPRIS=\
	Exec(qmmp --next > /dev/null);

PREV_NOMPRIS=\
	Exec(qmmp --previous > /dev/null);

PAUSE_NOMPRIS=\
	Exec(qmmp --pause > /dev/null);

NEXT_NOMPRIS=\
	Exec(qmmp --next > /dev/null);

STOP_NOMPRIS=\
	Exec(qmmp --stop > /dev/null);

QUIT_NOMPRIS=\
	Macro(QMMP_TIMER_CANCEL);\
	Exec(killall qmmp > /dev/null);
%
%
%
QMMP_POS=\
	Make(var,qmmp_pos,qdbus org.mpris.qmmp /Player PositionGet 2> /dev/null);

QMMP_TITLE_GENERAL=\
	Make(var,artist,TN=`qdbus org.mpris.qmmp /TrackList GetCurrentTrack  2> /dev/null`; \
	                if [ "x$TN" != "x" ]; then qdbus org.mpris.qmmp /TrackList GetMetadata $TN|grep artist|cut -f 2 -d ":"; fi);\
	Make(var,title,TN=`qdbus org.mpris.qmmp /TrackList GetCurrentTrack  2> /dev/null`; \
	               if [ "x$TN" != "x" ]; then qdbus org.mpris.qmmp /TrackList GetMetadata $TN|grep title|cut -f 2 -d ":"; fi);\
	Set(title,$(artist) - $(title));

%	Make(var,album,TN=`qdbus org.mpris.qmmp /TrackList GetCurrentTrack`; \
%                      if [ "x$P" != "x" ]; then qdbus org.mpris.qmmp /TrackList GetMetadata $TN|grep album|cut -f 2 -d ":"; fi);\
%

RUN_IF_NEED=\
	Exec($(CfgDir)/Utils/run-or-switch-to.sh qmmp);

RUN_OR_QUIT=\
	Exec(A=`ps -ef|grep qmmp|grep -v grep|grep -v edit`; \
	     if [ "x$A" = "x" ]; then qmmp& else killall qmmp; fi);\
	Macro(QMMP_TIMER_CANCEL);

Playlist=\
	Make(mode,qmmp_playlist);

Repeat=\
	Make(mode,qmmp_repeat);

Random=\
	Make(mode,qmmp_random);

APP_PLAY_STATUS=\
	Make(var,qmmp_status,qdbus --literal org.mpris.MediaPlayer2.qmmp /Player org.freedesktop.MediaPlayer.GetStatus|tr -d ','|tr -s ' '|cut -f 3 -d ' ');\
	Make(var,app_status,if [ "x$(qmmp_status)" = "x0" ]; then echo playing; else echo paused; fi);

Layout 3x4=\
	Make(mode,qmmp_3x4);

Layout 7x1=\
	Make(mode,qmmp_7x1);

Layout 5x1=\
	Make(mode,qmmp_5x1);

[ModeEnd]

[Mode]=qmmp_3x4 : qmmp_general,default_player

(EnterMode)=\
	Macro(APP_PRE_SETUP);\
	Macro(SETUP_DEFAULT_POWER_MANAGEMENT);\
	Macro(RUN_IF_NEED);\
	Macro(SETUP_QMMP_PLAYER_$(qmmp_mpris));\
	Macro(APP_MENU);\
	Macro(APP_POST_SETUP);

SETUP_QMMP_PLAYER_MPRIS=\
	Macro(SETUP_DEFAULT_PLAYER);

SETUP_QMMP_PLAYER_NOMPRIS=\
	Macro(SETUP_DEFAULT_PLAYER_NO_FF_FWD);

* *=Macro(QMMP_HELP_$(qmmp_mpris));

QMMP_HELP_MPRIS=\
	Macro(DEFAULT_HELP);

QMMP_HELP_NOMPRIS=\
        Set(text,replace,Help,1 Vol-\n2 Mute\n3 Vol+\n5 Play\n7 Prew\n8 Stop\n9 Next\n* * Help\n* # Run/Quit $(player_name)\n0 Pause\n# Quit $(player_name)\nPlease enable MPRIS plugin to support advanced features)
	
% PowerMgmt by Utils/aliases-server.cfg
APP_MENU=\
	Macro(APP_MENU_$(qmmp_mpris));

APP_MENU_NOMPRIS=\
	Set(menu,replace,PowerMgmt);\
	Macro(ALLIN1MENU);\
	Macro(MEDIACENTER_MENU);

APP_MENU_MPRIS=\
	Set(menu,replace,Playlist,Repeat,Random,Layout 5x1,Layout 7x1,PowerMgmt);\
	Macro(ALLIN1MENU);\
	Macro(MEDIACENTER_MENU);

APP_POST_SETUP=\
	Make(var,qmmp_layout,by_value,3x4);\
	Make(var,qmmp_volume,by_value,-1);\
	Timer(QMMP_CHECK_MPRIS,5,6);\
	Macro(QMMP_CHECK_MPRIS);

% Run check every 5 seconds for 6 times
QMMP_CHECK_MPRIS=\
        Make(var,qmmp_use_mpris,Q=`qdbus|grep org.mpris.qmmp`;if [ "x$Q" = "x" ]; then echo QMMP_DONTUSE_MPRIS; else echo QMMP_USE_MPRIS; fi);\
	Macro($(qmmp_use_mpris));

%
% Switch to use MPRIS version
%		
QMMP_USE_MPRIS=\
	Make(var,qmmp_mpris,by_value,MPRIS);\
	Timer(QMMP_CHECK_MPRIS,cancel);\
	Macro(SETUP_QMMP_PLAYER_MPRIS);\
	Macro(APP_MENU_MPRIS);

QMMP_DONTUSE_MPRIS=\
	Make(none);

QMMP_TITLE=\
	Macro(QMMP_TITLE_GENERAL);

[ModeEnd]

[Mode]=qmmp_cover

QMMP_TITLE=\
	Macro(QMMP_TITLE_GENERAL);\
	Macro(APP_COVER, if [ "x$(cover_size)" = "x" ]; then echo 1; else echo 0; fi);

APP_COVER=\
	Make(var,media_file,qdbus org.mpris.MediaPlayer2.qmmp /Player org.freedesktop.MediaPlayer.GetMetadata|grep 'location: file'|sed "s/.*\/\/\//\//;s/'/'\\\''/g;s/\//\'\/\'/g;s/$/\'/g;s/^'\//\//");\
	Macro(DEFAULT_COVER);

Mute=\
	Macro(TOGGLE_MUTE_MPRIS);

[ModeEnd]

% Use this layout only if MPRIS plugin is on in QMMP
[Mode]=qmmp_7x1 : qmmp_general,qmmp_cover,default_player_7x1

APP_MENU=\
	Set(menu,replace,Playlist,Mute,Next Cover,Previous Cover,Update Cover,Layout 3x4,Layout 5x1,Help,PowerMgmt);\
	Macro(ALLIN1MENU);\
	Macro(MEDIACENTER_MENU);

APP_POST_SETUP=\
	Make(var,qmmp_layout,by_value,7x1);

[ModeEnd]

% Use this layout only if MPRIS plugin is on in QMMP
[Mode]=qmmp_5x1 : qmmp_general,qmmp_cover,default_player_5x1

APP_MENU=\
	Set(menu,replace,Playlist,Mute,Next Cover,Previous Cover,Update Cover,Layout 3x4,Layout 7x1,Help,PowerMgmt);\
	Macro(ALLIN1MENU);\
	Macro(MEDIACENTER_MENU);

APP_POST_SETUP=\
	Make(var,qmmp_layout,by_value,5x1);

APP_TITLE=\
	Macro(QMMP_TITLE);

PLAY=\
	Macro(PLAY_ONLY_MPRIS);

[ModeEnd]

[Mode]=qmmp_playlist

% Found no way to choose track from playlist -- MPRIS support seems to be incompete

(EnterMode)=\
	ExecAndSet(list,replace,Playlist,$(CfgDir)/Utils/getPlayList.sh org.mpris.qmmp);\
  	ExecAndSet(list,select,expr 1 + `qdbus org.mpris.qmmp  /TrackList GetCurrentTrack`);
	
%	Set(menu,replace,Choose);
	
Push($$)=\
	Macro(Choose($$));
	
Choose($$)=\
	Exec(dbus-send --type=signal --dest=org.mpris.MediaPlayer2.qmmp /TrackList org.freedesktop.MediaPlayer.TrackListChange int32:$(Index));\
	Macro(APP_MENU);

Back($$)=\
	Set(list,close);\
	Make(mode,qmmp_$(qmmp_layout));

[ModeEnd]

[Mode]=qmmp_repeat

(EnterMode)=\
	Set(list,replace,Repeat,Yes,No);\
	Set(menu,replace,Choose);

Back($$)=\
	Set(list,close);\
	Make(mode,qmmp_$(qmmp_layout));
	
Push($$)=\
	Macro(Choose($$));
	
Choose($$)=\
	Exec(qdbus org.mpris.qmmp /TrackList SetLoop `echo $(Param)|sed 's/Yes/true/;s/No/false/'`);\
	Set(list,close);\
	Make(mode,qmmp_$(qmmp_layout));

[ModeEnd]

[Mode]=qmmp_random

(EnterMode)=\
	Set(list,replace,Random,Yes,No);\
	Set(menu,replace,Choose);

Back($$)=\
	Set(list,close);\
	Make(mode,qmmp_$(qmmp_layout));
	
Push($$)=\
	Macro(Choose($$));
	
Choose($$)=\
	Exec(qdbus org.mpris.qmmp /TrackList SetRandom `echo $(Param)|sed 's/Yes/true/;s/No/false/'`);\
	Set(list,close);\
	Make(mode,qmmp_$(qmmp_layout));

[ModeEnd]

%

%qdbus --literal org.mpris.MediaPlayer2.qmmp /Player  org.freedesktop.MediaPlayer.GetStatus
%dbus-send --type=signal --dest=org.mpris.MediaPlayer2.qmmp /TrackList org.freedesktop.MediaPlayer.TrackListChange int32:1

[End]