You are not logged in.

#1 2010-04-04 08:42:14

Anniekin
Member
Registered: 2010-03-23
Posts: 55

Q: shell .sh script to pipe xwininfo [SOLVED_by_raf]

I want to pass the Desktop window ID to xscreensaver in order have it autostart.

Unfortunately the output of xwininfo is more than just the id so i cannot use something like ../xscreensaver/xxx -window-id $(`xwininfo -name Desktop'):

xwininfo: Window id: 0x1400003 "Desktop"

Absolute upper-left X: 0
Absolute upper-left Y: 0
Relative upper-left X: 0
blahblahblah...
Override Redirect State: no
Corners: +0+0 -0+0 -0-0 +0-0
-geometry 1280x1024+0+0

Is there a way of taking just the window id "0x1400003" and passing it on to xscreensaver's command?

Last edited by Anniekin (2010-04-04 20:53:38)

Offline

#2 2010-04-04 10:23:55

raf_kig
Member
Registered: 2008-11-28
Posts: 143

Re: Q: shell .sh script to pipe xwininfo [SOLVED_by_raf]

xwininfo -name Desktop | awk '/Window id/ {print $4}'

Regards,

raf

/e use it like that:

xscreensaver -window-id $(xwininfo -name Desktop | awk '/Window id/ {print $4}')

Last edited by raf_kig (2010-04-04 10:25:44)

Offline

#3 2010-04-04 19:12:16

Anniekin
Member
Registered: 2010-03-23
Posts: 55

Re: Q: shell .sh script to pipe xwininfo [SOLVED_by_raf]

nice! thank you

Offline

#4 2010-04-04 20:09:28

raf_kig
Member
Registered: 2008-11-28
Posts: 143

Re: Q: shell .sh script to pipe xwininfo [SOLVED_by_raf]

You are welcome. Please mark the thread as solved.

Regards,

raf

Offline

#5 2010-04-04 20:52:11

Anniekin
Member
Registered: 2010-03-23
Posts: 55

Re: Q: shell .sh script to pipe xwininfo [SOLVED_by_raf]

how do i stop the screensaver

Offline

Board footer

Powered by FluxBB