Roxset (Improved)

Filemanagers, partitioning tools, etc.
Message
Author
aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#21 Post by aragon »

based on the code barry provided on the woff-thread, here's the code to get the actual screensize:

width:

Code: Select all

xwininfo -root | grep '\geometry' | cut -f4 -d ' ' | cut -f1 -d 'x'
height

Code: Select all

xwininfo -root | grep '\geometry' | cut -f4 -d ' ' | cut -f2 -d 'x' | cut -f1 -d '+'
by implementing this code, i t should be possible to setup 2 half-screen ROX-windows.

aragon

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#22 Post by Sylvander »

What I've just now done:

1. Used Roxset to open 2 windows and resized them so they each occupy half screen, tiled left & right.

2. Used the idea of DaveS:
Opened a Rox-filer window and set "never automatically resize".
This is working. :)
But should I have done this only AFTER the Roxset window sizes were specified?

3. Used the idea of aragon:
Running the code he supplied gave:
Width = 1024
Height = 768
But I don't understand this.
How come there's only ONE width and height for TWO windows.
To specify the locations and sizes of 2 windows, wouldn't it be necessary to specify X & Y co-ordinates for the two corners [of the 2 windows], then then specify the width and height of the 2 windows?
Exactly as mentioned by seaside.

4. @seaside
(a) I assume the values to be altered are those in the /usr/local/bin/roxset executable file.

(b) Tried the following changed values, but it seemed to make no difference.
Having been educated in Engineering I'm well accustomed to the use of X & Y co-ordinates. :)
I'm assuming 0,0 [the origin] is top left, and X is horizontally to the right, and Y is vertically downward.
Is this assumption correct?

Code: Select all

#!/bin/sh
rox 
WID=`xdotool getactivewindow`
xdotool windowsize $WID 512 384 &
xdotool windowmove $WID 512 0

rox /
WID=`xdotool getactivewindow`
xdotool windowsize $WID 512 384 &
xdotool windowmove $WID 0 0
Last edited by Sylvander on Thu 27 Aug 2009, 08:23, edited 1 time in total.

aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#23 Post by aragon »

sylvander, please read carefully screensize not windowsize ;-)

please try this code, it a little rough but works:

Code: Select all

#!/bin/sh
SW=`xwininfo -root | grep '\geometry' | cut -f4 -d ' ' | cut -f1 -d 'x'`
SH=`xwininfo -root | grep '\geometry' | cut -f4 -d ' ' | cut -f2 -d 'x' | cut -f1 -d '+'`
SH2=`echo "scale=0; $SH*0.94" | bc -l | cut -f1 -d '.'`
HSW=`echo "scale=0; $SW/2*0.98" | bc -l | cut -f1 -d '.'`
HSP=`echo "scale=0; $SW/2-1" | bc -l | cut -f1 -d '.'`

rox 
WID=`xdotool getactivewindow`
xdotool windowsize $WID $HSW $SH2 &
xdotool windowmove $WID $HSP 0

rox /
WID=`xdotool getactivewindow`
xdotool windowsize $WID $HSW $SH2 &
xdotool windowmove $WID 0 0
aragon

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#24 Post by Sylvander »

1. "please read carefully screensize not windowsize"
Right...
Wasn't sure what you were intending, but when I saw the numbers I guessed they were the screensize, so I used those [as you will have noticed no doubt].

2. This new code...
No idea what it is intended to achieve. Could you explain?
It opened 2 Rox windows each with unsuitable dimensions and location.
Below is a screenshot of the resulting output in the Sakura terminal window.
Attachments
00.jpg
(135.23 KiB) Downloaded 711 times

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#25 Post by DaveS »

aragon, the option to not auto resize works well. It comes from the rox option setting

Code: Select all

<Option name="filer_auto_resize">2</Option>
Do you see a way to pass that as a command line arguement in the roxset script such that it would be effective for that session only?
Spup Frugal HD and USB
Root forever!

aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#26 Post by aragon »

@sylvander
it's the content for the script.

@dave
possible i will look at this later.

aragon

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#27 Post by DaveS »

Sylvander, this should work on your screen

Code: Select all

#!/bin/sh
rox
WID='xdotool getactivewindow'
xdotool windowsize $WID 500 600 &
xdotool windowmove $WID 510 5

