This forum has been archived. All content is frozen. Please use KDE Discuss instead.

how to Check 'desktop effects' status -> disable if active ?

Tags: solved solved solved
(comma "," separated)
User avatar
yossarianuk
Registered Member
Posts
26
Karma
0
Hi.


Is there a script that checks the status if desktop effects and -> if running -> disable?

I would like to use this to launch games.

I know there is a 'Suspend desktop effects for fullscreen windows' option but that doesn't appear the same as disabling destop effects...

I also know of the command:-

qdbus org.kde.kwin /KWin org.kde.KWin.toggleCompositing

But I don't want to just toggle, I want to - check -> then toggle if active - in case kwin ever crashed (and the system thought it was active when it wasn't then turned 'on' desktop effects when launching a game'

There really should be some standard for all the desktops to disable compiz, desktop-effects, etc automatically when launching games - fps's would improve in general...

I guess I really need the command to check status...
User avatar
einar
Administrator
Posts
3402
Karma
7
OS
At least in soon-to-be 4.8, there's this command:

Code: Select all
qdbus org.kde.kwin /KWin org.kde.KWin.compositingActive


"Violence is the last refuge of the incompetent."
Image
Plasma FAQ maintainer - Plasma programming with Python
User avatar
yossarianuk
Registered Member
Posts
26
Karma
0
Thanks einar - thats what I needed.

Works in Kde 4.7.3 also

My script goes like :-

Code: Select all
-----------------------------------
#!/bin/bash
if [[ "$(qdbus org.kde.kwin /KWin org.kde.KWin.compositingActive)" = "true" ]] ; then
qdbus org.kde.kwin /KWin org.kde.KWin.toggleCompositing
fi
$1
if [[ "$(qdbus org.kde.kwin /KWin org.kde.KWin.compositingActive)" = "false" ]] ; then
qdbus org.kde.kwin /KWin org.kde.KWin.toggleCompositing
fi
exit
-----------------------------------


works fine.

Thank you !
User avatar
einar
Administrator
Posts
3402
Karma
7
OS
If your question is answered, please consider marking this topic as solved. Thanks!


"Violence is the last refuge of the incompetent."
Image
Plasma FAQ maintainer - Plasma programming with Python
User avatar
TheBlackCat
Registered Member
Posts
2945
Karma
8
OS
There is also an option Desktop Effects -> Advanced -> Suspend desktop effects for fullscreen windows. If your game is full-screen then this will disable desktop effects automatically without you needing to use a script.


Man is the lowest-cost, 150-pound, nonlinear, all-purpose computer system which can be mass-produced by unskilled labor.
-NASA in 1965
User avatar
yossarianuk
Registered Member
Posts
26
Karma
0
Do I just need to click the green tick to show its solved ?
User avatar
TheBlackCat
Registered Member
Posts
2945
Karma
8
OS
Yes


Man is the lowest-cost, 150-pound, nonlinear, all-purpose computer system which can be mass-produced by unskilled labor.
-NASA in 1965


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], kde-naveen, Sogou [Bot], Yahoo [Bot]