You are not logged in.

#26 2009-08-27 13:52:44

BurntSushi
Member
From: Massachusetts
Registered: 2009-06-28
Posts: 362
Website

Re: PyTyle: Manual tiling manager for EWMH compliant WM's

daneel971 wrote:

I think of it like two columns of equal width under the main window; the main window is full stretched horizontally and for the 60% of the screen height vertically.
Windows order should be like |/|; a new windows add itself to the last position (yes, I like complicated things tongue).

Hmm okay, I'll see what I can do. I do definitely like the idea.

daneel971 wrote:

It's great - but sometimes I need to access my desktop, so a "little cascade" will be useful. Anyway, I'm more than happy as it is, so don't worry if it's not possible.

Of course it's possible. The "little" cascade should actually be only a slight modification of the current cascade layout. I'll add it to the available tilers, but won't stick it in the config file by default. (So you'll just have to add "LittleCascade" to the list of tilers to use it.)

daneel971 wrote:

Thanks for this. A final note: if the program, other than running as a demon, could be used even by invocation with a keyword (something like "pytyle horiz", we could bind a specific layout to an openbox menù item.

Hmmm, okay. I'll try to come up with something here, but I think first will be the ability to set specific layouts to certain keys.

daneel971 wrote:

BTW: what about calling it pywire (python windows rearrange)? it sounds cool... smile

Oooh, I like that, but I already registered the domain! LOL. (pytyle.com just redirects to the SF page right now- I plan on adding a wiki soon.)

Wintervenom wrote:

Could there be an option to automatically enable tiling on all wokspaces and screens whenever it starts (as opposed to pressing Tile.tile on every one)?

Yes, another great suggestion! I'll add that.


In other news, I'm pretty sure that I have Compiz working- with near 100% functionality. Currently, I have a configuration option that is required to be set to tell PyTyle that you're using Compiz. I haven't released this code yet, but it will hopefully be today. And while this process has made me hate viewports with a passion, I must admit that it's pretty neat to drag windows to and fro using Expo and watch them tile immediately :-) Haha. (After implementing this, I now know why panels usually cough when you use them with Compiz- it's simply a bitch to compile a list of tasks on a viewport-by-viewport basis. It took me quite some time to realize every single x,y coordinate of a window being reported is actually relative to the current viewport.) If anyone else knows of other window managers that use viewports, let me know, and I'll see if my compiz code will work with them.

And thanks for the comments zodmaner!


Education is favorable to liberty. Freedom can exist only in a society of knowledge. Without learning, men are incapable of knowing their rights, and where learning is confined to a few people, liberty can be neither equal nor universal.

Tu ne cede malis sed contra audentior ito

Offline

#27 2009-08-27 21:29:16

wankel
Member
From: Iowa, USA
Registered: 2008-05-30
Posts: 218
Website

Re: PyTyle: Manual tiling manager for EWMH compliant WM's

That was quick on the compiz update! Look forward to trying it out smile

Offline

#28 2009-08-27 22:39:26

BurntSushi
Member
From: Massachusetts
Registered: 2009-06-28
Posts: 362
Website

Re: PyTyle: Manual tiling manager for EWMH compliant WM's

Ya, getting the idea coded in wasn't too bad, it's the testing that takes a while. (I'm really trying hard to keep up with making sure it's working with OpenBox, Flux, Pek, and now Compiz.) It's absolutely flawless with OpenBox, and the others have a few peccadilloes.

I'll get a release out tonight, for sure. Here's what I've added:

* Support for Compiz (and in theory, support for any WM that uses viewports).
* Added more configuration options:
** Options on a per-layout basis (this allows you, for example, to make different cascading layouts like daneel wanted to do)
** Option to enable *all* workspaces/screens for tiling when PyTyle starts.
** Added the ability to bind keys to certain layouts.


Education is favorable to liberty. Freedom can exist only in a society of knowledge. Without learning, men are incapable of knowing their rights, and where learning is confined to a few people, liberty can be neither equal nor universal.

Tu ne cede malis sed contra audentior ito

Offline

#29 2009-08-28 05:27:23

BurntSushi
Member
From: Massachusetts
Registered: 2009-06-28
Posts: 362
Website

Re: PyTyle: Manual tiling manager for EWMH compliant WM's

Okay, I've updated AUR with a new release.

Your current configuration file will not work with this new version.

Your best bet is to simply rename your current configuration file, and let PyTyle make you a new one. Then you can put your changes back in that one.

I've detailed all the updates in the CHANGELOG:

0.7

- Initial support for Compiz.
    This is done by detecting and calculating all of the viewports that
    Compiz uses instead of desktops. The only thing that's giving me a
    bit of trouble in Compiz is the Cascade layout, namely, something is
    going wrong when I'm resetting the stacking order. (Window focus is
    weird.) Also, if you're curious, x/y positions of windows in Compiz
    are *relative* to the current viewport. So if you're using wmctrl to
    debug, don't expect to get cogent x,y positions unless you figure in
    the current viewport (which wmctrl will give you with wmctrl -d).
   
    Note: Using multiple desktops with multiple viewports should, in theory
    work. It has not been tested.
   
    Note 2: PyTyle is only enabling viewport support when it detects that
    *Compiz* is the window manager. If any other window manager needs
    viewport support from PyTyle, I'll need to know about it to add it. (Or
    you could modify Probe.is_compiz.)
   
    Note 3: Per workspace/screen default layouts work with viewports. However,
    this will not work as expected if you're using viewports and multiple
    desktops.
   
