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 Wed 22 Oct 2014, 01:20
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 Posts_count  
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: 4353

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.

Edited_time_total
Back to top
View user's profile Send_private_message 
jamesbond

Joined: 26 Feb 2007
Posts: 2227
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:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Off-Topic Area » Programming
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0438s ][ Queries: 12 (0.0044s) ][ GZIP on ]