/usr/share/anyremote/cfg-data/Server-mode/tomahawk.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 | %
% anyremote configuration file for tomahawk (http://www.tomahawk-player.org/) (Server-mode)
%
% STATUS non-stable
% XTEST no
% SOUND mixer
% ENV no
% DEF_PLAYER
% ALL_IN_ONE
% TODO https://bugs.tomahawk-player.org/browse/TWK-1161
% Initial playlist creation
% Shuffle do not works with playing queue
GuiAppName=Tomahawk
GuiAppBinary=tomahawk
GuiAppVersion=
GuiAppRun=echo 'A=`pgrep tomahawk`; if [ "x$A" = "x" ]; then echo NOK; else echo OK; fi'|sh -s
GuiAppIcon=tomahawk.png
GuiAppType=Application
GuiAppProtocols=Server
GuiAppDesc=Tomahawk is a music player that fundamentally changes the way music is consumed and shared. It decouples the name of the song from the source it was shared from - and fulfills the request using all of your available sources.
[Protocol]=Server
(Init)=\
Include($(CfgDir)/Utils/aliases-server.cfg);\
Macro(SETUP_DEFAULT_MIXER);\
Macro(TEST_QDBUS);\
Make(var,player_name,by_value,Tomahawk);\
Include($(CfgDir)/Utils/aliases-server-player.cfg);\
Make(var,cover_size,by_value,);\
Make(var,tomahahk_dbus,if [ "x$(Dbus)" = "xyes" ]; then echo DBUS; else echo NODBUS; fi);\
Make(var,tomahahk_layout,\
V=`$(CfgDir)/Utils/registry.sh $(TmpDir) get tomahahk_layout`;\
if [ "x$V" = "x" ]; then echo "5x1"; else echo $V; fi);
(Exit)=\
Exec($(CfgDir)/Utils/registry.sh $(TmpDir) set tomahahk_layout $(tomahahk_layout));
(Connect)=\
Make(mode,tomahahk_$(tomahahk_layout));
(Disconnect)=\
Timer(TOMAHAWK_TITLE,cancel);
[Mode]=tomahahk_general
TOMAHAWK_TITLE_GENERAL=\
Make(var,alb,qdbus org.mpris.MediaPlayer2.tomahawk /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Metadata|grep xesam:album:|sed 's/xesam:album: //');\
Make(var,art,qdbus org.mpris.MediaPlayer2.tomahawk /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Metadata|grep xesam:artist:|sed 's/xesam:artist: //');\
Make(var,tit,qdbus org.mpris.MediaPlayer2.tomahawk /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Metadata|grep xesam:title:|sed 's/xesam:title: //');\
Set(title,$(alb) - $(tit));\
Set(status,$(art));
TOMAHAWK_SET_VOL=\
Make(var,dummy,sleep 1;echo 0);\
Macro(DEFAULT_VOLUME_GET);\
Set(volume,$(default_mixer_value));
% TOMAHAWK_TITLE should be defined in child modes
TOMAHAWK_TIMER=\
Macro(TOMAHAWK_TITLE);\
Timer(TOMAHAWK_TITLE,$(UpdateTimeout),0);
TOMAHAWK_TIMER_CANCEL=\
Timer(TOMAHAWK_TITLE,cancel);\
Set(title,);\
Set(status,);
TOMAHAWK_CHECK_TIMER=\
Make(var,tomahawk_status,qdbus org.mpris.MediaPlayer2.tomahawk /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlaybackStatus);\
Make(var,timer_action,if [ "x$(tomahawk_status)" = "xPlaying" ]; \
then echo TOMAHAWK_TIMER; else echo TOMAHAWK_TIMER_CANCEL; fi);\
Macro($(timer_action));
RUN_IF_NEED=\
Exec($(CfgDir)/Utils/run-or-switch-to.sh tomahawk);
RUN_OR_QUIT=\
Exec(ID=`id -u`;P=`pgrep -u $ID tomahawk`; \
if [ "x$P" = "x" ]; then \
tomahawk 2> /dev/null&; \
else \
qdbus org.mpris.MediaPlayer2.tomahawk /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Quit; \
fi);\
Set(title,);\
Set(status,);
PLAY_ONLY=\
Exec(qdbus org.mpris.MediaPlayer2.tomahawk /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause);
PLAY=\
Macro(PLAY_ONLY);\
Macro(TOMAHAWK_TIMER);
RWD=\
Exec(qdbus org.mpris.MediaPlayer2.tomahawk /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Seek -5000000);
FF=\
Exec(qdbus org.mpris.MediaPlayer2.tomahawk /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Seek 5000000);
PREV=\
Exec(qdbus org.mpris.MediaPlayer2.tomahawk /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous);\
Macro(TOMAHAWK_TITLE);
NEXT=\
Exec(qdbus org.mpris.MediaPlayer2.tomahawk /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next);\
Macro(TOMAHAWK_TITLE);
STOP=\
Macro(TOMAHAWK_TIMER_CANCEL);\
Exec(qdbus org.mpris.MediaPlayer2.tomahawk /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop);
PAUSE=\
Exec(qdbus org.mpris.MediaPlayer2.tomahawk /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Pause);
APP_QUIT=\
Macro(TOMAHAWK_TIMER_CANCEL);\
Exec(qdbus org.mpris.MediaPlayer2.tomahawk /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Quit);
APP_PLAY_STATUS=\
Make(var,tomahawk_status,qdbus org.mpris.MediaPlayer2.tomahawk /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlaybackStatus);\
Make(var,app_status,if [ "x$(tomahawk_status)" = "xPlaying" ]; then echo playing; else echo paused; fi);
Shuffle=\
Exec(P=`qdbus org.mpris.MediaPlayer2.tomahawk /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Shuffle`; \
if [ "x$P" = "xtrue" ]; \
then \
qdbus org.mpris.MediaPlayer2.tomahawk /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Shuffle false & \
else \
qdbus org.mpris.MediaPlayer2.tomahawk /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Shuffle true & \
fi);
% Repeat does not works https://bugs.tomahawk-player.org/browse/TWK-1161
Layout 3x4=\
Make(mode,tomahahk_3x4);
Layout 7x1=\
Make(mode,tomahahk_7x1);
Layout 5x1=\
Make(mode,tomahahk_5x1);
[ModeEnd]
[Mode]=tomahahk_3x4 : tomahahk_general, default_player
% (EnterMode) by Utils/aliases-server-player.cfg
% PowerMgmt by Utils/aliases-server.cfg
APP_MENU=\
Set(menu,replace,Shuffle,Layout 5x1,Layout 7x1,PowerMgmt);\
Macro(ALLIN1MENU);
APP_POST_SETUP=\
Make(var,tomahahk_layout,by_value,3x4);\
Macro(TOMAHAWK_CHECK_TIMER);
TOMAHAWK_TITLE=\
Macro(TOMAHAWK_TITLE_GENERAL);
[ModeEnd]
[Mode]=tomahahk_cover
TOMAHAWK_TITLE=\
Macro(TOMAHAWK_TITLE_GENERAL);\
Macro(APP_COVER, if [ "x$(cover_size)" = "x" ]; then echo 1; else echo 0; fi);
APP_COVER=\
Make(var,tomahawk_cover_file,qdbus org.mpris.MediaPlayer2.tomahawk /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Metadata|\
grep mpris:artUrl:|sed "s/mpris:artUrl: file:\/\///"|\
sed "s/.*\/\/\//\//;s/'/'\\\''/g;s/\//\'\/\'/g;s/$/\'/g;s/^'\//\//;s/%20/ /g");\
Make(var,coverfile,echo "$(tomahawk_cover_file)"|md5sum|cut -f 1 -d ' ');\
Make(var,dummy,\
if [ "x$(tomahawk_cover_file)" != "x" ]; then \
convert -resize $(cover_size)x$(cover_size) -depth -background transparent \
$(tomahawk_cover_file) $(TmpDir)/album_covers/$(coverfile)-$(cover_size).png;\
echo "$(TmpDir)/album_covers/$(coverfile)-$(cover_size).png";\
fi);\
Set(cover,noname,$(TmpDir)/album_covers/$(coverfile)-$(cover_size).png);
[ModeEnd]
[Mode]=tomahahk_7x1 : tomahahk_general, tomahahk_cover, default_player_7x1
APP_MENU=\
Set(menu,replace,Shuffle,Mute,Layout 3x4,Layout 5x1,Help,PowerMgmt);\
Macro(ALLIN1MENU);
APP_POST_SETUP=\
Make(var,tomahahk_layout,by_value,7x1);
[ModeEnd]
[Mode]=tomahahk_5x1 : tomahahk_general, tomahahk_cover, default_player_5x1
APP_MENU=\
Set(menu,replace,Shuffle,Mute,Layout 3x4,Layout 7x1,Help,PowerMgmt);\
Macro(ALLIN1MENU);
APP_POST_SETUP=\
Make(var,tomahahk_layout,by_value,5x1);
APP_TITLE=\
Macro(TOMAHAWK_TITLE);
PLAY=\
Macro(PLAY_ONLY);
[ModeEnd]
[End]
|