- Global tiling option added
    This is found in the "MISC" section of the configuration file. When
    enabled, tiling will automatically be enabled on *all* workspaces and
    screens. Meaning that, if you start PyTyle with this option enabled,
    it will tile all workspaces immediately. (It will still use default
    layouts specified in TILING.) You can still disable tiling on a per
    workspace/screen basis by issuing the traditional "untile" command.
   
- Key binding setup changed (Support for specific layout on key press)
    Before, I was using first class methods to bind keys to certain tiling
    actions. While easy to do, it was not robust enough. I have now replaced
    the first class methods in the configuration file with simple strings.
    (Which, incidentally, are eventually passed through eval.) This means
    that any old configuration file will be an epic fail with this new
    version.
   
    Note: You can bind keys to layouts by following the examples in the
    configuration file. (By default, they are commented out.)
   
    Note 2: "tile.default" has replaced "Tile.tile". It is the same thing.
   
    Note 3: Incidentally, if you wanted to bind a certain tiling layout to
    say, a menu item in OpenBox, you might set the Cascade layout to
    "Ctrl-Alt-C", and you could use the command "xdotool key ctrl-alt-c"
    to instruct PyTyle to use the Cascade layout. This of course requires
    that you install xdotool. (This "workaround" is in place of using a
    command line option like "pytyle cascade". It's possible this will be
    implemented in the future.)
   
- Specific layout options
    Layouts can now have specific configuration options. For example, the
    Cascade layout was at first using the full screen. Instead of creating
    a new and separate layout that was representative of a more traditional
    cascading layout (i.e., not full screen, and indented windows), I've
    added the ability to simply re-tool the current Cascade layout. For
    example, you can change the "push_over" option to have a window indent
    effect, or perhaps you might want the windows cascading on the right
    side of the screen instead of the left. Among other things, you can also
    change the relative width/height of the cascading windows.
   
- New tiling layout added: Horizontal Rows
    Make sure you have a nice tall screen for this one! This resembles the
    regular horizontal layout, but instead of piling all the windows in one
    row underneath the master, it will actually use an arbitrary number of
    rows depending on the number of columns you specify. (Another example
    of using layout specific configuration- by default, it is 2 columns.)
    All the usual tiling functions still work with this layout.

@daneel- Your horizontal rows layout was actually quite fun to code big_smile

I believe I've caught up with addressing everyone- if I've missed/forgot about you, let me know.

Last edited by BurntSushi (2009-08-28 05:35:31)


Education is favorable to liberty. Freedom can exist only in a society of knowledge. Without learning, men are incapable of knowing their rights, and where learning is confined to a few people, liberty can be neither equal nor universal.

Tu ne cede malis sed contra audentior ito

Offline

#30 2009-08-28 20:18:49

BurntSushi
Member
From: Massachusetts
Registered: 2009-06-28
Posts: 362
Website

Re: PyTyle: Manual tiling manager for EWMH compliant WM's

