/usr/share/anyremote/cfg-data/Server-mode/noise.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 | %
% anyremote Server-mode configuration file for Noise (the official audio player of elementary OS) management.
% https://launchpad.net/noise
%
% prerequisites: qdbus
%
% STATUS stable
% SOUND mixer
% ENV no
% IPC app
% DEF_PLAYER
% ALL_IN_ONE
% TODO avoid qdbus usage
% Shuffle issue https://bugs.launchpad.net/noise/+bug/1081476
% (Fixed) Quit issue https://bugs.launchpad.net/noise/+bug/1081493
% (Fixed) Stop/Play issue https://bugs.launchpad.net/noise/+bug/1081497
GuiAppName=Noise
GuiAppBinary=noise
GuiAppRun= P=`ps -ef|grep noise|grep -v grep|grep -v anyremote|grep -v edit`; if [ "x$P" = "x" ]; then echo NOK; else echo OK; fi
GuiAppIcon=noise.svg
GuiAppType=Application
GuiAppProtocols=Server
GuiAppDesc=Noise is the official audio player of elementary OS
[Protocol]=Server
(Init)=\
Include($(CfgDir)/Utils/aliases-server.cfg);\
Macro(TEST_QDBUS);\
Macro(SETUP_DEFAULT_MIXER);\
Make(var,player_name,by_value,noise);\
Include($(CfgDir)/Utils/aliases-server-player.cfg);\
Make(var,noise_cmd,by_value,dbus-send --type=method_call --dest=org.mpris.MediaPlayer2.noise /org/mpris/MediaPlayer2);\
Make(var,noise_cmd_get,by_value,dbus-send --type=method_call --dest=org.mpris.MediaPlayer2.noise --print-reply /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get);\
Make(var,cover_size,by_value,);\
Make(var,noise_layout,\
V=`$(CfgDir)/Utils/registry.sh $(TmpDir) get noise_layout`;\
if [ "x$V" = "x" ]; then echo "5x1"; else echo $V; fi);
(Exit)=\
Exec($(CfgDir)/Utils/registry.sh $(TmpDir) set noise_layout $(noise_layout));
(Connect)=\
Make(mode,noise_$(noise_layout));
[Mode]=noise_general
PLAY=\
Exec($(noise_cmd) org.mpris.MediaPlayer2.Player.Play);\
Macro(NOISE_CHECK_TIMER);
NOISE_CHECK_TIMER=\
Macro(NOISE_STATUS);\
Make(var,timer_action,if [ "x$(noise_status)" = "xPlaying" ]; then echo NOISE_START; else echo NOISE_CANCEL; fi);\
Macro($(timer_action));
PLAYPAUSE=\
Make(var,dummy,$(noise_cmd) org.mpris.MediaPlayer2.Player.PlayPause);
RWD=\
Macro(NOISE_GETPOS);\
Exec(qdbus org.mpris.MediaPlayer2.noise /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.SetPosition a `expr $(noise_pos) - 5000000`);
FF=\
Macro(NOISE_GETPOS);\
Exec(qdbus org.mpris.MediaPlayer2.noise /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.SetPosition a `expr $(noise_pos) + 5000000`);
PREV=\
Exec($(noise_cmd) org.mpris.MediaPlayer2.Player.Previous);\
Macro(NOISE_TITLE);
STOP=\
Timer(NOISE_TITLE,cancel);\
Exec($(noise_cmd) org.mpris.MediaPlayer2.Player.Stop);\
Set(title,);\
Set(status,);
NEXT=\
Exec($(noise_cmd) org.mpris.MediaPlayer2.Player.Next);\
Macro(NOISE_TITLE);
PAUSE=\
Exec($(noise_cmd) org.mpris.MediaPlayer2.Player.Pause);
RUN_IF_NEED=\
Exec($(CfgDir)/Utils/run-or-switch-to.sh noise);
RUN_OR_QUIT=\
Make(var,noise_run_or_quit,\
P=`pgrep noise`;\
if [ "x$P" = "x" ]; then echo NOISE_TITLE; noise & else pkill noise; echo NOISE_CANCEL; fi);\
Macro($(noise_run_or_quit));
NOISE_CANCEL=\
Timer(NOISE_TITLE,cancel);
NOISE_START=\
Macro(NOISE_TITLE);\
Timer(NOISE_TITLE,$(UpdateTimeout),0);
APP_QUIT=\
Timer(NOISE_TITLE,cancel);\
Exec($(noise_cmd) org.mpris.MediaPlayer2.Quit);\
Exec(pkill noise);
NOISE_TITLE_GENERAL=\
Make(var,art,$(noise_cmd_get) string:org.mpris.MediaPlayer2.Player string:Metadata|awk '/.*xesam.albumArtist.*/{getline;getline;print}'|cut -f 2 -d '"');\
Make(var,tit,$(noise_cmd_get) string:org.mpris.MediaPlayer2.Player string:Metadata|awk '/.*xesam.title.*/{getline;print}'|cut -f 2 -d '"');\
Set(title,$(art) - $(tit));
NOISE_STATUS=\
Make(var,noise_status,$(noise_cmd_get) string:org.mpris.MediaPlayer2.Player string:PlaybackStatus|grep variant|cut -f 2 -d '"');
NOISE_GETPOS=\
Make(var,noise_pos,$(noise_cmd_get) string:org.mpris.MediaPlayer2.Player string:Position|grep variant|tr -s ' '|cut -f 4 -d ' ');
APP_PLAY_STATUS=\
Make(var,noise_status,qdbus org.mpris.MediaPlayer2.noise /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlaybackStatus);\
Make(var,app_status,if [ "x$(noise_status)" = "xPlaying" ]; then echo playing; else echo paused; fi);
%https://bugs.launchpad.net/noise/+bug/1081476
Shuffle=\
Make(var,shuffle_val,\
P=`$(noise_cmd_get) string:org.mpris.MediaPlayer2.Player string:Shuffle|grep variant|tr -s ' '|cut -f 4 -d ' '`;\
if [ "x$P" = "xtrue" ]; then echo 0; else echo 1; fi);\
Exec(qdbus org.mpris.MediaPlayer2.noise /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Shuffle $(shuffle_val));
Repeat=\
Make(var,repeat_val,\
P=`$(noise_cmd_get) string:org.mpris.MediaPlayer2.Player string:LoopStatus|grep variant|cut -f 2 -d '"'`;\
if [ "x$P" = "xNone" ]; then echo 1; else echo None; fi);\
Exec(qdbus org.mpris.MediaPlayer2.noise /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.LoopStatus $(repeat_val));
Layout 3x4=\
Make(mode,noise_3x4);
Layout 7x1=\
Make(mode,noise_7x1);
Layout 5x1=\
Make(mode,noise_5x1);
[ModeEnd]
[Mode]=noise_3x4 : noise_general,default_player
% no Shuffle, for now
APP_MENU=\
Set(menu,replace,Repeat,Layout 5x1,Layout 7x1,PowerMgmt);\
Macro(ALLIN1MENU);
APP_POST_SETUP=\
Make(var,noise_layout,by_value,3x4);\
Macro(NOISE_CHECK_TIMER);
NOISE_TITLE=\
Macro(NOISE_TITLE_GENERAL);
[ModeEnd]
[Mode]=noise_cover
NOISE_TITLE=\
Macro(NOISE_TITLE_GENERAL);\
Macro(APP_COVER, if [ "x$(cover_size)" = "x" ]; then echo 1; else echo 0; fi);
APP_COVER=\
Make(var,media_file,$(noise_cmd_get) string:org.mpris.MediaPlayer2.Player string:Metadata|awk '/.*artUrl.*/{getline;print}'|cut -f 2 -d ':'|sed 's/"$//;s/^\/\/\//\//');\
Make(var,coverfile,echo "$(media_file)"|md5sum|cut -f 1 -d ' ');\
Make(var,dummy,\
if [ "x$(media_file)" != "x" ]; then \
convert -resize $(cover_size)x$(cover_size) -depth 8 -background transparent \
"$(media_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]=noise_7x1 : noise_general,default_player_7x1,noise_cover
% no Shuffle, for now
APP_MENU=\
Set(menu,replace,Repeat,Mute,Layout 3x4,Layout 5x1,Help,PowerMgmt);\
Macro(ALLIN1MENU);
APP_POST_SETUP=\
Make(var,noise_layout,by_value,7x1);\
Macro(NOISE_CHECK_TIMER);
[ModeEnd]
[Mode]=noise_5x1 : noise_general,default_player_5x1,noise_cover
% no Shuffle, for now
APP_MENU=\
Set(menu,replace,Repeat,Mute,Layout 3x4,Layout 7x1,Help,PowerMgmt);\
Macro(ALLIN1MENU);
APP_POST_SETUP=\
Make(var,noise_layout,by_value,5x1);
APP_TITLE=\
Macro(NOISE_TITLE);
PLAY=\
Macro(PLAYPAUSE);
[ModeEnd]
[End]
|