
GameMode
Source (link to git-repo or to original if based on someone elses unmodified work):
Description:
Simple scriplet which makes a definable list of windows block the compositor when they move into fullscreen mode (predefined are videoplayer, but it can be extended with games, sw. like celestia or stellarium ;-)
The script does not have a config GUI - i'm not even sure that's supported atm. but after installation you can edit the list in ~/.kde/share/apps/kwin/scripts/gamemode/contents/code/main.js
(afaik atm. you'll have to restart "kwin --replace &" to effectively update the script) Last changelog:
The script does not have a config GUI - i'm not even sure that's supported atm. but after installation you can edit the list in ~/.kde/share/apps/kwin/scripts/gamemode/contents/code/main.js
(afaik atm. you'll have to restart "kwin --replace &" to effectively update the script)
- listen to all added clients, check whether they're fullscreen and apply (kodi case)
- add "kodi" to list
Ratings & Comments
21 Comments
Ctrl Shift F9
This works for Plasma 5.22.4: qdbus org.kde.KWin /Compositor suspend and qdbus org.kde.KWin /Compositor resume
"qdbus org.kde.KWin /Compositor suspend" "qdbus org.kde.KWin /Compositor resume"
Is this script broken with Plasma Desktop 5.8.1 (testing on KDE Neon)? I have followed the directions here and in the comments, but to no avail. It never disables compositing for any of the entries I put in the JS file.
No idea, not been using KDE since more than a year. Sorry.
I did a full restart, and there is still no file under /home/.kde/share/apps/kwin/scripts. What am I missing? THanks
~/.kde4/share/apps/kwin/scripts or ~/.kde/share/apps/kwin/scripts on KDE5, ~/.local/share/kwin/scripts Your $HOME dir is very most likely not /home
Okay, what you said is of course what I looked for. I was just not wanting to use my name. In any case, it isn't there.
How did you install it? In doubt, download the tarball and run plasmapkg[2] -i -t kwinscript file.kwinscript
Okay, thanks. I originally tried to install via the hot new stuff button (plasma 5.2). It said installed, but apparently not really, lol. I did what you suggested and downloaded the tarbill. Thanks for the help!
Nice work, this should come with KDE I think now with steam getting more popular in linux. A preference dialog would be nice though ;)
Does anyone have any idea on how to make this work with XBMC?
run xbmc and konsole. in konsole run "xprop | grep CLASS" and click xbmc. Add the *second* value to GAMES array in ~/.kde/share/apps/kwin/scripts/gamemode/contents/code/main.js restart kwin ("kwin --replace &" - you could also reload the script but i don't know how out of my mind ;-)
It reports as xbmc.bin, I tried it but doesn't work...
var runTheShow = function(client, isFullscreen) { + print(client.resourceClass.toString()); if (runsTheShow(client)) { client.blocksCompositing = isFullscreen; } }; run "kdebugdialog" and enable 1212 (KWin), then "kwin --replace &" from konsole. Run XBMC, make it enter FS state. Whatever is printed out then is the term you want to match. Please share your findings so i can add it for an updated version of the script ;-)
Still not working, the output is: kwin(18932) KWin::Client::configureRequest: PERMITTED 'ID: 29360142 ;WMCLASS: "xbmc.bin" : "xbmc.bin" ;Caption: "XBMC Media Center" ' true I tried adding "XBMC Media Center" to the array, but no luck.
That output is unrelated. The window does not seem to enter the fullscreen mode at all (at least the script doesn't print anything in return of the line you hopefully added befre restarting kwin to get this ;-) If you don't use it w/ an w/o fullscreen mode, just add a window rule to apply always.
Just a random thought - the script is enabled, is it? (run "kcmshell4 kwinscripts")
Yes and it is working perfectly with games, hl_linux and hl2_linux work like a charm for Valve games.
Sounds like XBMC doesn't support _NET_WM_STATE_FULLSCREEN? Try: kwriteconfig --file kwinrc --group Windows --key LegacyFullscreenSupport true kwin --replace & This will detect "screensize borderelss window is fullscreen" Be aware that this will eg. break the plasma-netbook shell
I blocked composition for it until a better solution comes around.