rox
WID='xdotool getactivewindow'
xdotool windowsize $WID 500 600 &
xdotool windowmove $WID 5 5
Good luck.
BTW, it makes no dif when you set the 'do not autoresize' option.
Spup Frugal HD and USB
Root forever!

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#28 Post by Sylvander »

1. "this should work on your screen"
(a) I'm afraid it didn't produce the needed result. :(
Gave 2 equi-sized rectangular windows [longer than high] in the middle of the screen, slightly offset from each other.
Are those numbers in millimeters [mm]?

(b) I notice that each time I run Roxset...
1) Both windows come up the same size.
AND...
2) The 1st window is ALWAYS in the same location in the middle of the screen.
AND...
3) The 2nd window appears in a different RANDOM location each time Roxset is run.
[But NEVER located exactly on top of the 1st window]
This is consistent with the way other windows behave under the control of the BoxPup window manger.
e.g. The smm ["SaveMyModem"] window appears in a different random location each time it is run [and a real pest it is too].
Is this to be considered a feature or a fault [bug]?

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#29 Post by DaveS »

Ah, understood. The roxset script works with JWM, but clearly not with box. I have no knowledge of *box window managers so can help no further. Sorry............
Spup Frugal HD and USB
Root forever!

aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#30 Post by aragon »

Sylvander wrote:Is this to be considered a feature or a fault [bug]?
this is a feature of openbox and some other wm called smart-placement.

i think we will first try to implement a working solution for jwm (as this is the default wm for puppy) and then try to find a solution for other wm.

aragon

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#31 Post by Sylvander »

Should I try to install and use a different window manager?

Or stay with the existing one [openbox?]

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#32 Post by seaside »

Sylvander wrote:Should I try to install and use a different window manager?

Or stay with the existing one [openbox?]
Sylvander,

Perhaps Openbox has a tiling option and if not, you may want to look into a tiling window manager - see

http://www.murga-linux.com/puppy/viewtopic.php?p=258224

Hope your windows get clearer. :D

aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#33 Post by aragon »

DaveS wrote:aragon, the option to not auto resize works well. It comes from the rox option setting

Code: Select all

<Option name="filer_auto_resize">2</Option>
Do you see a way to pass that as a command line arguement in the roxset script such that it would be effective for that session only?
short progress report:
i'm able to temporarely change the rox-option and restore the previous options after running the script. problem is, that the new 'side-by-side'-windows pick-up the restored setting, so that we have the same as without it.

so for the moment the way is to set the option to not auto-resize in rox. after that the script as posted runs fine (for me).

i will report if i find out more.

aragon

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#34 Post by Sylvander »

1. Was reading here about a "tile" program for openbox.

2. Found the tile-0.7.8.pet at this webpage, and installed it and rebooted...
But I cannot see how it works.
No menu entry.
Not listed by a terminal.
Though it IS listed by the Package Manager as installed.

aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#35 Post by aragon »

@sylvander

it is listed because it is installed. ;-) What you have installed is a theming engine for tk http://tktable.sourceforge.net/tile/

but one question, as this is not very clear to me:
what do you want to achieve?
a. Having a filemanager with 2 panels?
b. Having a tiling windowmanager?
c. ...

a. There are some (only a selection)
- Tuxcommander : http://www.murga-linux.com/puppy/viewtopic.php?t=27599
- Midnight Commander http://www.murga-linux.com/puppy/viewtopic.php?t=30729
b. I won't recommend that. It's a very nice concept but very different in usage compared to 'usual' wm's.
c. ???

aragon

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#36 Post by Sylvander »

1. "what do you want to achieve?
a. Having a filemanager with 2 panels?
"
I wanted to see whether a dual-window Rox would be worth having in addition to, or instead of Xfe [which I think is GREAT! :D ].
I'm seeing it said that Rox can do interesting things and that a dual-pane Rox is even better.
Best way to see what it can do is to try it out.

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#37 Post by seaside »

aragon wrote:
DaveS wrote:aragon, the option to not auto resize works well. It comes from the rox option setting

Code: Select all

<Option name="filer_auto_resize">2</Option>
Do you see a way to pass that as a command line arguement in the roxset script such that it would be effective for that session only?
short progress report:
i'm able to temporarely change the rox-option and restore the previous options after running the script. problem is, that the new 'side-by-side'-windows pick-up the restored setting, so that we have the same as without it.

