gicmo / gamemode-extension Goto Github PK
View Code? Open in Web Editor NEWGNOME Shell extension for Feral Interactive's GameMode
License: GNU Lesser General Public License v2.1
GNOME Shell extension for Feral Interactive's GameMode
License: GNU Lesser General Public License v2.1
Some games (such as Arma) use the Super/Windows-Key for some actions, as it is disabled in Windows in those games.
On GNOME while playing such games the Activity-Menu opens.
I think a good feature would be to disable the hotkey while gamemode is running.
This feature could also be behind a switch, as it may be unwanted for some.
The settings of extension [email protected] had an error:
SyntaxError: import declarations may only appear at top level of a module @ resource:///org/gnome/Shell/Extensions/js/misc/extensionUtils.js:4:0
Stack trace:
@file:///usr/share/gnome-shell/extensions/[email protected]/prefs.js:1:24
_init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:266:34
In the meson.build file, the version is stated as '0.1', but it seems the project version is actually '1'. Or is that just the version for the build script?
It also says "license: GPL2+' but the rest of the project is lgpl-2.1+.
Can you please clarify whether that's correct or whether it should be different?
thanks!
https://extensions.gnome.org/extension/1852/gamemode/ only supports GNOME 42 at the moment. Can you please publish version 8 for GNOME 43 compatibility on that website? Thanks @gicmo .
Icon name in extension.js is typed as 'application-games-symbolic' at Line 190. Should be 'applications-games-symbolic'
update gnome 44
Log:
sept. 19 22:54:07 terence-arch gnome-shell[37335]: JS WARNING: [/home/terence/.local/share/gnome-shell/extensions/[email protected]/extension.js 61]: reference to undefined property "_onStateChanged"
sept. 19 22:54:07 terence-arch gnome-shell[37335]: Usage of object.actor is deprecated for GameModeIndicator
get@resource:///org/gnome/shell/ui/environment.js:240:29
_sync@/home/terence/.local/share/gnome-shell/extensions/[email protected]/extension.js:229:13
_update_active_color@/home/terence/.local/share/gnome-shell/extensions/[email protected]/extension.js:246:13
_init@/home/terence/.local/share/gnome-shell/extensions/[email protected]/extension.js:158:13
enable@/home/terence/.local/share/gnome-shell/extensions/[email protected]/extension.js:280:17
_callExtensionEnable@resource:///org/gnome/shell/ui/extensionSystem.js:131:13
loadExtension@resource:///org/gnome/shell/ui/extensionSystem.js:263:21
_loadExtensions/<@resource:///org/gnome/shell/ui/extensionSystem.js:473:13
collectFromDatadirs@resource:///org/gnome/shell/misc/fileUtils.js:27:17
_loadExtensions@resource:///org/gnome/shell/ui/extensionSystem.js:452:9
_enableAllExtensions@resource:///org/gnome/shell/ui/extensionSystem.js:482:13
_sessionUpdated@resource:///org/gnome/shell/ui/extensionSystem.js:513:13
init@resource:///org/gnome/shell/ui/extensionSystem.js:31:9
_initializeUI@resource:///org/gnome/shell/ui/main.js:238:5
start@resource:///org/gnome/shell/ui/main.js:138:5
@<main>:1:31
sept. 19 22:54:07 terence-arch gnome-shell[37335]: Usage of object.actor is deprecated for GameModeIndicator
get@resource:///org/gnome/shell/ui/environment.js:240:29
_init@/home/terence/.local/share/gnome-shell/extensions/[email protected]/extension.js:131:13
enable@/home/terence/.local/share/gnome-shell/extensions/[email protected]/extension.js:280:17
_callExtensionEnable@resource:///org/gnome/shell/ui/extensionSystem.js:131:13
loadExtension@resource:///org/gnome/shell/ui/extensionSystem.js:263:21
_loadExtensions/<@resource:///org/gnome/shell/ui/extensionSystem.js:473:13
collectFromDatadirs@resource:///org/gnome/shell/misc/fileUtils.js:27:17
_loadExtensions@resource:///org/gnome/shell/ui/extensionSystem.js:452:9
_enableAllExtensions@resource:///org/gnome/shell/ui/extensionSystem.js:482:13
_sessionUpdated@resource:///org/gnome/shell/ui/extensionSystem.js:513:13
init@resource:///org/gnome/shell/ui/extensionSystem.js:31:9
_initializeUI@resource:///org/gnome/shell/ui/main.js:238:5
start@resource:///org/gnome/shell/ui/main.js:138:5
@<main>:1:31
gnome-shell doesn't expose it in the UI (yet) but the functinoality is still available through dbus : https://gitlab.gnome.org/GNOME/gnome-shell/issues/239#note_104848
Hello,
I have recently downloaded version 5 and installed however it is not working for me.
Fedora 34
GNOME 40.4
I installed the extension by completing the following:
sudo gnome-extensions install gamemodechristian.kellner.me.v5.shell-extension.zip --force
(No error messages)sudo gnome-extensions enable [email protected]
(Error: Failed to connect to GNOME Shell
)I checked the gnome extension app but I am unable to enable it there either and a red warning symbol shows also
Clicking the cog to edit settings shows the following error:
Error: No property margin on GtkBox
Stack trace:
_init/Gtk.Widget.prototype._init@resource:///org/gnome/gjs/modules/core/overrides/Gtk.js:45:40
make_row_switch@/usr/share/gnome-shell/extensions/[email protected]/prefs.js:29:20
_init@/usr/share/gnome-shell/extensions/[email protected]/prefs.js:19:23
buildPrefsWidget@/usr/share/gnome-shell/extensions/[email protected]/prefs.js:111:18
_init@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:209: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
I found a previous issue #37 which did mention about gtk4, I can confirm this is installed.
Hope this is enough information so far, if you require anymore do let me know.
There are breaking changes which will require a separate release for 45 and <=44:
See https://gjs.guide/extensions/upgrading/gnome-shell-45.html
GNOME 43 is officially released, can you please create a new release of gamemode-extension and upload to extensions.gnome.org? Thanks!
I have installed it manually and it has been working great.
I tried installing the extension from source on Ubuntu 20.04 Focal Fossa, and it seemed to complete correctly, but checking the Extensions or Tweaks apps don't show this extension at all.
Looking more closely at the output during the install, I noticed that at one point in complained that the program js60
was not found (I'll include the full output below). From some Googling it seems that this should be a part of the libmozjs-60-dev
package, however on 20.04 the only available candidates are libmozjs-52-dev
and libmozjs-68-dev
.
Will this program install correctly if the program js68
is used instead during install? I'm afraid I don't know JavaScript at all, so probably won't be any help in terms of making a pull request to fix this issue.
Also, how do I uninstall this not-quite-installed extension? Do I just delete the folder under ~/.local/share/gnome-shell/extensions
?
I get the following error with the gnome shell extension. Running gnome 3.30 on debian unstable with game move version 1.5
TypeError: ExtensionUtils.initTranslations is not a function
Stack trace:
init@/home/terroreek/.local/share/gnome-shell/extensions/[email protected]/prefs.js:107:5
_getExtensionPrefsModule@resource:///org/gnome/shell/extensionPrefs/main.js:68:9
wrapper@resource:///org/gnome/gjs/modules/_legacy.js:82:22
_selectExtension@resource:///org/gnome/shell/extensionPrefs/main.js:82:31
wrapper@resource:///org/gnome/gjs/modules/_legacy.js:82:22
_onCommandLine@resource:///org/gnome/shell/extensionPrefs/main.js:235:17
wrapper@resource:///org/gnome/gjs/modules/_legacy.js:82:22
main@resource:///org/gnome/shell/extensionPrefs/main.js:389:5
@<main>:1:43
The title says everything.
I followed the guide but your extension deleted all my installed extensions.
When i open the extension, I can see the number of clients/apps that have GameMode applied. However, i would like to see a list of clients/apps running with GameMode. The extension menu can extend into a submenu with a list in it, expand the existing menu, or pop out in a separate window. Basically, i want what it says on the tin of my feature request.
This extension is available at https://extensions.gnome.org/extension/1852/gamemode/ , but its description doesn't mention this github page, and so people don't know where to file bugs, send pull requests or inspect the source. Please include the link in the description, thanks!
Hi,
the extension does not have a Spanish translation available, since there are only 13 small strings and I'm a native speaker, it isn't a lot of work and I would like to be able to help.
According to HACKING, translations are done by tx. I have contributed to the localisation of several projects before, but working directly with the GetText files (po, pot, mo). I haven't used transifex before and I don't know if anything else is required apart from submittng a request to join the translation team (done).
THX
Hi
Can you tag a new release now that the gnome 44 and gnome 45 support has been added in the main branch?
thanks!
Extension is installed via extensions.gnome.org, running Gnome-Shell 3.32 Wayland on Archlinux. Gamemode is installed through AUR.
I get this error when trying to install.
Title says it all
Gnome 41 has been released.
installing through gnome extensions gives an error and installing from the GitHub gives ./make-zip.sh install
The Meson build system
Version: 0.45.1
Source dir: /home/zany130/gamemode-extension
Build dir: /home/zany130/gamemode-extension/_build.Pi1bJy
Build type: native build
meson.build:1:0: ERROR: Meson version is 0.45.1 but project requires >= 0.46.0.
A full log can be found at /home/zany130/gamemode-extension/_build.Pi1bJy/meson-logs/meson-log.txt
Upon turning on the extension through the GNOME Extensions app, error message shows up reading "import declarations may only appear at top level of a module".
The settings of extension [email protected] had an error:
SyntaxError: import declarations may only appear at top level of a module
Stack trace:
@file:///usr/share/gnome-shell/extensions/[email protected]/prefs.js:1:24
_init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:266:34
Not sure why but one game doesn't trigger gamemode so I manually need to request it (I also don't know how this exactly works)
I very often struggle to fix the game because it lagged a lot but after realizing that my GPU is used up to 50% and not 100% I understood that it's not the games or Wines fault. And at the very end I remembered to request the gamemode manually to finally play normal.
Mouse acceleration makes desktop use more comfortable but in game is preferable to use flat profile.
Currently mouse acceleration profile is "hidden" on Gnome Tweaks.
This extension could add an option to change the profile to flat when in game.
Thanks!
Hi;
Gnome-shell 42 is using Adw.PreferencesWindow
instead of Gtk.Window
for extension preferences dialog, so we can use Libadwaita widgets. I don't know if you have considered using libadwaita in the extension, the truth is that for now it is not strictly necessary to use it to support Gnome 42, not even implementing fillPreferencesWindow
in prefs.js, adding the new version to metadata.json is sufficient.
Aside from preparing for the future (ʘ‿ʘ), since most of the GNOME core apps already use libadwaita in gnome 42 (and the rest are in the pipeline), I think the biggest advantage of using libadwaita is that it allows the extension to integrate better with the rest of the desktop, with DE themes, the new system-wide dark mode setting, etc.
This afternoon I've been tinkering with the extension so that it can use libadwaita in Gnome 42, this is the result:
https://github.com/fjsevilla-dev/gamemode-extension/blob/libadwaita_port/prefs.js#L151
and this is how it looks (tested on Arch with gnome-shell 42.0, the default Adwaita theme and witch system-wide dark mode off/on ):
The code for Gnome 42 is separate from the previous versions, but it's just a test :), there are many ways to implement it, If it is of interest, I will help in any way I can.
Hey so thanks for making this extension!
I was hoping that at some point we could get a setting to turn on/off a display of # of Active Clients for gamemode beside the icon in the system tray, in addition to the icon. So I don't necessarily need to click on it to see the count.
If this could get added that would be appreciated! Thanks! :)
Hey, i love the extension, but i've recently updated to gnome 42 and its not available anymore, is there any chance for it being updated for 42?
No uninstallation info anywhere
EDIT: I used the gnome extension to uninstall it, but you should add instructions under the install section on how to Uninstall.
what does it actually do? it is an issue that we do not know what it optimises or how it optimises the system. it would be great to have a general explanation of the things it modifies.
The "X active clients" could be extended with a dropdown showing the client's name and PID.
Bug
When league of legens client is open via lutris (wine) the game mode doesn't turn on
Hi, can you please make a new release now that you've added gnome 3.36 support? Would like to include a latest stable version in Debian now that it has GNOME 3.36. Thanks!
I'm getting this error a lot. You need to update the extension to Gnome 3.38 please
Object .Gjs_gamemode_christian_kellner_me_extension_GameModeIndicator (0x5565b80a8c60), has been already deallocated — impossible to set any property on it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
Object St.Icon (0x5565b7d04800), has been already deallocated — impossible to access it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
Hi. Fedora 35 comes with a version of gamemode extension doesn't work on Gnome 41. I have installed the development version but still not working.
Error: No property margin on GtkBox
Stack trace:
_init/Gtk.Widget.prototype._init@resource:///org/gnome/gjs/modules/core/overrides/Gtk.js:47:50
make_row_switch@/usr/share/gnome-shell/extensions/[email protected]/prefs.js:29:20
_init@/usr/share/gnome-shell/extensions/[email protected]/prefs.js:19:23
buildPrefsWidget@/usr/share/gnome-shell/extensions/[email protected]/prefs.js:111:18
_init@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:219:40
OpenExtensionPrefsAsync/<@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:128:33
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
it would really good if you would move icon to quick settings
The latest LTS version of Ubuntu is launching w/ GNOME 46 this month, so it would be great to have this extension up-to-date on https://extensions.gnome.org/extension/1852! Thank you.
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.