I've setup a basic wiki: http://pytyle.com

I've also updated AUR with a quick bug release- it was preventing HorizontalRows from fully functioning.


Education is favorable to liberty. Freedom can exist only in a society of knowledge. Without learning, men are incapable of knowing their rights, and where learning is confined to a few people, liberty can be neither equal nor universal.

Tu ne cede malis sed contra audentior ito

Offline

#31 2009-08-28 23:21:33

Wintervenom
Member
Registered: 2008-08-20
Posts: 1,011

Re: PyTyle: Manual tiling manager for EWMH compliant WM's

Two more ideas:  on the layout that cascades the windows, maybe it could re-arrange them when you change focus on windows, so you can always see the title bars of all the other windows, like in WMII.  Also, I think it would be convenient if the width/height ratio did not reset every time a new window is opened.

Last edited by Wintervenom (2009-08-28 23:23:01)

Offline

#32 2009-08-29 01:57:17

BurntSushi
Member
From: Massachusetts
Registered: 2009-06-28
Posts: 362
Website

Re: PyTyle: Manual tiling manager for EWMH compliant WM's

Wintervenom wrote:

Two more ideas:  on the layout that cascades the windows, maybe it could re-arrange them when you change focus on windows, so you can always see the title bars of all the other windows, like in WMII.

