treewm is a window manager that tries to implement a new concept. In addition to
the client windows the user can create desktops which can themselves contain
windows and desktops. By arranging the windows in such a tree the user is able
to manage his tasks efficiently.


treewm is derived by aewm

Some bugs/problems are discussed in PROBLEMS

Start the window manager:
  $ X & or $ X :1 &
  # Press CTRL+ALT+F1 or something like that
  $ DISPLAY=:0 or $ DISPLAY=:1
  $ xterm &
  $ treewm

Introduction (Read this carefully, you won't be able to understand all of
              treewm's features otherwise):

-- Shit, this has become quite complicated,         --
-- anyway i hope, i haven't forgot any feature here --

  When you start treewm, you've only got one desktop and all client windows
  are children of this root desktop. Then you can create children of this
  desktop which can have ohter desktops as children themselves. You can move
  windows and desktops arbitrarily around between desktop. Each window has a
  titlebar. This titlebar is a taskbar as well, desktops have taskbar entries
  for all their children.
  Using the mouse, you can perform the following actions:

  note that raise also means that the icons (if it's a desktop) are raised or
  lowered

  Titlebar - clicks:
    left button:   move (and view window-content)
    double click with two different buttons: shade

  Clicks on taskbar entries:
    left button:   raise
    middle button: restack window directly below the window you click on next
                   with the middle button
      move mouse:  move window onto another desktop
    right button:  lower
      move mouse:  client menu

  Double clicks on taskbar entries:
    left button:   create new desktop
    middle button: select desktop on which new windows are created if the
                   window has the focus

  Clicks on first button:
    left button :  maximize (titlebar not visible)
    middle button: maximize (titlebar visible)
    right button:  resize

  Clicks on second button:
    left button:   close window (double click kills)
    middle button: iconify
    right button:  move

  Clicks on desktop background (or on normal window while Alt is pressed, if
                       you press Ctrl actions are performed on the parent):
    left button:   raise
      move mouse:  move / resize (depends on where you click)
    middle button: see above
      move mouse:  change position of virtual desktop
    right button:  lower
      move mouse:  menu

  Clicks on icons
    left button:   perform action
    middle button: move
    right button:  raise/lower icons

  Moving mouse out of a Desktop with Alt pressed and VirtualX/VirutalY set
    or moving mouse out of a Desktop with Autoscroll on:
    move virtual desktop by screenwidth/screenheight
  Moving mouse with Button1 pressed:
    change virtual position

  With Shift (+ Alt) pressed, there are three menus available:
    left button:   application menu (see default.cfg), this one is also
                   available on the root desktop without Alt or Shift
    middle btton:  all windows menu
    right button:  all windows under pointer menu

  With the keyboard, you move around using Mod1 + Up/Down/Left/Right (Mod1 is
  the Alt key on x86 PCs). If you press the shift key, too, you also raise the
  windows you are giving the focus to. If you press the control key, you can
  move the windows between desktops. Additionally, the following keys are
  defined:
    Mod1 +           Esc    : (un)maximize window on whole screen
    Mod1 +         + Tab    : next window on lowest desktop level
    Mod1 + Shift   + Tab    : previous window on lowest desktop level
    Mod1 +           Space  : raise window (Control raises parents, too)
    Mod1 + Shift   + Space  : lower window
    Mod1 +         + PgUp   : put window on a higher stacking level
    Mod1 +         + PgDown : put window on a lower stacking level
    Mod1 +           F1     : execute action key1
    Mod1 + Shift   + F1     : execute action key2
    Mod1 +           F3     : shade
    Mod1 + Shift   + F3     : minimize
    Mod1 +           F4     : close window (no desktops)
    Mod1 + Shift   + F4     : kill (destroy) window, close desktop
    Mod1 +           F5     : move window (stop moving with space/return/esc)
    Mod1 + Shift   + F5     : resize window
    Mod1 +           F6     : maximize (titlebar not visible)
    Mod1 + Shift   + F6     : maximize (titlebar visible)
    Mod1 +           F7     : show/hide icons
    Mod1 + Shift   + F7     : create desktop
    Mod1 +         + F8-F12 : go to quick access window
    Mod1 + Shift   + F8-F12 : set quick access window


  You can define the treewm's behaviour in the file ~/.treewm. If you want to
  choose a different config file, just run treewm with the option -f <file>.
  Case is ignored, the following sections are interpreted:
  [Sceme <name>]
  [Client <name>]
  [Action <name>]
  [Menu <name>]
  In these sections you can provide options by lines like
    tag = value
  Sections can be ended and later continued. If there are more than one values
  for one tag, i.e.
    tag = value1
    tag = value2
  the last value in the config file is used.
  You can include the information of other sections by writing
  include = ... Note that you can include more than one section by this line
  and that only those pieces of information are included that were given in
  the config file before that line.

  A Sceme defines the appearance, you can set colors, fonts, pixmaps...
  You can have multiple scemes, each window belongs to one of these scemes
  then. A client section contains information about a specific client, for
  instance the window position. An action usually is an icon on a desktop which
  can be used to start an application or a desktop (with properties defined in
  one of the client sections). Actions with names key1, key2, key3 are used as
  keyboard shortcuts. The menu section defines a menu you can access with
  Shift (+ Alt) + middle button. If you don't give a section name in a sceme or
  client section, this is used as a default for all windows. The only menu
  section currently used is the one without section name.
  The complete syntax and the defaults of .treewm can be found in the file
  default.cfg. It is strongly recommended that you create a .treewm file. Look
  at the files default.cfg or sample.cfg for details.

  There is a problem with actions: if treewm starts a program it can't always
  tell whether the windows that appear belong to this client. By default, treewm
  gives the next window that is being mapped the client info specified in the
  action. Some (but not all, unfortunately) apps set the WM_COMMAND property
  on their windows. If you write WM_COMMAND = true in an action section, the
  next window whose WM_COMMAND property is the string the app was started with
  gets the client info supplied by this section. To find out which apps set
  WM_COMMAND use xprop (if there is no WM_COMMAND but a WM_CLIENT_LEADER
  property, type xprop -id <window id of client leader window>). Note that
  xprop is buggy and does not work correctly with treewm (but i'll patch it).
  Apart from that you can provide a regular expression the title is checked
  for by writing Regex = <regex> or you can define a Class Hint the 
  application must set (almost every application provides a Class Hint, use
  xprop to find out about that, for details, see default.cfg).



  treewm is _not_ icccm-compliant and will never be.


  There are lots of window mangers out there, so why write another one?

  Well, I think I had some good ideas that are not implemented in any of the
  big window managers. I was impressed by pwm, the only wm I saw which was
  able to use the screen's space reasonably. But I thought window managemant
  could become even more efficient if the windows are arranged in a tree
  rather than in a list, with the windows being leaf nodes. Many wms use
  multiple desktops, so you might think of treewm's concept as a kind of
  generalisation of their concepts. In my opinion, a tree is the natural way
  of arranging tasks. For example if want to write and debug a program, you
  can create one desktop with the editor windows, then, on the same level of
  the hierachy you can run and test your program and if you want to have a
  look at the source you just change the desktop and the windows are arranged
  exactly in the same way they were before. If you feel like doing something
  completely different you just have to create another second-level desktop in
  which you can do what you want and later change to your old project again.
  Another important advantage of this concept is its flexibility. There are
  situations in which certain options (for example the focus policy) are quite
  convenient whereas they're quite annoying in another one. So you should be
  able not only to change them globally but also to change them only for a
  special application, that means for a special desktop. A special window
  attribute of some wms, the sticky attribute, occurs in treewm in a quite
  natural way, it simply means that the window is on the parent desktop.

  Looking at many different wms, I found out that no window manager has a
  concept similar to that (though this the most important concept of X) so I
  finally decided to create such a window manager myself.


Sorry for my english!

Thomas Jger <thehunter2000@web.de>
