This file is indexed.

/usr/share/anyremote/cfg-data/Server-mode/mpris.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
%
% anyremote configuration file for management of MPRIS-compatible players. (Server-mode)
%

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

GuiAppName=MPRIS
GuiAppBinary=true
GuiAppType=Application
GuiAppProtocols=Server
GuiAppDesc=Manage appliucation through MPRIS (Media Player Remote Interfacing Specification)
[Protocol]=Server

(Init)=\
	Include($(CfgDir)/Utils/aliases-server.cfg);\
	Macro(SETUP_DEFAULT_MIXER);\
	Macro(SETUP_DEFAULT_POWER_MANAGEMENT);\
	Macro(TEST_QDBUS);\
	Make(var,mpris_volume,by_value,-1);\
	Make(var,mpris_app,by_value,---);

(Connect)=\
	Make(mode,mpris);

[Mode]=mpris

(EnterMode)=\
	Set(layout,default);\
	Set(status,$(mpris_app));\
	Set(icons,MPRIS,1,vol_down,2,mute,3,vol_up,4,rewind,5,play,6,forward,7,prev,8,pause,9,next,*,question,0,stop,#,no);\
	Macro(MPRIS_MENU);

Cancel=\
    Make(exit);

MPRIS_MENU=\
	Set(menu,replace,Browse MPRIS,Run App,Repeat,Random,PowerMgmt);\
	Macro(ALLIN1MENU);
	
MPRIS_DELTIMER=\
	Timer(MPRIS_SETTITLE,cancel);
	
MPRIS_SETTITLE=\
	Make(var,artist,TN=`qdbus org.mpris.$(mpris_app) /TrackList GetCurrentTrack 2> /dev/null`; \
	     if [ "x$TN" != "x" ]; then qdbus org.mpris.$(mpris_app) /TrackList GetMetadata $TN 2> /dev/null|grep artist|cut -f 2 -d ":"; fi);\
	Make(var,title, TN=`qdbus org.mpris.$(mpris_app) /TrackList GetCurrentTrack 2> /dev/null`; \
	     if [ "x$TN" != "x" ]; then qdbus org.mpris.$(mpris_app) /TrackList GetMetadata $TN 2> /dev/null|grep title |cut -f 2 -d ":"; fi);\
	Make(var,album, TN=`qdbus org.mpris.$(mpris_app) /TrackList GetCurrentTrack 2> /dev/null`; \
	     if [ "x$TN" != "x" ]; then qdbus org.mpris.$(mpris_app) /TrackList GetMetadata $TN 2> /dev/null|grep album |cut -f 2 -d ":"; fi);\
	Set(title,$(album) - $(title));\
	Set(status,$(artist));

MPRIS_POS=\
	Make(var,mpris_pos,qdbus org.mpris.$(mpris_app) /Player PositionGet 2> /dev/null);

MPRIS_GETVOL=\
	Make(var,mpris_vol,qdbus org.mpris.$(mpris_app) /Player VolumeGet|tr -d '\n' 2> /dev/null);

Back=\
	Set(text,close);\
	Macro(MPRIS_MENU);

Back($$)=\
	Set(list,close);\
	Macro(MPRIS_MENU);


1=Macro(MPRIS_GETVOL);\
	Make(var,mpris_vol,echo "$(mpris_vol)-5"|bc);\
	Exec(qdbus org.mpris.$(mpris_app) /Player VolumeSet $(mpris_vol));

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

3=Macro(MPRIS_GETVOL);\
	Make(var,mpris_vol,echo "$(mpris_vol)+5"|bc);\
	Exec(qdbus org.mpris.$(mpris_app) /Player VolumeSet $(mpris_vol) 2> /dev/null);

4=Macro(MPRIS_POS);\
        Make(var,mpris_pos,echo "$(mpris_pos)-10000"|bc);\
        Exec(qdbus org.mpris.$(mpris_app) /Player PositionSet $(mpris_pos)  2> /dev/null);\
	Macro(MPRIS_SETTITLE);

5=Exec(qdbus org.mpris.$(mpris_app) /Player Play 2> /dev/null);\
	Macro(MPRIS_SETTITLE);\
	Timer(MPRIS_SETTITLE,$(UpdateTimeout),0);

6=Macro(MPRIS_POS);\
        Make(var,mpris_pos,echo "$(mpris_pos)+10000"|bc);\
        Exec(qdbus org.mpris.$(mpris_app) /Player PositionSet $(mpris_pos)  2> /dev/null);\
	Macro(MPRIS_SETTITLE);

7=Exec(qdbus org.mpris.$(mpris_app) /Player Prev 2> /dev/null);\
	Macro(MPRIS_SETTITLE);
8=Exec(qdbus org.mpris.$(mpris_app) /Player Pause 2> /dev/null);\
	Macro(MPRIS_SETTITLE);
9=Exec(qdbus org.mpris.$(mpris_app) /Player Next 2> /dev/null);\
	Macro(MPRIS_SETTITLE);

* *=Set(text,replace,Help,1 - Vol-\n2 - Mute\n3 - Vol+\n4 - Rewind\n5 - Play\n6 - FF\n7 - Previous\n8 - Pause\n9 - Next\n* * - Help\n0 - Stop\n# - Kill app\n);
0=Exec(qdbus org.mpris.$(mpris_app) /Player Stop)
#=Exec(killall $(mpris_app))

% PowerMgmt by Utils/aliases-server.cfg

Browse MPRIS=\
	ExecAndSet(list,replace,MPRIS apps,qdbus|grep mpris|sed 's/org.mpris.//;s/$/,/');\
	Set(menu,replace,Choose,Kill);

Run App=\
	Set(list,replace,MPRIS apps,Amarok,Audacious,Clementine,Dragon,Kaffeine,QMMP,VLC);\
	Set(menu,replace,Start);

Choose($$)=\
	Set(list,close);\
	Make(var,mpris_app,by_value,$(Param));\
	Make(var,mpris_volume,by_value,-1);\
	Set(status,$(mpris_app));\
	Macro(MPRIS_MENU);

Kill($$)=\
	Set(list,close);\
	Exec(qdbus org.mpris.$(Param) / Quit);\
	Macro(MPRIS_MENU);

%
% specify apps in non-parametrized way
%
Start(1,Amarok)=\
	Set(list,close);\
	Make(var,mpris_app,by_value,amarok);\
	Set(status,$(mpris_app));\
	Make(var,mpris_volume,by_value,-1);\
	Exec(amarok);\
	Macro(MPRIS_MENU);

Start(2,Audacious)=\
	Set(list,close);\
	Make(var,mpris_app,by_value,audacious);\
	Set(status,$(mpris_app));\
	Make(var,mpris_volume,by_value,-1);\
	Exec(audacious);\
	Macro(MPRIS_MENU);
	
Start(3,Clementine)=\
	Set(list,close);\
	Make(var,mpris_app,by_value,clementine);\
	Set(status,$(mpris_app));\
	Make(var,mpris_volume,by_value,-1);\
	Exec(clementine);\
	Macro(MPRIS_MENU);

Start(4,Dragon)=\
	Set(list,close);\
	Make(var,mpris_app,by_value,dragon);\
	Set(status,$(mpris_app));\
	Make(var,mpris_volume,by_value,-1);\
	Exec(dragon);\
	Macro(MPRIS_MENU);

Start(5,Kaffeine)=\
	Set(list,close);\
	Make(var,mpris_app,by_value,kaffeine);\
	Set(status,$(mpris_app));\
	Exec(kaffeine);\
	Macro(MPRIS_MENU);

Start(6,QMMP)=\
	Set(list,close);\
	Make(var,mpris_app,by_value,qmmp);\
	Set(status,$(mpris_app));\
	Make(var,mpris_volume,by_value,-1);\
	Exec(qmmp);\
	Macro(MPRIS_MENU);

Start(7,VLC)=\
	Set(list,close);\
	Make(var,mpris_app,by_value,vlc);\
	Set(status,$(mpris_app));\
	Make(var,mpris_volume,by_value,-1);\
	Exec(vlc --control dbus);\
	Macro(MPRIS_MENU);

Repeat=\
	Make(mode,mpris_repeat);

Random=\
	Make(mode,mpris_random);

[Mode]=mpris_repeat

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

Back($$)=\
	Set(list,close);\
	Make(mode,mpris);
	
Push($$)=\
	Macro(Choose($$));
	
# depends on MPRIS version Random/SetRandom are used	
Choose($$)=\
	Set(list,close);\
	Exec(qdbus org.mpris.$(mpris_app) /TrackList SetLoop `echo $(Param)|sed 's/Yes/true/;s/No/false/'`);\
	Exec(qdbus org.mpris.$(mpris_app) /TrackList Loop `echo $(Param)|sed 's/Yes/true/;s/No/false/'`);\
	Make(mode,mpris);

[ModeEnd]

[Mode]=mpris_random

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

Push($$)=\
	Macro(Choose($$));
	
# depends on MPRIS version Loop/SetLoop are used	
Choose($$)=\
	Set(list,close);\
	Exec(qdbus org.mpris.$(mpris_app) /TrackList SetRandom `echo $(Param)|sed 's/Yes/true/;s/No/false/'`);\
	Exec(qdbus org.mpris.$(mpris_app) /TrackList Random `echo $(Param)|sed 's/Yes/true/;s/No/false/'`);\
	Make(mode,mpris);

[ModeEnd]

[End]