Yeah, that was what I had originally programmed. Unfortunately, it was nearly unusable because it was extremely slow. Every time you change focus it has to rearrange every single window. Is that how it works in WMII? (It was okay for a few windows, but more than 4 or so, it got noticeable. Keep going up to 10 or more, and it's unbearable. I know 10+ windows is a rare use case, but it was too slow IMO even at 5 or 6.

I'm open to suggestions for other behavior, though. Also, if you want to take a look at that original way I had programmed it, let me know if you're interested. Maybe you can help me come up with some better behavior.

Wintervenom wrote:

Also, I think it would be convenient if the width/height ratio did not reset every time a new window is opened.

Yup, this is on my todo list. It's been bothering me too smile


Education is favorable to liberty. Freedom can exist only in a society of knowledge. Without learning, men are incapable of knowing their rights, and where learning is confined to a few people, liberty can be neither equal nor universal.

Tu ne cede malis sed contra audentior ito

Offline

#33 2009-08-29 03:27:04

Wintervenom
Member
Registered: 2008-08-20
Posts: 1,011

Re: PyTyle: Manual tiling manager for EWMH compliant WM's

BurntSushi wrote:
Wintervenom wrote:

Two more ideas:  on the layout that cascades the windows, maybe it could re-arrange them when you change focus on windows, so you can always see the title bars of all the other windows, like in WMII.

Yeah, that was what I had originally programmed. Unfortunately, it was nearly unusable because it was extremely slow. Every time you change focus it has to rearrange every single window. Is that how it works in WMII? (It was okay for a few windows, but more than 4 or so, it got noticeable. Keep going up to 10 or more, and it's unbearable. I know 10+ windows is a rare use case, but it was too slow IMO even at 5 or 6.

I'm open to suggestions for other behavior, though. Also, if you want to take a look at that original way I had programmed it, let me know if you're interested. Maybe you can help me come up with some better behavior.

Hm, didn't think about that.  Well, in WMII, whenever you're in that mode, it stacks the windows and when you switch, it acts like the pages of book, and you see the title bras of all the windows before it on the top, and of the windows after it at the bottom, so in doesn't have to rearrange the windows.  I'm not sure if Openbox has any way to do that (easily), though...

Last edited by Wintervenom (2009-08-29 03:29:05)

Offline

#34 2009-08-29 03:44:56

BurntSushi
Member
From: Massachusetts
Registered: 2009-06-28
Posts: 362
Website

Re: PyTyle: Manual tiling manager for EWMH compliant WM's

Wintervenom wrote:

Hm, didn't think about that.  Well, in WMII, whenever you're in that mode, it stacks the windows and when you switch, it acts like the pages of book, and you see the title bras of all the windows before it on the top, and of the windows after it at the bottom, so in doesn't have to rearrange the windows.  I'm not sure if Openbox has any way to do that (easily), though...

Okay, I'm going to have to check out WMII myself then. I'm still not clear on how it works. I'll report back tomorrow.

But yeah, if WMII can do it, then so can I. I'm actually not using the window managers to move the windows- I only use the WM's to retrieve information about the windows. When I move the windows itself, I'm talking to X directly. (This is a naive description, window managers will usually intercept my instructions to X and modify them.)


Education is favorable to liberty. Freedom can exist only in a society of knowledge. Without learning, men are incapable of knowing their rights, and where learning is confined to a few people, liberty can be neither equal nor universal.

Tu ne cede malis sed contra audentior ito

Offline

#35 2009-08-29 04:32:51

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,722

Re: PyTyle: Manual tiling manager for EWMH compliant WM's

This is hot.
Sincere thanks from a post-dwm fluxbox user.
Great job BurntSushi!

Edit:: I don't know python but it's darn easy to modify the layouts!

Just modify a little the Tilers/Vertical.py file with those lines:

from PyTyle.Config import Config
... ... ...
        masterRatio = Config.layout(self, 'master_ratio')
        masterWidth = width if not slaves else (width * masterRatio)
... ... ...

And add in ~/.config/pytyle/pytylerc

                  'Vertical': {
                                     'master_ratio': 0.618,
                                     },

I get a default vertical layout with golden ratio!

I suggest this option to be added by default!

Edit::

My question: how to reload configs from pytylerc other than 'killall pytyle && pytyle &' ?

Last edited by lolilolicon (2009-08-29 05:58:38)


This silver ladybug at line 28...

Offline

#36 2009-08-29 11:16:20

daneel971
Member
Registered: 2008-03-28
Posts: 197

Re: PyTyle: Manual tiling manager for EWMH compliant WM's

I tried to add the "MyCascade" tiler following your instructions in pytylerc, so

cp Cascade.py MyCascade.py
sed -e "s/Cascade/MyCascade/" -i MyCascade.py [4 substitutions occurred]

then:
- added the new tiler to the list at the beginning of pytylerc
- added a shortcut (Alt+Ctrl+C) in pytylerc (I checked: it doesn't conflict with anything else)
- uncommented the lines for the layout specs in pytylerc

The error I get (both openbox and kwin from KDE 3.5):

8/29/2009 at 13:8:28:    Could not complete key press request
8/29/2009 at 13:8:28:    Traceback (most recent call last):
  File "/usr/bin/pytyle", line 143, in <module>
    Tile.dispatch(State.get_desktop()._VIEWPORT._SCREEN.get_tiler(), None, e.get_keycode(), e.get_masks())
  File "/usr/lib/python2.6/site-packages/PyTyle/Tile.py", line 103, in dispatch
    action(tiler)
  File "/usr/lib/python2.6/site-packages/PyTyle/Tile.py", line 502, in tile
    self._tile()
  File "/usr/lib/python2.6/site-packages/PyTyle/Tilers/MyCascade.py", line 58, in _tile
    if Config.layout(self, 'horz_align') == 'right':
  File "/usr/lib/python2.6/site-packages/PyTyle/Config.py", line 152, in layout
    if layout in Config.DEFAULTS['LAYOUTS'] and option in Config.DEFAULTS['LAYOUTS'][layout]:
KeyError: 'LAYOUTS'

8/29/2009 at 13:8:28:    Fatal error
8/29/2009 at 13:8:28:    Traceback (most recent call last):
  File "/usr/bin/pytyle", line 133, in <module>
    Tile.dispatch(screen.get_tiler(), 'tile')
  File "/usr/lib/python2.6/site-packages/PyTyle/Tile.py", line 103, in dispatch
    action(tiler)
  File "/usr/lib/python2.6/site-packages/PyTyle/Tile.py", line 502, in tile
    self._tile()
  File "/usr/lib/python2.6/site-packages/PyTyle/Tilers/MyCascade.py", line 58, in _tile
    if Config.layout(self, 'horz_align') == 'right':
  File "/usr/lib/python2.6/site-packages/PyTyle/Config.py", line 152, in layout
    if layout in Config.DEFAULTS['LAYOUTS'] and option in Config.DEFAULTS['LAYOUTS'][layout]:
KeyError: 'LAYOUTS'

Did I do something stupid? ^^

Offline

#37 2009-08-29 15:38:28

BurntSushi
Member
From: Massachusetts
Registered: 2009-06-28
Posts: 362
Website

Re: PyTyle: Manual tiling manager for EWMH compliant WM's

lolilolicon wrote:

This is hot.
Sincere thanks from a post-dwm fluxbox user.
Great job BurntSushi!

Edit:: I don't know python but it's darn easy to modify the layouts!

Just modify a little the Tilers/Vertical.py file with those lines:

from PyTyle.Config import Config
... ... ...
        masterRatio = Config.layout(self, 'master_ratio')
        masterWidth = width if not slaves else (width * masterRatio)
... ... ...

And add in ~/.config/pytyle/pytylerc

                  'Vertical': {
                                     'master_ratio': 0.618,
                                     },

I get a default vertical layout with golden ratio!

I suggest this option to be added by default!

This is fantastic- exactly what I was aiming for!

lolilolicon wrote:

My question: how to reload configs from pytylerc other than 'killall pytyle && pytyle &' ?

Yeah, this is something else I've been thinking about... I'm going to look into this. I'll report back later today. It would really be useful for me too, I'm constantly changing the config file for testing.

It will of course be Alt-Q, XMonad style.

daneel971 wrote:

I tried to add the "MyCascade" tiler following your instructions in pytylerc, so

cp Cascade.py MyCascade.py
sed -e "s/Cascade/MyCascade/" -i MyCascade.py [4 substitutions occurred]

then:
- added the new tiler to the list at the beginning of pytylerc
- added a shortcut (Alt+Ctrl+C) in pytylerc (I checked: it doesn't conflict with anything else)
- uncommented the lines for the layout specs in pytylerc

Hmm, your error tells me that you didn't use "MyCascade" in your layout config. Did you just leave it as "Cascade"? PyTyle is looking for a layout config with your layout name "MyCascade"- when it can't find it, it checks the default configuration. It obviously won't be there either, so it spits back an error.

There was actually a bug here on my part, but nevertheless, you still would have gotten an error. Hopefully that will do the trick.

(Remember, you only need to create a new layout if you need both cascading layouts simultaneously.)


Education is favorable to liberty. Freedom can exist only in a society of knowledge. Without learning, men are incapable of knowing their rights, and where learning is confined to a few people, liberty can be neither equal nor universal.

Tu ne cede malis sed contra audentior ito

Offline

#38 2009-08-29 21:08:12

daneel971
Member
Registered: 2008-03-28
Posts: 197

Re: PyTyle: Manual tiling manager for EWMH compliant WM's

The following are the section of pytylerc that I edited - the rest is untouched.


#------------------------------------------------------------------------------
# MISCELLANEOUS OPTIONS
#------------------------------------------------------------------------------
Config.MISC = {
               # This is a list of all available tilers. If a tiler
               # is not listed here, it cannot be used. They are
               # loaded when PyTyle starts.
               'tilers': ['Vertical', 'Horizontal', 'HorizontalRows', 'Maximal', 'Cascade', 'MyCascade'],
Config.KEYMAP = {
                 # This will enable and tile the current *screen*.
                 # It will also re-tile when pressed. You can
                 # only access the rest of the key bindings if
                 # you've enabled tiling on the current screen.
                 # (Although I'm thinking of changing this for
                 # screen[0-2]_focus.)
                 'Alt-A': 'tile.default',
                 
                 # Examples of how you can bind specific tiling
                 # layouts to certain keys.
                 #'Alt-Ctrl-H': 'tile.Horizontal',
                 #'Alt-Ctrl-M': 'tile.Maximal',
                 'Alt-Ctrl-C': 'tile.MyCascade',
 
                 # An example of a perhaps more "traditional" cascading 
                  # layout that uses smaller windows.
                  #
                  # Note: If you need to have multiple cascading layouts
                  # simultaneously, you'll need to create your own layout.
                  # Quickly:
                  #    1. Create your tiling class, say Tilers/MyCascade.py.
                  #    2. Copy the contents of Tilers/Cascade.py into your
                  #       new file.
                  #    3. Change *all* instances of "Cascade" to "MyCascade"
                  #       or whatever you named your layout.
                  #    4. Add your new tiler to the list above.
                  #    5. Add a new section here of configuration options
                  #       for your new cascading layout.
                 'MyCascade': {
                             'decoration_height': 25,
                             'width_factor': 0.5,
                             'height_factor': 0.5,
                             'push_over': 25,
                             'align': 'left',
                             }
                 }

As for your instructions:
                  #    1. Create your tiling class, say Tilers/MyCascade.py.
                  #    2. Copy the contents of Tilers/Cascade.py into your
                  #       new file.

I did (1) e (2) with "cp Cascade.py MyCascade.py"

                  #    3. Change *all* instances of "Cascade" to "MyCascade"
                  #       or whatever you named your layout.

I did (3) with the sed line reported above (checked then manually: should be OK)

                  #    4. Add your new tiler to the list above.
                  #    5. Add a new section here of configuration options
                  #       for your new cascading layout.

I did (4) and (5) with the edited pytylerc above.
What am I missing? smile

Offline

#39 2009-08-29 23:27:17

BurntSushi
Member
From: Massachusetts
Registered: 2009-06-28
Posts: 362
Website

Re: PyTyle: Manual tiling manager for EWMH compliant WM's

Wow. I'm the stupid one sad

I forgot to update my commented example after I made a change. Change "align" to "horz_align"... That should fix everything up smile (I changed it to horz_align because I thought it might be possible to include vert_align in the future- although I haven't thought about it much.)

Do'h.


Education is favorable to liberty. Freedom can exist only in a society of knowledge. Without learning, men are incapable of knowing their rights, and where learning is confined to a few people, liberty can be neither equal nor universal.

Tu ne cede malis sed contra audentior ito

Offline

#40 2009-08-30 16:05:10

daneel971
Member
Registered: 2008-03-28
Posts: 197

Re: PyTyle: Manual tiling manager for EWMH compliant WM's

Do you have an idea how much I like this? big_smile

pytyle01.th.jpg   pytyle02.th.jpg

Mega-thanks again!

Offline

#41 2009-09-01 00:30:04

Wintervenom
Member
Registered: 2008-08-20
Posts: 1,011

Re: PyTyle: Manual tiling manager for EWMH compliant WM's

Perhaps PyTyle should look out for panel and docks and adjust when it sees them.  Right now, you have to restart if you want it to notice that a panel or dock has been added or removed.

Offline

#42 2009-09-01 03:08:17

BurntSushi
Member
From: Massachusetts
Registered: 2009-06-28
Posts: 362
Website

Re: PyTyle: Manual tiling manager for EWMH compliant WM's

Wintervenom wrote:

Perhaps PyTyle should look out for panel and docks and adjust when it sees them.  Right now, you have to restart if you want it to notice that a panel or dock has been added or removed.

Great idea! The AUR has been updated. (It will only work with one screen and if you haven't set your workarea in the configuration.)

I've also added: dynamic reloading of configuration file and now layout proportions are kept when you add/remove windows. Also, I've added more layout options. (This means changes the configuration file, however, your current configuration file will work just fine. If you want the added layout options, just copy them from the default config file.) See the CHANGELOG for more details:

0.7.3

- Detects new panels/docks on the fly
    PyTyle will now detect panels/docks added while its running. (You shouldn't
    have to restart PyTyle when you change the orientation of your docks/panels.)
   
    Note: This will *only* work if you're using one screen and *haven't* set
    the WORKAREA option in your configuration file.

0.7.2

- New wiki added
    http://pytyle.com
    Check it out!

- Dynamically load your configuration file
    In keeping with the fashion of XMonad, you can now change your PyTyle
    configuration on the fly with the "reload" command (by default, it is
    assigned to the "Alt-Q" key binding). Anything goes. You could even add
    your own custom tiling layout from scratch while PyTyle is running.
   
    Note: The "global_tiling" option isn't available to be changed dynamically.
    Should it? Thoughts are welcome.
   
- Layout proportions are kept
    Before this version, whenever you added/removed a new window to your tiling
    layout, the master/slave proportions were reset to their defaults. This
    should not happen any more. Layouts now have the ability to save their
    "state" on the fly. (If you've been hacking your own layouts, it's important
    that you take a look at the code changes in, say, PyTyle/Tilers/Vertical.py
    so that you can incorporate saving state in your layout as well. It is very
    easy.)
   
    Note: You can reset your tiling state by doing one of the following three
    things:
        1. Change your tiling layout
        2. *Reset* your layout (This isn't the regular "Alt-A" but the
           "Alt-Shift-Space" command.)
        3. Reload your configuration file.
       
- More layout options
    Check out the default configuration file provided with this release for
    additional LAYOUT configuration options. Namely, you can change the default
    width/height factor of the Vertical/Horizontal layouts.
   
    Note: You do not need to incorporate these changes into your configuration
    file. PyTyle keeps all default config settings embedded to fall back on if
    a setting is missing in the configuration file.
   
    Note 2: If you ever want to reset your config file, you can do so easily by
    stopping PyTyle, renaming your current configuration file to something else,
    and starting PyTyle again. You will have a brand new default configuration.


Education is favorable to liberty. Freedom can exist only in a society of knowledge. Without learning, men are incapable of knowing their rights, and where learning is confined to a few people, liberty can be neither equal nor universal.

Tu ne cede malis sed contra audentior ito

Offline

#43 2009-09-02 17:53:50

dejot
Member
From: Osnabruck
Registered: 2007-04-02
Posts: 12

Re: PyTyle: Manual tiling manager for EWMH compliant WM's

Great tool! Thanks for that smile I use musca on the laptop, but openbox at home and missed my tiling there. Now I can have it whenever I want cool
But one question I got: Can I somehow ignore the window sizw hints of e.g. urxvt? The spaces between the windows bug me a little ...

Offline

#44 2009-09-02 19:43:49

BurntSushi
Member
From: Massachusetts
Registered: 2009-06-28
Posts: 362
Website

Re: PyTyle: Manual tiling manager for EWMH compliant WM's

dejot wrote:

Great tool! Thanks for that smile I use musca on the laptop, but openbox at home and missed my tiling there. Now I can have it whenever I want cool

I've actually been meaning to try out Musca- I've heard nothing but great things about it.

dejot wrote:

But one question I got: Can I somehow ignore the window sizw hints of e.g. urxvt? The spaces between the windows bug me a little ...

Ug... You have no idea how long I labored with that problem.

It ain't just urxvt, either- it's Gvim too. (Well, and any other window that sets the height_inc/width_inc size hints.)

Essentially, Openbox is so standards compliant, that it will enforce those size hints... No matter what. It doesn't matter what I do with PyTyle, Openbox takes control and makes sure those width_inc/height_inc size hints are kept quite strictly.

I have already posted this "problem" to the Openbox mailing list, and the result is that this is the intended behavior and not to count on it changing. You can't disable this in Openbox. (Link: http://icculus.org/pipermail/openbox/20 … 06237.html.)

So the last ditch option is to modify the application... I've checked: urxvt doesn't have an option to disable those specific size increments. I've even tried to forcefully remove those size hints from within PyTyle, and it doesn't work. (It actually does, but urxvt, or Openbox, seems to reset the values back. But I didn't pursue this option much further- it got way too hackish.)

So, off to Google I went. It turns out, there is an rxvt derivative that does allow you to change these size hints: mrxvt.

I was so annoyed with this behavior from urxvt that I actually switched to mrxvt. (I'm sure some people here can tell already, I'm quite the perfectionist with a lot of attention to detail.) I made mrxvt look just like my old urxvt, and made it resize itself in increments of 1 pixel- like normal windows.

Of course, mrxvt doesn't support unicode. That could be a deal breaker. It's a minor nuisance for me, but something I can live with 95% of the time. (I still keep urxvt around for that other 5%.)

If you're interested, on mrxvt's man page, check out the smoothResize option. It needs to be enabled, and your home free. (Disabled by default.)

The bottom line is that these terminals set character increments for good reason and that's what you should use. I refuse to accept that, though, and so I use mrxvt for now.

Sorry, I bet you weren't expecting such a long reply on this particular topic, but it was something that drove me crazy. (And still does with Gvim. *sigh*)


Education is favorable to liberty. Freedom can exist only in a society of knowledge. Without learning, men are incapable of knowing their rights, and where learning is confined to a few people, liberty can be neither equal nor universal.

Tu ne cede malis sed contra audentior ito

Offline

#45 2009-09-03 02:44:00

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,722

Re: PyTyle: Manual tiling manager for EWMH compliant WM's

I don't have this problem with fluxbox here though.


This silver ladybug at line 28...

Offline

#46 2009-09-03 03:25:30

BurntSushi
Member
From: Massachusetts
Registered: 2009-06-28
Posts: 362
Website

Re: PyTyle: Manual tiling manager for EWMH compliant WM's

lolilolicon wrote:

I don't have this problem with fluxbox here though.

Nope. Fluxbox isn't as standards compliant as Openbox big_smile

(Fluxbox does partially enforce those size hints, say, when you resize a window normally with you mouse. I believe.)


Education is favorable to liberty. Freedom can exist only in a society of knowledge. Without learning, men are incapable of knowing their rights, and where learning is confined to a few people, liberty can be neither equal nor universal.

Tu ne cede malis sed contra audentior ito

Offline

#47 2009-09-08 05:03:54

Wintervenom
Member
Registered: 2008-08-20
Posts: 1,011

Re: PyTyle: Manual tiling manager for EWMH compliant WM's

I think I've found a bug:  PyTyle seems to assume that docks or panels are on the right or the bottom of the screen, so if you have one on the top or left, PyTyle will place windows over it, and leave an empty space on the other side.

Last edited by Wintervenom (2009-09-08 05:04:20)

Offline

#48 2009-09-08 05:38:12

BurntSushi
Member
From: Massachusetts
Registered: 2009-06-28
Posts: 362
Website

Re: PyTyle: Manual tiling manager for EWMH compliant WM's

Yup you're right- I'll try to get a fix rolled out tomorrow.

In the mean time, you can use the Workarea to force PyTyle to behave smile

Last edited by BurntSushi (2009-09-08 05:38:23)


Education is favorable to liberty. Freedom can exist only in a society of knowledge. Without learning, men are incapable of knowing their rights, and where learning is confined to a few people, liberty can be neither equal nor universal.

Tu ne cede malis sed contra audentior ito

Offline

#49 2009-09-08 16:54:54

x0rg
Member
From: Switzerland
Registered: 2009-07-12
Posts: 116

Re: PyTyle: Manual tiling manager for EWMH compliant WM's

pytyle is a great app, but suddenly, it stopped working. I didn't change the config and no keybind does conflict with an other one.
Console output:

9/8/2009 at 17:57:17:    Could not complete key press request
9/8/2009 at 17:57:17:    Traceback (most recent call last):
  File "/usr/bin/pytyle", line 179, in <module>
    Tile.dispatch(State.get_desktop()._VIEWPORT._SCREEN.get_tiler(), None, e.get_keycode(), e.get_masks())
  File "/usr/lib/python2.6/site-packages/PyTyle/Tile.py", line 87, in dispatch
    if not tiler.screen.is_tiling() and action.find('tile.') == -1:
AttributeError: 'function' object has no attribute 'find'

Offline

#50 2009-09-08 19:08:10

BurntSushi
Member
From: Massachusetts
Registered: 2009-06-28
Posts: 362
Website

Re: PyTyle: Manual tiling manager for EWMH compliant WM's

x0rg wrote:

pytyle is a great app, but suddenly, it stopped working. I didn't change the config and no keybind does conflict with an other one.
Console output:

9/8/2009 at 17:57:17:    Could not complete key press request
9/8/2009 at 17:57:17:    Traceback (most recent call last):
  File "/usr/bin/pytyle", line 179, in <module>
    Tile.dispatch(State.get_desktop()._VIEWPORT._SCREEN.get_tiler(), None, e.get_keycode(), e.get_masks())
  File "/usr/lib/python2.6/site-packages/PyTyle/Tile.py", line 87, in dispatch
    if not tiler.screen.is_tiling() and action.find('tile.') == -1:
AttributeError: 'function' object has no attribute 'find'

Does this error happen on startup or after you do something? (If so, what something?)

Also, could you post your config file? Thanks.


Education is favorable to liberty. Freedom can exist only in a society of knowledge. Without learning, men are incapable of knowing their rights, and where learning is confined to a few people, liberty can be neither equal nor universal.

Tu ne cede malis sed contra audentior ito

Offline

Board footer

Powered by FluxBB