Added a media Player for Sidebar
Added MediaPlayer using Mpris that will catch any music being played from spotify to chrome inside Sidebar. The position of the MediaPlayer can be changed if the lines 169-176 be moved downwards. (currently above everything). Inspo taken from the example in astal's website.
okay sidenote: about line 170, it may sometimes might not give the correct metadata according to it's last index and have unknown artist and no image, but it can be fixed if that line is given a little fix by just changing -1 to -2 or -3.
e.g:
const lastPlayer = arr[arr.length - 1];
const lastPlayer = arr[arr.length - 2];
const lastPlayer = arr[arr.length - 3];
Also request to ML4W to restart ags when waybar is restarted too.
@atif727 That’s great. Will test it as soon as possible
okay sidenote: about line 170, it may sometimes might not give the correct metadata according to it's last index and have unknown artist and no image, but it can be fixed if that line is given a little fix by just changing -1 to -2 or -3. e.g:
const lastPlayer = arr[arr.length - 1];const lastPlayer = arr[arr.length - 2];const lastPlayer = arr[arr.length - 3];Also request to ML4W to restart ags when waybar is restarted too.
The waybar launch script is now reloading ags. SUPER+SHIFT+W or wallpaper change. Or theme switch.
@atif727 Are there any additional packages needed to install for the player?
@atif727 Are there any additional packages needed to install for the player?
i believe not
@atif727 I have decided to switch to swaync notification center. This brings the feature of a media player in the sidebar out-of-the-box. But thanks for your PR to motivate me to add this feature.