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 Tue 13 Nov 2018, 22:56
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff)
N-ply-Rox-Filer window-opening scripts: to open 1,2,3, or 4
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [4 Posts]  
Author Message
svanya

Joined: 29 Sep 2014
Posts: 15

PostPosted: Wed 14 Jun 2017, 17:17    Post subject:  N-ply-Rox-Filer window-opening scripts: to open 1,2,3, or 4  

N-ply-Rox-Filer window-opening scripts: to open 1,2,3, or 4 windows at once

Preface:

Been a long time since I shared anything on this forum, and found myself thinking of how much puppy and its users have helped me "along the way".

So thought to share these scripts as they may help someone else "see better" their world and the work they are doing.

Instructions:

The four scripts (using (installed by default in the latest puppies) "wmctrl") from a singe click open (respectively) 1, 2, 3 or 4 roxfiler windows laid out on the screen so you can see that many folders at once (3-ply pic and code example below)

You Will need to adjust the scripts (they are currently configured for 1366x768) according to your screen dimensions (Well, worth the effort) according to the following syntax: wmctrl -r:ACTIVE: -e 0,x off-set,y off-set,width,height.

They are currently aligned so that the bottom portion of your window and tool-bar (if on the bottom) is exposed, so that you can browse and yet still have access to your os controls.

(I have included example icons to go along with them.)

Once you have downloaded and extracted them, you only need to 1) put them in your path, ex. "/usr/bin" or "/root/my-applications/bin" and 2) drag them to your desktop (for instance) to give you immediate access to all of the scripts, aka. window views.

Peace, love, and joy.

And thanks for all you do.

Sincerely,
Scott Vanya

p.s. let me know if you need additional help setting this up. I will be more than happy to explain further, ex. how to add icons to the scripts.

3-ply example code:

Code:
#!/bin/sh
#syntax: -e 0,x off-set,y off-set,width,height

rox ~/HOME
wmctrl -r:ACTIVE: -e 0,0,0,452,515

rox ~/HOME
wmctrl -r:ACTIVE: -e 0,452,0,452,515

rox ~/HOME
wmctrl -r:ACTIVE: -e 0,904,0,452,515


N-ply-Rox-Filer.zip
Description 
zip

 Download 
Filename  N-ply-Rox-Filer.zip 
Filesize  128.74 KB 
Downloaded  170 Time(s) 
Back to top
View user's profile Send private message 
smokey01


Joined: 30 Dec 2006
Posts: 2771
Location: South Australia :-(

PostPosted: Wed 14 Jun 2017, 20:08    Post subject:  

@svanya
You might want to advise what Puppy's this works on as wmctrl may not be included.

_________________
Software <-> Distros <-> Tips <-> Newsletters
Back to top
View user's profile Send private message Visit poster's website 
musher0

Joined: 04 Jan 2009
Posts: 12958
Location: Gatineau (Qc), Canada

PostPosted: Wed 14 Jun 2017, 22:06    Post subject:  

Great find, svanya!

@smokey01:
Interested people can find a copy of wmctrl-1.0.7 here. This pet
package from forum member lithpr dating back to 2011, I suspect it
will fit Puppies new and old.

IHTH. BFN.

_________________
musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
Back to top
View user's profile Send private message 
svanya

Joined: 29 Sep 2014
Posts: 15

PostPosted: Sun 11 Mar 2018, 05:34    Post subject: Updated to a generic script  

This is easier and more adaptable to use automatically capturing the screen size and only taking (mainly) as input the number of windows to be opened and the percent of the screen height to use. It also allows you to set which directory you want opened in each window.

Also, as to getting wmctrl: I believe (at least as of Trusty) it is in the repo(s). Also as of Trusty it comes preinstalled.

Ciao for now.
Happy Kaleidescopic Seeing.
-Scott


Code:
#!/bin/sh
#wmtrcl syntax: wmctrl -r:{which window to move} -e 0,x off-set,y off-set,width,height
#windows=the number of windows to open
#per=the percent of the screen height each window should take up
#slp=how to wait before opening the next window (float) which can be adjust according to your computer speed
#path=the directory you want to open in each window

windows=3
per=0.75
slp=0.5
dir="/root"

screenwidth=`xdpyinfo | grep dimensions | sed -r 's/^[^0-9]*([0-9]+x[0-9]+).*$/\1/' | cut -d'x' -f1`
screenheight=`xdpyinfo | grep dimensions | sed -r 's/^[^0-9]*([0-9]+x[0-9]+).*$/\1/' | cut -d'x' -f2`

width=$(echo "$screenwidth / $windows - 6" | bc) #`expr ($screenwidth / $windows ) - 20`
height=$(echo "$screenheight*$per" | bc)

xoffset=0
COUNTER=0

while [  $COUNTER -lt $windows ]; do
   rox "$dir"
   wmctrl -r:ACTIVE: -e 0,"$xoffset",0,"$width","$height"
   sleep "$slp"

   let COUNTER=COUNTER+1
   xoffset=$(echo "$screenwidth / $windows * $COUNTER" | bc)
done

exit 0
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 » Advanced Topics » Additional Software (PETs, n' stuff)
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.0668s ][ Queries: 15 (0.0200s) ][ GZIP on ]