Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 18 Dec 2014, 16:21
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
shell .sh script to pipe xwininfo
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [3 Posts]  
Author Message
Anniekin


Joined: 24 Feb 2009
Posts: 209

PostPosted: Sun 04 Apr 2010, 02:05    Post subject:  shell .sh script to pipe xwininfo
Subject description: xscreensaver desktop on startup
 

I need 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 ../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
Relative upper-left Y: 0
Width: 1280
Height: 1024
Depth: 24
Visual Class: TrueColor
Border width: 0
Class: InputOutput
Colormap: 0x20 (installed)
Bit Gravity State: NorthWestGravity
Window Gravity State: NorthWestGravity
Backing Store State: NotUseful
Save Under State: no
Map State: IsViewable
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?
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7841
Location: qld

PostPosted: Sun 04 Apr 2010, 02:48    Post subject:  

I suspect you aren't using rox-desktop because "Desktop" fails for me, but if I use "ROX-Filer" it works. The principle is the same.

2 ways I know of
Code:
xwininfo -name ROX-Filer | grep "ROX-Filer" | awk '{print $4}'
or
Code:
xwininfo -name ROX-Filer | grep "ROX-Filer" | cut -d ' ' -f4


HTH

Cheers

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
Anniekin


Joined: 24 Feb 2009
Posts: 209

PostPosted: Wed 07 Apr 2010, 01:16    Post subject:  

Thanks micko,

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

this works also
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [3 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0463s ][ Queries: 11 (0.0078s) ][ GZIP on ]