What I ran into
Strolling through the keys in dconf-editor
, looking for something else, I ran into the screen's information in
/org/compiz/profiles/unity/plugins/core/outputs
which showed the values:
['1680x1050+0+0', '1280x1024+1680+0']
on my system.
This surprised me a bit. I use to get this information, parsed from the output of xrandr
.
Since dconf is usually the preferred way to retrieve settings data, especially when used in loops, I was curious to the timing of both:
xrandr
:
real 0m0.067s
user 0m0.000s
sys 0m0.003s
dconf read /org/compiz/profiles/unity/plugins/core/outputs:
real 0m0.004s
user 0m0.000s
sys 0m0.003s
...which shows a dramatic difference.
A great part of my answers around here include a background script. In many cases I use xrandr
in a periodical loop. In other cases I use xrandr
only at startup of the script to "save fuel", while it would be more elegant to be able to update the information while the script is running (e.g. when an external screen is connected).
Using dconf
instead of xrandr
would therefore be a major improvement in many of my answers.
However
Editing in the "new insight" would involve many answers in my case. I wouldn't want to be suspected of abusing the system to get older posts to the front page.
My question is therefore, before flooding the site with edited older posts:
Is it "not done" to serial- edit your own posts?
DISPLAY=:0
exported (xrandr
works fine).dconf list /org/compiz/profiles/unity/plugins/core/
tells me it hasvsize
,hsize
andactive-plugins
. And I don't use Unity, though I have it installed./org/compiz/profiles/unity/plugins/core/outputs
has a valid output then let the script use it in a loop instead ofxrandr
. That will take much more time to edit then mass- replacing the use ofxrandr
.