so for the moment the way is to set the option to not auto-resize in rox. after that the script as posted runs fine (for me).

i will report if i find out more.

aragon
aragon,

I tried to pass the option for No auto-resize by the SOAP command line interface (even though the documentation says nothing about this option, just in case it wasn't documented) and nothing seemed to work.

I very much like your code for making two equal panes that cover the desktop based on actual screen size - checked it for a variety of screen resolutions and they worked nicely with only the 800x600 having a slight overlap which is due to WM bickering (not enough to be a real problem).

Some questions to all before I repackage Roxset with Aragon's nice work---

It seems to me that the best use of Roxset is to run it without auto-sizing and thus making it for all practical purposes a two-paned fixed window environment.

With that in mind, just changing the Rox Options file to "filer_auto_resize">2 at the beginning of the Roxset script would achieve this, but place Rox in "No-autosize" mode.
(The next time Rox is run it won't Autosize, unless the Options part of Rox is reset)

This wouldn't be of much concern to me - I'd just change the option back if I wanted to, but perhaps this might confuse others.

The other way would be to just note that one of the panes should be right-clicked and under Options>Filer windows>Never automatically resize be selected.

Any thoughts on this........

User avatar
trapster
Posts: 2117
Joined: Mon 28 Nov 2005, 23:14
Location: Maine, USA
Contact:

#38 Post by trapster »

Fluxbox has an option to save size and location of windows (among others). Right click on the title bar and unselect "Remember Position"and "Remember Dimension". These settings are stored in /root/.fluxbox/apps.

I would presume other *box wm's have something similar (?).

roxset works ok if you set the size of the window in ~/.fluxbox/apps and choose "Remember Dimension", but it seems to work best if you dont have flux remember Dimension or Position and set those in roxset.

Nice little app!
trapster
Maine, USA

Asus eeepc 1005HA PU1X-BK
Frugal install: Slacko
Currently using full install: DebianDog

User avatar
`f00
Posts: 807
Joined: Thu 06 Nov 2008, 19:13
Location: the Western Reserve

#39 Post by `f00 »

@Sylvander
Blackbox wm (here's a nice one, trim the 'excess' styles as you like :) thread here for further info) is fairly simple and close (enough) to Openbox for an auxiliary/special-case wm - as noted, simply switch the Rox option for resize and set the BB mainmenu/config for however you like your window placement (bottom-to-top, left-to-right, etc.. it's pretty much bulletproof and quick) .. rolling/sloppy focus and such is fairly intuitive (a few items like delay might be better set in /root/.blackboxrc if you really like BB :) ). You can even edit BB's 'base' menu for a very quick switch to Openbox wm (wm only, it may keep the blackbox bg if that's set in the BB-style) from BB. A 'full' switch is better done by other means like Exit to Prompt...

aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#40 Post by aragon »

seaside wrote: I very much like your code for making two equal panes that cover the desktop based on actual screen size - checked it for a variety of screen resolutions and they worked nicely with only the 800x600 having a slight overlap which is due to WM bickering (not enough to be a real problem).
for 800 x 600 try to play with the percentages (0.94 and 0.98 ) in these lines:

Code: Select all

SH2=`echo "scale=0; $SH*0.94" | bc -l | cut -f1 -d '.'`
HSW=`echo "scale=0; $SW/2*0.98" | bc -l | cut -f1 -d '.'`
seaside wrote: Some questions to all before I repackage Roxset with Aragon's nice work---

It seems to me that the best use of Roxset is to run it without auto-sizing and thus making it for all practical purposes a two-paned fixed window environment.

With that in mind, just changing the Rox Options file to "filer_auto_resize">2 at the beginning of the Roxset script would achieve this, but place Rox in "No-autosize" mode.
(The next time Rox is run it won't Autosize, unless the Options part of Rox is reset)

This wouldn't be of much concern to me - I'd just change the option back if I wanted to, but perhaps this might confuse others.

The other way would be to just note that one of the panes should be right-clicked and under Options>Filer windows>Never automatically resize be selected.

Any thoughts on this........
i would recommend to not change the autoresizing in the script. What you could do is to place an pinstall.sh (postinstall-sript) in the pet-file which automatically runs a xmessage-message with the info.

aragon

Post Reply