Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a media Player for Sidebar #471

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

atif727
Copy link

@atif727 atif727 commented Nov 23, 2024

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.

@atif727
Copy link
Author

atif727 commented Nov 23, 2024

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.

@mylinuxforwork
Copy link
Owner

@atif727 That’s great. Will test it as soon as possible

@mylinuxforwork
Copy link
Owner

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.

@mylinuxforwork
Copy link
Owner

@atif727 Are there any additional packages needed to install for the player?

@atif727
Copy link
Author

atif727 commented Nov 24, 2024

@atif727 Are there any additional packages needed to install for the player?

i believe not

@mylinuxforwork mylinuxforwork added this to the v2.9.7 milestone Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants