/usr/share/anyremote/cfg-data/Server-mode/amarok-v4.cfg is in anyremote-data 6.5-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 | %
% anyremote configuration file for amarok management. (Server-mode)
%
% Made by Carlos Sanchez (chukysoria@gmail.com)
% --- modified to run with amarok/kde4 (johann bauer, johann.bauer1@gmail.com )
% --- --- modified (Dmirty Ashkadov, dmitry.ashkadov@gmail.com)
% STATUS stable
% XTEST no
% SOUND app
% ENV no
% ALL_IN_ONE
GuiAppName=Amarok v4
GuiAppBinary=amarok
GuiAppVersion=V=`amarok -v|grep KDE|tr -d " "|cut -f 2 -d ":"|cut -f 1 -d "."`; if [ "x$V" = "x4" ]; then echo OK; else echo NOK; fi
GuiAppRun=A=`pgrep amarok`; if [ "x$A" = "x" ]; then echo NOK; else echo OK; fi
GuiAppIcon=amarok.png
GuiAppType=Application
GuiAppDesc=Amarok is the music player for Linux and Unix with an intuitive interface. Amarok makes playing the music you love easier than ever before - and looks good doing it. This configuration supports cover art. This configuration file is for Amarok/KDE4.
[Protocol]=Server
(Init)=\
Include($(CfgDir)/Utils/aliases-server.cfg);\
Include($(CfgDir)/Utils/aliases-server-fbrowser-v3i.cfg);\
Macro(SETUP_DEFAULT_POWER_MANAGEMENT);\
Macro(FBROWSER_IC_INIT);\
Make(var, tmp_dir,by_value,/tmp);\
Macro(TEST_IMAGEMAGIC);\
Make(var,kde4_app,by_value,amarok);\
Macro(TEST_KDE4_APP);\
Macro(INIT_VARIABLES);
(Exit)=\
Macro(FBROWSER_IC_EXIT);
INIT_VARIABLES=\
Make(var,cvDir,by_value,$(tmp_dir)/amarok_covers/);\
Exec(if [ ! -d $(cvDir) ]; then mkdir $(cvDir); fi);\
Make(var,am_track_index,by_value,0);\
Make(var,am_track_index_saved,by_value,-2);\
Make(var,am_num_of_tracks,by_value,-2);\
Make(var,am_saved_mode,by_value,amarok-v4);\
Make(var,am_track_pos,by_value,0);\
Make(var,am_track_pos_old,by_value,0);\
Make(var,am_track_length,by_value,1);\
Make(var,am_volume,by_value,0);\
Make(var,am_cover,by_value,);\
Make(var,am_cover_old,by_value,);
MODE_SAVE=\
Make(var,am_saved_mode,by_value,$(Mode));
MODE_LOAD=\
Make(mode,$(am_saved_mode));
AMAROK_V2_RUN_IF=\
Exec($(CfgDir)/Utils/run-or-switch-to.sh amarok);
(Connect)=\
Macro(AMAROK_V2_RUN_IF);\
Make(var,cover_size,by_value,128);\
Get(cover_size);\
Make(mode,amarok-v4);
(Disconnect)=Macro(AMAROK_V2_STOP_TIMER);
InCall($$)=\
Exec(amarok --pause);\
Macro(AMAROK_V2_STOP_TIMER);\
Make(remote,off);
EndCall($$)=\
Make(remote,on);\
Exec(amarok --play);\
Macro(AMAROK_V2_START_TIMER);
AMAROK_V2_SETINFO=\
Macro(AMAROK_V2_GET_TRACK_INDEX);\
Macro(AMAROK_V2_GET_POSITION);\
Macro(AMAROK_V2_GET_TRACK_LENGTH);\
Macro(AMAROK_V2_UPDATE_STATUS);\
Macro(AMAROK_V2_UPDATE_TITLE, expr $(am_track_index) == $(am_track_index_saved));\
Macro(AMAROK_V2_UPDATE_COVER, expr $(am_track_index) == $(am_track_index_saved));\
Make(var,am_track_index_saved,by_value,$(am_track_index));
% avoid
% Macro(AMAROK_V2_UPDATE_PROGRESSBAR);\ -- Android client show volume as temporary floating window
% Macro(AMAROK_V2_UPDATE_PLAY_ICON);
AMAROK_V2_START_TIMER=Timer(AMAROK_V2_SETINFO,$(UpdateTimeout),0);
AMAROK_V2_STOP_TIMER =Timer(AMAROK_V2_SETINFO,cancel);
AMAROK_V2_UPDATE_STATUS=\
ExecAndSet(status,min=`expr $(am_track_length) / 60`; sec=`expr $(am_track_length) % 60`; pos_min=`expr $(am_track_pos) / 60`; pos_sec=`expr $(am_track_pos) % 60`; echo "$pos_min:`if [ $pos_sec \< 10 ]; then echo 0; fi`$pos_sec / $min:`if [ $sec \< 10 ]; then echo 0; fi`$sec");
%AMAROK_V2_UPDATE_PROGRESSBAR=\
% ExecAndSet(volume, if [ $(am_track_length) = 0 ]; then echo 0; else expr $(am_track_pos) \* 100 \/ $(am_track_length); fi);
%
%AMAROK_V2_UPDATE_PLAY_ICON=\
% Make(var,am_play_icon, if [ $(am_track_pos) = $(am_track_pos_old) ]; then echo 'play'; else echo 'pause'; fi);\
% Make(var,am_track_pos_old,by_value,$(am_track_pos));\
% Set(icons,SAME,2,$(am_play_icon));
AMAROK_V2_UPDATE_TITLE=\
ExecAndSet(title,T=`qdbus org.kde.amarok /TrackList GetMetadata $(am_track_index)|grep title:|cut -f 2 -d ":"`; A=`qdbus org.kde.amarok /TrackList GetMetadata $(am_track_index)|grep artist:|cut -f 2 -d ":"`;echo "`expr $(am_track_index) + 1`. $T" by"$A");
AMAROK_V2_UPDATE_COVER=\
Make(var,am_cover, qdbus org.kde.amarok /TrackList GetMetadata $(am_track_index)|grep arturl:|cut -f 2 -d " "|sed "s/%20/ /g"|cut -f 2 -d ":");\
Macro(AMAROK_V2_UPDATE_COVER_SUB, if [ "x$(am_cover)" = "x$(am_cover_old)" ]; then echo 1; else echo 0; fi);
AMAROK_V2_UPDATE_COVER_SUB=\
ExecAndSet(cover,noname,F=`basename "$(am_cover)"`; if [ "x$F" = "x" ]; then echo ""; else convert -resize $(cover_size)x$(cover_size) -depth 8 -background transparent "$(am_cover)" "$(cvDir)$F"; echo "$(cvDir)$F"; fi);\
Make(var,am_cover_old,by_value,$(am_cover));
AMAROK_V2_GET_TRACK_INDEX=\
Make(var,am_track_index, qdbus org.kde.amarok /TrackList GetCurrentTrack | tr -d " ");
AMAROK_V2_GET_POSITION=\
Make(var,am_track_pos, expr `qdbus org.kde.amarok /Player PositionGet` / 1000);
AMAROK_V2_GET_TRACK_LENGTH=\
Make(var,am_track_length,if [ $(am_track_index) \< 0 ]; then echo 0; else expr `qdbus org.kde.amarok /TrackList GetMetadata $(am_track_index)|grep "mtime"|cut -f 2 -d ":"` / 1000; fi);
AMAROK_V2_GET_VOLUME=\
Make(var,am_volume,qdbus org.kde.amarok /Player VolumeGet);
AMAROK_V2_GET_NUM_OF_TRACKS=\
Make(var,am_num_of_tracks,qdbus org.kde.amarok /TrackList GetLength);
CoverSize($$)=\
Make(var,cover_size,by_value,$(Index));
% Main mode ======================================================================
[Mode]=amarok-v4
AM_V2_LAYOUT=\
Set(icons,Amarok,1,prev,2,play,3,next,4,rewind,5,stop,6,forward,7,mute,8,vol_down,9,vol_up,*,question,0,fullscreen,#,folder);\
Set(font,small);\
Set(layout,7x1,choose,2,volume,ticker,up,Vol+,down,Vol-);
AM_V2_MENU=\
Set(menu,replace,Shuffle,Repeat,Playlist,Toggle Fullscreen,Track Info,Run Player,Show Player,Hide Player,Quit Player,PowerMgmt,Help);\
Macro(ALLIN1MENU);
(EnterMode)=\
Macro(AM_V2_LAYOUT);\
Macro(AMAROK_V2_SETINFO);\
Macro(AM_V2_MENU);\
Macro(AMAROK_V2_START_TIMER);
(ExitMode)=\
Macro(AMAROK_V2_STOP_TIMER);\
Make(var,am_track_index_saved,by_value,-2);
Back=Set(text,close);\
Macro(AM_V2_MENU);
Playlist=\
Macro(MODE_SAVE);\
Make(mode,amarok_playlist_v4);
Shuffle=\
Make(var,shuffle_val,P=`qdbus org.kde.amarok /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Shuffle`; if [ "x$P" = "xtrue" ]; then echo 0; else echo 1; fi);\
Exec(qdbus org.kde.amarok /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Shuffle $(shuffle_val));
Repeat=\
Make(var,repeat_val,P=`qdbus org.kde.amarok /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.LoopStatus`; if [ "x$P" = "xNone" ]; then echo 1; else echo 0; fi);\
Exec(qdbus org.kde.amarok /Player org.freedesktop.MediaPlayer.Repeat $(repeat_val));
Vol+=Exec(qdbus org.kde.amarok /Player VolumeUp 5);\
Macro(AMAROK_V2_GET_VOLUME);\
ExecAndSet(status, echo 'Volume: $(am_volume) %');
Vol-=Exec(qdbus org.kde.amarok /Player VolumeDown 5);\
Macro(AMAROK_V2_GET_VOLUME);\
ExecAndSet(status, echo 'Volume: $(am_volume) %');
% Android support
VOL-=Macro(Vol-);
VOL+=Macro(Vol+);
Toggle Fullscreen=\
Macro(ToggleFullscreen);
ToggleFullscreen=\
Set(fullscreen,toggle);\
Set(cover,clear);\
Get(cover_size);
Track Info=\
Macro(MODE_SAVE);\
Macro(AMAROK_V2_GET_TRACK_INDEX);\
Make(mode,TrackInfo);
CoverSize($$)=\
Make(var,cover_size,by_value,$(Index));\
Macro(AMAROK_V2_UPDATE_COVER_SUB);
Run Player=\
Macro(AMAROK_V2_RUN_IF);
Quit Player=\
Exec(qdbus org.kde.amarok /MainApplication quit);\
Macro(AMAROK_V2_STOP_TIMER);\
Set(title,);\
Set(status,);\
Set(cover,clear);
% Set(volume,0);
Show Player=Exec(qdbus org.kde.amarok /amarok/MainWindow show);
Hide Player=Exec(qdbus org.kde.amarok /amarok/MainWindow hide);
Help=Macro(MODE_SAVE);Make(mode,Help);
1=Exec(qdbus org.kde.amarok /Player Prev);Macro(AMAROK_V2_SETINFO);
* 1=Exec(qdbus org.kde.amarok /Player Backward 300000);Macro(AMAROK_V2_SETINFO);
2=Exec(qdbus org.kde.amarok /Player PlayPause);Macro(AMAROK_V2_SETINFO);
3=Exec(qdbus org.kde.amarok /Player Next);Macro(AMAROK_V2_SETINFO);
* 3=Exec(qdbus org.kde.amarok /Player Forward 300000);Macro(AMAROK_V2_SETINFO);
4=Exec(qdbus org.kde.amarok /Player Backward 10000);Macro(AMAROK_V2_SETINFO);
* 4=Exec(qdbus org.kde.amarok /Player Backward 60000);Macro(AMAROK_V2_SETINFO);
5=Exec(qdbus org.kde.amarok /Player Stop);Macro(AMAROK_V2_SETINFO);
6=Exec(qdbus org.kde.amarok /Player Forward 10000);Macro(AMAROK_V2_SETINFO);
* 6=Exec(qdbus org.kde.amarok /Player Forward 60000);Macro(AMAROK_V2_SETINFO);
7=Exec(qdbus org.kde.amarok /Player Mute);
8=Macro(Vol-);
9=Macro(Vol+);
#=Macro(Playlist);
0=Macro(ToggleFullscreen);
* *=Macro(Help);
[ModeEnd]
% =================================================================================
[Mode]=amarok_playlist_v4
(EnterMode)=\
Set(list,font,small);\
Set(list,bg,50,70,130);\
Set(list,fg,145,165,230);\
Macro(AMAROK_V2_GET_NUM_OF_TRACKS);\
Macro(AMAROK_V2_GET_TRACK_INDEX);\
Macro(SET_LIST_IF_NOT_EMPTY);\
Macro(SET_LIST_ITEM, expr $(am_track_index) \< 0);
% collision for Push() event
% Macro(SET_LIST_IF_EMPTY, expr $(am_num_of_tracks) != 0);\
% Macro(SET_LIST_IF_NOT_EMPTY, expr $(am_num_of_tracks) == 0);\
%
SET_LIST_ITEM=\
ExecAndSet(list,select, expr $(am_track_index) + 1);
%SET_LIST_IF_EMPTY=\
% Set(menu,replace,Add,Refresh);Set(list,replace,Playlist, -- empty --);
SET_LIST_IF_NOT_EMPTY=\
Set(menu,replace,Play,Add,Remove,Info,Refresh,Clear);\
ExecAndSet(list,replace,Playlist,$(CfgDir)/Utils/getPlayList.sh);
(ExitMode)=Set(list,close);
Back($$)=\
Make(mode,amarok-v4);
Push($$)=\
Macro(Play($$))
Play($$)=\
Exec(qdbus org.kde.amarok /TrackList PlayTrack `expr $(Index) - 1`);
Info($$)=\
Make(var,am_track_index,expr $(Index) - 1);\
Macro(MODE_SAVE);\
Make(mode,TrackInfo);
Remove($$)=\
Exec(qdbus org.kde.amarok /TrackList DelTrack `expr $(Index) - 1`);\
Make(mode,amarok_playlist_v4);
Add($$)=\
Macro(MODE_SAVE);\
Make(mode,FileBrowser);
Clear($$)=\
Macro(AMAROK_V2_GET_NUM_OF_TRACKS);\
Exec(for (( i=0; i<$(am_num_of_tracks); ++i)) do qdbus org.kde.amarok /TrackList DelTrack 0; done);\
Set(menu,replace,Add,Refresh);
% Macro(SET_LIST_IF_EMPTY);
Refresh($$)=\
Make(mode,amarok_playlist_v4);
[ModeEnd]
% =================================================================================
[Mode]=TrackInfo
(EnterMode)=\
ExecAndSet(text,replace,Track Info,qdbus org.kde.amarok /TrackList GetMetadata $(am_track_index) | sed "s/%20/ /g");
(ExitMode)=\
Set(text,close);
Back=Macro(MODE_LOAD);
[ModeEnd]
% ==================================================================================
[Mode]=FileBrowser
(EnterMode)=\
Macro(FBROWSER_IC_FILL_LIST);\
Set(menu,replace,GoTo,Add,Go Home);\
Macro(ALLIN1MENU);
(ExitMode)=\
Set(iconlist,close);
Back($$)=\
Macro(MODE_LOAD);
Add($$)=\
Exec(cd "$(fbrowser_dir)"; amarok -a "$(Param)");
GoTo($$)=\
Macro(FBROWSER_IC_GO_TO);
Go Home($$)=\
Macro(FBROWSER_IC_GO_HOME);
Push($$)=\
Macro(FBROWSER_IC_GO_TO);
[ModeEnd]
% ==================================================================================
[Mode]=Help
(EnterMode)=\
Set(text,replace,Help,Manage player by joystick, by keypad or from menu.\n \n 1 - Prev. track\n 2 - Play/Pause\n 3 - Next track\n 4 - Rewind\n 5 - Stop\n 6 - Forward\n 7 - Mute\n 8 - Volume down\n 9 - Volume up\n 0 - Fullscreen\n # - Playlist\n * 1 - Rewind 5 min\n * 3 - Forward 5 min\n * 4 - Rewind 1 min\n * 6 - Forward 1 min\n * * - Help);
(ExitMode)=\
Set(text,close);
Back=Macro(MODE_LOAD);
[ModeEnd]
[End]
|