GameMode

Kwin Scripts

Source (required if based on other people's work): Add the source-code for this project on git.opendesktop.org

0
Score 54%
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:

5 years ago

- listen to all added clients, check whether they're fullscreen and apply (kodi case)
- add "kodi" to list

MrBumpy1

2 years ago

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.

Report

C

thomas12777

2 years ago

No idea, not been using KDE since more than a year. Sorry.

Report

shawnpeterson77

3 years ago

I did a full restart, and there is still no file under /home/.kde/share/apps/kwin/scripts. What am I missing? THanks

Report

C

thomas12777

3 years ago

~/.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

Report

shawnpeterson77

3 years ago

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.

Report

C

thomas12777

3 years ago

How did you install it?
In doubt, download the tarball and run

plasmapkg[2] -i -t kwinscript file.kwinscript

Report

shawnpeterson77

3 years ago

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!

Report

melongex

4 years ago

Nice work, this should come with KDE I think now with steam getting more popular in linux.

A preference dialog would be nice though ;)

Report

bootkiller

5 years ago

Does anyone have any idea on how to make this work with XBMC?

Report

C

thomas12777

5 years ago

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 ;-)

Report

bootkiller

5 years ago

It reports as xbmc.bin, I tried it but doesn't work...

Report

C

thomas12777

5 years ago

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 ;-)

Report

bootkiller

5 years ago

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.

Report

C

thomas12777

5 years ago

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.

Report

C

thomas12777

5 years ago

Just a random thought - the script is enabled, is it?
(run "kcmshell4 kwinscripts")

Report

bootkiller

5 years ago

Yes and it is working perfectly with games, hl_linux and hl2_linux work like a charm for Valve games.

Report

C

thomas12777

5 years ago

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

Report

bootkiller

5 years ago

I blocked composition for it until a better solution comes around.

Report

5 years ago

- listen to all added clients, check whether they're fullscreen and apply (kodi case)
- add "kodi" to list

File (click to download) Version Description Packagetype Architecture Downloads Date Filesize DL OCS-Install
Pling
Details
license
version
0.2
updated Feb 22 2015
added Jan 29 2013
downloads today
0
page views today 2
System Tags linux unix