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 Sun 23 Nov 2014, 03:31
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
How to switch desktops by using Bash?
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [4 Posts]  
Author Message
RSH


Joined: 05 Sep 2011
Posts: 2420
Location: Germany

PostPosted: Tue 17 Jul 2012, 11:46    Post subject:  How to switch desktops by using Bash?  

Hi!

I want to write a little script where i need to change the desktop by shell script (bash). How could this be done?

RSH

_________________
LazY Puppy
RSH's DNA
SARA B.
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4376

PostPosted: Tue 17 Jul 2012, 14:35    Post subject:  

see your window manager's documentation, it will vary
for e16 you can use eesh
for any wm with key bindings for switching desktops, (in jwm the default is Alt + number) you can use any key scripting tool like xdotool (I recently posted a pet in additional software) or this xcb example
http://cgit.freedesktop.org/xcb/demo/tree/app/xte/xte.c

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
RSH


Joined: 05 Sep 2011
Posts: 2420
Location: Germany

PostPosted: Tue 17 Jul 2012, 22:01    Post subject:  

Thank you for your reply, technosaurus (not shinobar - sorry).

I could solve this using xdotool -which has been already installed in LazY Puppy 528-4- using command key. I have also (re)-discovered the FbPanel/Openbox-thread here, which has (re)-leaded me to /root/.config/openbox/rc.xml - i like to use the keyboard and keyboard-shortcuts (left-handed).

_________________
LazY Puppy
RSH's DNA
SARA B.

Last edited by RSH on Wed 18 Jul 2012, 04:03; edited 1 time in total
Back to top
View user's profile Send private message 
jamesbond

Joined: 26 Feb 2007
Posts: 2230
Location: The Blue Marble

PostPosted: Wed 18 Jul 2012, 01:46    Post subject:  

wmctrl -s $DESKTOP_NUMBER

where $DESKTOP_NUMBER is the desktop number, counted from zero.

http://tomas.styblo.name/wmctrl/. Works in openbox.

_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [4 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.0454s ][ Queries: 12 (0.0064s) ][ GZIP on ]