Hi 👋, I'm Sakith
A passionate developer from Sri Lanka
📫 How to reach me [email protected]
A media indicator for the Gnome shell.
License: MIT License
Hi 👋, I'm Sakith
A passionate developer from Sri Lanka
📫 How to reach me [email protected]
Currently the only way to have a consistent size is to decrease the widget length by a minimal, which doesn't look ideal.
Please add a switch to lock a widget size to a fixed length so that it doesn't resize and move buttons around on every song change
The controls don't disappear even after a song ends and no song is played after.
You might want to add a timer to make the controls disappear if a song finishes (isn't paused or stopped) and no song is played in the next 10 (or however many you want) seconds.
As per tittle, I don't see the ext working with Quod Libet.
Thank you for your work
Gnome version: 41.2
Thanks for this great extension, made things easy for me.
I am using spotify web app from edge and it appears that you cannot change the music icon or the player icon that is, It would be nice if we could add and change the icon also the icon that is default does not match with the icons that the shell is using so,
The seperators are not aligned properly and It seems that the left one is a bit down while the right one is a bit up and wise a versa also I love the work that you have done, I was finding something like this for a long time.
BTW here is the glance of it, I have also installed the extension from the Github itself and not from the gnome extensions center and I have also ran the script that you have mentioned in the Readme.
Here is the photo
As you can se the left one is a bit down and the right one is a bit on the upper side.
Please add the ability to seek the current track, much like Kde-plasma
Example:- (https://user-images.githubusercontent.com/87817029/139195855-e271532a-a871-4c1c-94ce-a311d9961f8c.png)
I recently changed my desktop enviroment to GNOME and discovered this extension. Here is my computer.
After booting, if I open spotify the extension looks like this. Bad song name recognition and bad text color (black instead white).
Changing song after booting. Good text recognition but still bad text color.
If I close Spotify and open it again. Extension is gone.
After I restart gnome shell, using ALT + F2, write "r" and press enter, everything seems fine.
Another stange behaviour is when I lock my computer. After unlocking it, extension is gone again.
Enabled extensions in my computer
Thanks in advance!
Please add settings for replace play, next to click right or left button on mice on name of song.
I'm working on a Fedora package for this extension. When I try to enable it I get this error.
GLib.FileError: Failed to open file “/usr/share/gnome-shell/extensions/[email protected]/schemas/gschemas.compiled”: open() failed: No such file or directory
Stack trace:
buildPrefsWidget@/usr/share/gnome-shell/extensions/[email protected]/prefs.js:17:44
_init@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:207:40
OpenExtensionPrefsAsync/<@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:122:28
asyncCallback@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:132:22
run@resource:///org/gnome/Shell/Extensions/js/dbusService.js:177:20
main@resource:///org/gnome/Shell/Extensions/js/main.js:19:13
run@resource:///org/gnome/gjs/modules/script/package.js:222:19
start@resource:///org/gnome/gjs/modules/script/package.js:206:8
@/usr/share/gnome-shell/org.gnome.Shell.Extensions:1:17
The gschema xml file is installed to /usr/share/glib-2.0/schemas/org.gnome.shell.extensions.spotifylabel.gschema.xml
, which gets compiled with all other system extensions into /usr/share/glib-2.0/schemas/gschemas.compiled
when the package is installed. Every other gnome extension available as a Fedora package accepts this setup, so it's surprising that this extension doesn't.
If I have Spotify open and log out (either from inactivity or intentionally) and then log back in, the artist/title and controls do not appear. Same behavior if music is paused or actively playing. I'm using Pop 20.04, Gnome 3.36.8, and Spotify 1.1.55.498 (from snap), if it matters.
Greetings!
I was wondering if it would be possible to add padding control for each element (i.e., player icon, track title, control icons etc.) and also padding to other extensions in the top bar? For example, this is how my extension looks like:
Here I would like to reduce the padding to the left of the extension and reduce the player icon padding.
Thank you for this awesome extension!
When entering on the settings page this appears:
Tech details:
SyntaxError: expected expression, got '?'
Stack trace:
_init@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:204:33
OpenExtensionPrefsAsync/<@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:122:28
asyncCallback@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:132:13
run@resource:///org/gnome/Shell/Extensions/js/dbusService.js:175:20
main@resource:///org/gnome/Shell/Extensions/js/main.js:19:13
run@resource:///org/gnome/gjs/modules/script/package.js:222:19
start@resource:///org/gnome/gjs/modules/script/package.js:206:5
@/usr/share/gnome-shell/org.gnome.Shell.Extensions:1:17
System info:
./+o+- Dell-G15-5510
yyyyy- -yyyyyy+ OS: Ubuntu 20.04 focal
://+//////-yyyyyyo Kernel: x86_64 Linux 5.10.0-1052-oem
.++ .:/++++++/-.+sss/` Uptime: 3h 58m
.:++o: /++++++++/:--:/- Packages: 1886
o:+o+:++.`..```.-/oo+++++/ Shell: bash
.:+o:+o/. `+sssoo+/ Resolution: 1920x1080
.++/+:+oo+o:` /sssooo. DE: GNOME 3.36.5
/+++//+:`oo+o /::--:. WM: Mutter
\+/+o+++`o++o ++////. WM Theme: Adwaita
.++.o+++oo+:` /dddhhh. GTK Theme: Yaru-dark [GTK2/3]
.+.o+oo:. `oddhhhh+ Icon Theme: Yaru
\+.++o+o``-````.:ohdhhhhh+ Font: Ubuntu 11
`:o+++ `ohhhhhhhhyo++os: Disk: 20G / 232G (10%)
.o:`.syhhhhhhh/.oo++o` CPU: Intel Core i5-10500H @ 12x 4,5GHz [57.0°C]
/osyyyyyyo++ooo+++/ GPU: GeForce GTX 1650
````` +oo+++o\: RAM: 6439MiB / 7735MiB
`oo++.
Amazing extension, i really love it.
i have a enhacement proposal.
I would like to have control of sound sources at the same time (browser, spoty, etc). What about a button that open a small list with them and select the one you want to control?
Hi, after the setup, the play and pause buttons stopped working. I put my browser and extension on a virtual machine and everything works there. But after I turned on and off all the settings, it never worked. I tried reinstalling the extension and installing it manually, but that didn't work either. It works in mozilla, but it doesn't work in my chrome browser. It may help to return the default extension settings, but I do not know how to do it. After reinstalling, my settings are still saved.
Hey,
first of all, thank you for this great extension! I have a small improvement idea: Would it be possible to add a volume control in terms of a slider to the track information menu? Many applications have separate volume controls and especially if you use GSConnect to control your media on your phone if would be very handy to be able to control the volume level.
First of all, nice extension!
May be useful having an option to hide the controls shows in notifications, so you don't have that functionality duplicated.
Hi,
When used with an extension such as Scroll Panel this extension will not consume the scroll event, leading to the panel also switching. See mrEDitor/gnome-shell-extension-scroll-panel#15 for a better explanation than I can muster as well as an example fix.
https://extensions.gnome.org/extension/4470/media-controls/ do not have the Gnome 41 version listed. Could you please update the extension there too? Thank you for a great extension!
`The settings of extension [email protected] had an error:
SyntaxError: expected expression, got '?'
Stack trace:
_init@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:204:33
OpenExtensionPrefsAsync/<@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:122:28
asyncCallback@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:132:13
run@resource:///org/gnome/Shell/Extensions/js/dbusService.js:175:20
main@resource:///org/gnome/Shell/Extensions/js/main.js:19:13
run@resource:///org/gnome/gjs/modules/script/package.js:222:19
start@resource:///org/gnome/gjs/modules/script/package.js:206:5
@/usr/share/gnome-shell/org.gnome.Shell.Extensions:1:17
If you set hide-player-icon
to true
and mouse-action-left
to toggle_play
, clicking on the title does nothing. If you set hide-player-icon
to false
then clicking on the title does the expected action. This is reproducible on both GNOME 3.38.6 (Fedora 33) and GNOME 40.4 (Fedora 34).
Saw your extension on Reddit, thanks!
I don't know how much of a hassle this may be to implement, but could you add a setting to replace the vertical pipes shown around the song title to a character of choice (such as parenthesis or even a space to 'disable')? I know that I could change it myself and install from source, but I think this may be a nice addition.
This is where I found the vertical pipes being outputted:
https://github.com/cliffniff/media-controls/blob/a0855ede73ce98b02f40b842a2bd73bb43a0acbe/extension.js#L328
Will be working on a pull request to implement this, feel free to reject.
Thanks again!
Ubuntu 20.04 LTS
SyntaxError: expected expression, got '?'
Stack trace:
_init@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:204:33
OpenExtensionPrefsAsync/<@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:122:28
asyncCallback@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:132:13
run@resource:///org/gnome/Shell/Extensions/js/dbusService.js:175:20
main@resource:///org/gnome/Shell/Extensions/js/main.js:19:13
run@resource:///org/gnome/gjs/modules/script/package.js:222:19
start@resource:///org/gnome/gjs/modules/script/package.js:206:5
@/usr/share/gnome-shell/org.gnome.Shell.Extensions:1:17
Hello there. I would like to request a feature that allows to put album name in the track label. Currently, I can't check the name of an album in UI at all, only its cover art. I would like to have something like Earmake — Parallels — Between Good and Evil
in the panel.
Alternatively, having album name in the track information menu would be nice.
The settings of extension [email protected] had an error:
TypeError: scrolledWindow.set_child is not a function
Stack trace:
buildPrefsWidget@/home/jorge/.local/share/gnome-shell/extensions/[email protected]/prefs.js:482:20
_init@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:207:40
OpenExtensionPrefsAsync/<@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:122:28
asyncCallback@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:115:22
run@resource:///org/gnome/Shell/Extensions/js/dbusService.js:177:20
main@resource:///org/gnome/Shell/Extensions/js/main.js:19:13
run@resource:///org/gnome/gjs/modules/script/package.js:206:19
start@resource:///org/gnome/gjs/modules/script/package.js:190:8
@/usr/share/gnome-shell/org.gnome.Shell.Extensions:1:17
Hi, thanks for the tool. Seems to be working nicely apart from this issue.
The shuffle and repeat buttons have no effect and do not reflect the current state of those buttons in the spotify client.
The pause, previous track and next track buttons are working fine. The source is 'Spotify'.
I am on Ubuntu 21.04, GNOME 3.38.5.
I am running the official spotify client installed via Snap.
I kown it just support 38 and 40 clearly, but from #7, I guess that you are try to learn more about how to run it in 36, I am not sure if you have any plan to develop this extension in 36 which I really hope you to do so, and what I can do is helping to test it in 36 and tell you what you need.
This is what I get from journalctl -f -o cat /usr/bin/gnome-shell
after enabling this extension
[MediaControls] Enabling
st_widget_get_theme_node called on the widget [0x55b52f9e8080 StBoxLayout ("")] which is not in the stage.
st_widget_get_theme_node called on the widget [0x55b52f9e8080 StBoxLayout ("")] which is not in the stage.
st_widget_get_theme_node called on the widget [0x55b52fa1c900 Gjs_ui_popupMenu_PopupImageMenuItem.popup-menu-item:first-child ("")] which is not in the stage.
st_widget_get_theme_node called on the widget [0x55b52f9e8080 StBoxLayout ("")] which is not in the stage.
st_widget_get_theme_node called on the widget [0x55b52fa1c900 Gjs_ui_popupMenu_PopupImageMenuItem.popup-menu-item:first-child ("")] which is not in the stage.
st_widget_get_theme_node called on the widget [0x55b52fa1d140 StLabel.popup-menu-ornament:first-child ("")] which is not in the stage.
st_widget_get_theme_node called on the widget [0x55b52f9e8080 StBoxLayout ("")] which is not in the stage.
st_widget_get_theme_node called on the widget [0x55b52fa1c900 Gjs_ui_popupMenu_PopupImageMenuItem.popup-menu-item:first-child ("")] which is not in the stage.
st_widget_get_theme_node called on the widget [0x55b52fa1ffc0 StLabel:last-child ("setting")] which is not in the stage.
st_widget_get_theme_node called on the widget [0x55b52f9e8080 StBoxLayout ("")] which is not in the stage.
st_widget_get_theme_node called on the widget [0x55b52fa22560 Gjs_ui_popupMenu_PopupImageMenuItem.popup-menu-item ("")] which is not in the stage.
st_widget_get_theme_node called on the widget [0x55b52f9e8080 StBoxLayout ("")] which is not in the stage.
st_widget_get_theme_node called on the widget [0x55b52fa22560 Gjs_ui_popupMenu_PopupImageMenuItem.popup-menu-item ("")] which is not in the stage.
st_widget_get_theme_node called on the widget [0x55b52fa22d70 StLabel.popup-menu-ornament:first-child ("")] which is not in the stage.
st_widget_get_theme_node called on the widget [0x55b52f9e8080 StBoxLayout ("")] which is not in the stage.
st_widget_get_theme_node called on the widget [0x55b52fa22560 Gjs_ui_popupMenu_PopupImageMenuItem.popup-menu-item ("")] which is not in the stage.
st_widget_get_theme_node called on the widget [0x55b52fa27210 StLabel:last-child ("locking")] which is not in the stage.
st_widget_get_theme_node called on the widget [0x55b52f9e8080 StBoxLayout ("")] which is not in the stage.
st_widget_get_theme_node called on the widget [0x55b52fa2b120 Gjs_ui_popupMenu_PopupSubMenuMenuItem.popup-menu-item popup-submenu-menu-item:last-child ("")] which is not in the stage.
st_widget_get_theme_node called on the widget [0x55b52f9e8080 StBoxLayout ("")] which is not in the stage.
st_widget_get_theme_node called on the widget [0x55b52fa2b120 Gjs_ui_popupMenu_PopupSubMenuMenuItem.popup-menu-item popup-submenu-menu-item:last-child ("")] which is not in the stage.
st_widget_get_theme_node called on the widget [0x55b52fa2bb10 StLabel.popup-menu-ornament:first-child ("")] which is not in the stage.
st_widget_get_theme_node called on the widget [0x55b52f9e8080 StBoxLayout ("")] which is not in the stage.
st_widget_get_theme_node called on the widget [0x55b52fa2b120 Gjs_ui_popupMenu_PopupSubMenuMenuItem.popup-menu-item popup-submenu-menu-item:last-child ("")] which is not in the stage.
st_widget_get_theme_node called on the widget [0x55b52fa2dd70 StLabel ("shutdown / layout")] which is not in the stage.
JS ERROR: Gio.IOErrorEnum: Open file /home/jadevane/.config/media-controls/cache/ZmlsZTovLy9ob21lL3dlbmppbnl1Ly5jYWNoZS9yaHl0aG1ib3gvYWxidW0tYXJ0Ly4vMmVh error: No such file or directory
_getImage@/home/jadevane/.local/share/gnome-shell/extensions/[email protected]/player.js:597:53
get trackIcon@/home/jadevane/.local/share/gnome-shell/extensions/[email protected]/player.js:735:25
get menuItem@/home/jadevane/.local/share/gnome-shell/extensions/[email protected]/player.js:714:21
_addPlayer@/home/jadevane/.local/share/gnome-shell/extensions/[email protected]/widget.js:197:36
async*enable/</<@/home/jadevane/.local/share/gnome-shell/extensions/[email protected]/widget.js:82:56
enable/<@/home/jadevane/.local/share/gnome-shell/extensions/[email protected]/widget.js:90:31
asyncCallback@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:132:13
JS ERROR: Gio.IOErrorEnum: Open file /home/jadevane/.config/media-controls/cache/ZmlsZTovLy9ob21lL3dlbmppbnl1Ly5jYWNoZS9yaHl0aG1ib3gvYWxidW0tYXJ0Ly4vMmVh error: No such file or directory
_getImage@/home/jadevane/.local/share/gnome-shell/extensions/[email protected]/player.js:597:53
get trackIcon@/home/jadevane/.local/share/gnome-shell/extensions/[email protected]/player.js:735:25
_addInfoMenuItems@/home/jadevane/.local/share/gnome-shell/extensions/[email protected]/player.js:406:21
initWidgets@/home/jadevane/.local/share/gnome-shell/extensions/[email protected]/player.js:210:18
updatePlayer@/home/jadevane/.local/share/gnome-shell/extensions/[email protected]/widget.js:269:33
enable/</<@/home/jadevane/.local/share/gnome-shell/extensions/[email protected]/widget.js:86:42
async*enable/<@/home/jadevane/.local/share/gnome-shell/extensions/[email protected]/widget.js:90:31
asyncCallback@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:132:13
clutter_actor_remove_child: assertion 'child->priv->parent != NULL' failed
Hi, I think there's an issue with some player icons for gnome themes that use the default icon for those players.
For example, the theme "Flat Remix" has a custom icon for Spotify and Rhythmbox and everything works fine, while the theme "Flatery-dark" uses the default icons and they don't show up at all, they're replaced istead by a generic audio icon.
By looking around, I think that the issue is related to the get icon()
method at line 862 in player.js: if the value returned does not match exactly an app icon the extension just thinks that there's no icon at all for that app. This means that some default icons are ignored because they have different names (eg. com.spotify.Client
or org.gnome.Rhythmbox
)
#28 (comment)
https://github.com/cliffniff/media-controls/blob/a6187136e104eafd46aedf002e4a455df040cc1c/prefs.js#L183
gjs in 3.36 doesn't know ??
operator, it's too new.
Thanks for the amazing extension.
Just updated to the latest version (17).
Noticed 2 issues with padding (issue not present in previous version):
I'm using a different shell theme. However, even if i change to adwaita, the buttons still appear smaller than the rest of the icons.
First things first, this extension is a godsend, nice work!
I noticed that the track information menu won't show at all album artwork for Spotify songs if the option "Cache images" is turned off.
If said option is turned on, it will show the correct artwork only if it has already been downloaded before, meaning that if a song with a new artwork is playing it won't show the right image unless I click on the play/pause button inside the track info menu (it appears that clicking does a refresh of the image).
Lastly, the media icon for Spotify doesn't seem to be working correctly, it shows a generic gray rectangle with two notes inside instead of the Spotify icon. This seems to be related just to that player, because Firefox shows up right.
Amazing extension chief
however blacklisting is not working for some reason
I blacklisted Mozilla Firefox, and YouTube. But it is still showing up in the player
Since the last update i get an error while installing from gnome extensions
Bug: After seeing a vidio on yt and clisng it, the title continues beeing on the extension.
A better behaviour should be detecting the source is eneded and doesnt show it.
So I assign left click to raise player action but I am having different results with different apps on GNOME 40.5
Hi,
Great work so far.
I wonder, if we could get a "Controls to the left" feature?
I have placed your extension in the upper left corner, and in this configuration it would be better to have "Icon | Controls | Information" rather than "Icon | Information | Controls".
As the information is of variable length, this would make certain the controls don't move, when the information changes.
Further, if one were to place this to the right of the screen, "Information (text-aligned right) | Icon | Controls" might be preferable?
And last, in a center placement, a fixed width option might make sense with the information either being clipped or scrolling in the available space?
The settings of extension [email protected] had an error:
SyntaxError: expected expression, got '?'
Stack trace:
_init@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:204:33
OpenExtensionPrefsAsync/<@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:122:28
asyncCallback@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:132:13
run@resource:///org/gnome/Shell/Extensions/js/dbusService.js:175:20
main@resource:///org/gnome/Shell/Extensions/js/main.js:19:13
run@resource:///org/gnome/gjs/modules/script/package.js:222:19
start@resource:///org/gnome/gjs/modules/script/package.js:206:5
@/usr/share/gnome-shell/org.gnome.Shell.Extensions:1:17
When no player is active I get debug log spam in the system journal with messages like this one:
"Attempting to remove actor of type 'StButton' from group of class 'StBoxLayout', but the container is not the actor's parent."
When you use the pop-up menu to play the next song, the pop-up menu will adjust it's position if the displayed text on the panel isn't the same as the previous song. This makes sense as the pop-up is centered based on width of the panel entry, but I feel like it's awkward to use if you keep skipping songs using the pop-up menu. Maybe you could add an option to align the pop-up to one of the sides of the panel item to make it's position always be the same. Alternatively, add a minimum widget width alongside the max option to have the panel item always the same size (this would probably be a better solution). I hope my request makes sense.
when a new player starts outputting audio, the extension automatically detects it which is good but if you open another player and don't pause the old one the extension will switch (which is good) but when you pause the new player it won't switch to the old player, that is still outputting audio which is kinda annoying. Another enhancement would be to have player controls in sources menu making it easier to pause when you have multiple players outputting audio (and maybe ability to go to the player, idk about this one has a bit of niche use case scenario and considering that the raise player doesn't work for all players currently might be a bit of a tricky one).
The settings of extension [email protected] had an error:
SyntaxError: expected expression, got '?'
Stack trace:
_init@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:204:33
OpenExtensionPrefsAsync/<@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:122:28
asyncCallback@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:132:13
run@resource:///org/gnome/Shell/Extensions/js/dbusService.js:175:20
main@resource:///org/gnome/Shell/Extensions/js/main.js:19:13
run@resource:///org/gnome/gjs/modules/script/package.js:222:19
start@resource:///org/gnome/gjs/modules/script/package.js:206:5
@/usr/share/gnome-shell/org.gnome.Shell.Extensions:1:17
I just recently stumbled upon this shell extension and so far I really like it!
Only one thing I found to be missing: It seems like this shell extension does not really handle track labels that are wider than the max widget width. If this occurs the label is just cut to size and therefore not fully readable, which is a shame.
There is an extension for macOS that does similar things to this shell extension personally I really like the way it handles wide track labels. I asked a friend of mine to make a screen recording of it to visualize how an implementation could work:
Would it be a consideration to implement this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.