gnome-shell-extension-espresso
gnome-shell-extension-espresso copied to clipboard
GNOME 46 compatibility
fixes #63
These two changes provide a very barebone ability for Espresso to work partially with Gnome 46, but even basic things like clicking on the icon to enable or disable Espresso aren't working. Changing the extension widget from an Actor to a Child seems to affect the event handler.
Strange. Everything is working as expected on my end. All the _connect's are initialized without error, when I toggle the icon on/off I appropriately get:
Espresso: Debug: Toggle enabled. Previous state was on user override
Espresso: Debug: Removing all inhibitors
Espresso: Debug: Requested to remove inhibition by Symbol(espresso/user)
Espresso: Debug: Locking the queue and requesting to remove Symbol(espresso/user)
Espresso: Debug: Inhibitor removed: Symbol(espresso/user), unlocking queue
Espresso: Debug: Toggle enabled. Previous state was off override
Espresso: Debug: Requested to add inhibition by Symbol(espresso/user)
Espresso: Debug: Locking the queue and requesting to add Symbol(espresso/user)
Espresso: Debug: addInhibit called with Symbol(espresso/user)
Espresso: Debug: Inhibitor added: Symbol(espresso/user), unlocking queue
I can also see the inhibitor being added and removed as expected on DBus monitor and I've verified that it prevents my PC from sleeping if enabled, and allows my PC to sleep when disabled.
I'm on Gnome 46 / X11 / Arch.
Maybe something else is messed up on my linux install.... I'll build a fresh machine and do some more testing. Thanks for the work and the details on how it is working for you.
No problem! Happy to help
I tried this and it worked on Ubuntu 24.04 LTS.
I am not familiar with gnome-shell-extensions but here what I did.
- Clone the source
ajbucci:master
somewhere. - Remove original from extensions
rm -rf ~/.local/share/gnome-shell/extensions/[email protected]
- Copy the built code to
cp -r [email protected] ~/.local/share/gnome-shell/extensions/
- Logout and login Ubuntu. I have problem there is no file
schemas/gschemas.compiled
. - I run make-zip.sh then the file
schemas/gschemas.compiled
is generated. - I copy paste the
gschemas.compiled
file to~/.local/share/gnome-shell/extensions/[email protected]/schemas
- Logout and login again Ubuntu. Then it worked.
Thanks for the great tool and the updates.
I have tried this as well.
Unfortunately it doesn't work for me either.
I have installed it, logged out and logged in, disabled and enabled it, and after that it is visible on the top bar, but when I click on it, nothing happens; the icon doesn't change between the two states.
I built two new virtual machines fresh .. one with EndeavourOS and one with Fedora. On both platforms I am getting the same behavior 05storm26 noted above. I am not sure what is different for ajbucci and fakhrullah.
I can see some problems with the initialization code failing to connect InhibitorAdded and InhibitorRemoved events to the sessions manager. I am not sure why some of see this behavior and other don't.
I'll build a fresh VM and try debugging later this week
I still don't know why it was working for me on my Arch install... but I spun up a Fedora VM to debug and my latest commit should allow the code to run everywhere.
I can see some problems with the initialization code failing to connect InhibitorAdded and InhibitorRemoved events to the sessions manager. I am not sure why some of see this behavior and other don't.
This is actually OK as-is, there were some other errors that were halting execution inside _inhibitorAdded() and _sendNotification(). These should be fixed in my latest commit.
The reason we see the failure in the initialization for the InhibitorAdded and InhibitorRemoved signals is because they are expected to use connectSignal() instead of connect(). There is a try catch inside _connect() that handles this already. I would probably be more explicit and not use _connect() for InhibitorAdded and InhibitorRemoved, but I prefer to keep my changes to a minimum when I'm working in unfamiliar codebases to prevent unintended side-effects.
I made a little time do some testing on my daily driver and on a couple of other distros on VMs. Everything seems to be working well. Thank you @ajbucci for some great work! I'll merge the pull request and submit an updated package to extensions.gnome.org this weekend.
Hi @coadmunkee have you had time to submit the version for gnome 46 on the gnome extensions store?
@jee-r - I just submitted version 10 to extensions.gnome.org (12 May 2024) ... it might be a day or so until peer review and approval are obtained for the release to be available on the site.