You are not logged in.

#1 2010-04-23 16:57:43

FeatherMonkey
Member
Registered: 2007-02-26
Posts: 313

dbus call to get compiz current viewport.

Can any one tell me how to get the current viewport via a dbus call.

What I'm trying to achieve is conky transparency with compiz wallpapers. So if some has a better solution I'm all ears.

What I thought is I could use feh to change the background according to the viewport but I can't find any documentation in regards to it. Unless I missed it, feh will only give me the one wallpaper.

So I thought psuedo code'ish. After getting the viewport ..

n = viewport
feh background = array[n]

#where the array is returned from
dbus-send --print-reply --type=method_call --dest=org.freedesktop.compiz /org/freedesktop/compiz/wallpaper/screen0/bg_image org.freedesktop.compiz.get

But I can't find a bus way to get the compiz viewport.

Last edited by FeatherMonkey (2010-04-23 16:58:18)

Offline

#2 2010-04-27 14:16:04

PirateJonno
Forum Fellow
From: New Zealand
Registered: 2009-04-13
Posts: 372

Re: dbus call to get compiz current viewport.

there's no dbus call I am aware of, but you can use xprop, for example, on workspace 2:

~$ xprop -root _NET_DESKTOP_VIEWPORT
_NET_DESKTOP_VIEWPORT(CARDINAL) = 1280, 0
~$ xprop -root _NET_DESKTOP_GEOMETRY
_NET_DESKTOP_GEOMETRY(CARDINAL) = 5120, 1024

you can extract these values with grep or sed. For normal window managers the following properties are used:

~$ xprop -root _NET_NUMBER_OF_DESKTOPS
_NET_NUMBER_OF_DESKTOPS(CARDINAL) = 1
~$ xprop -root _NET_CURRENT_DESKTOP
_NET_CURRENT_DESKTOP(CARDINAL) = 0

as you can see, with compiz enabled X thinks I have only one workspace, but a massive one at that


"You can watch for your administrator to install the latest kernel with watch uname -r" - From the watch man page

Offline

#3 2010-05-01 23:23:26

FeatherMonkey
Member
Registered: 2007-02-26
Posts: 313

Re: dbus call to get compiz current viewport.

I missed the answer.

Thank you for that, that sounds more than feasible to work with.

Offline

Board footer

Powered by FluxBB