Menu

#101 Make toolbar components optional & Fit toolbar width to size

blackbox
open
nobody
5
2006-03-05
2006-03-05
Anonymous
No

This patch has several aspects to make toolbar
components configurable, beyond the hard-coded toolbar
features.

- Make each toolbar component (clock, window buttons,
etc.) optional.
- Make the toolbar width fit to its components instead
of a fixed percentage of screen width.
- Make the default workspace label configurable.

New configuration options:
- session.screen0.toolbar.showWorkspaceLabel
- session.screen%u.toolbar.showWorkspaceButtons
- session.screen%u.toolbar.showWindowLabel
- session.screen%u.toolbar.showWindowButtons
- session.screen%u.toolbar.showClock

- session.screen%u.toolbar.symmetricLabels: Whether
workspace label and clock are the same width or not.
- session.screen%u.toolbar.fitWidth: Whether toolbar
width is fixed percentage of screen width or fit to the
width of constituent components.
- session.screen%u.defaultWorkspaceFormat: Format
string for default workspace label (%u for the index).

Discussion

  • Nobody/Anonymous

    Make toolbar components optional & Fit toolbar width to size

     
  • Ciprian Popovici

    Logged In: YES
    user_id=667423

    1. Formatting string

    Once upon a time there used to be an idea about how to more
    easily configure the layout on a hypotetical custom
    toolbar/titlebar. The idea was to dictate the layout using a
    string which contains codes, much like dictating the format
    of the clock, for instance.

    So, for the toolbar, you'd have a config directive like this:

    session.screen0.toolbar.format: W<>T+-C

    where W=workspace, <>=workspace buttons, T=window title,
    +-=window buttons, and C=clock. The above format would
    describe the hardcoded default of today.

    So the question is: would it be hard to implement this on
    top of this patch proposed here? I personally think it would
    be more intuitive to be able to use one option to
    simultaneously dictate both position and presence for the
    toolbar elements.

    I can contribute some code that takes such a format string
    and reduces it to a sane form.

    2. Safety checks

    In this patch, have there been safety checks that prevent
    for instance the toolbar from becoming bigger that the
    screen? It can easily happen in the "fit to component size"
    mode, if the window title gets very big.

    Does the "fit to size" mode cause the toolbar to change
    width with window title all the time?

     
  • Ash Endon

    Ash Endon - 2006-03-08

    Logged In: YES
    user_id=1470562

    Thanks for your comments.

    Re: 1. I just created this patch because I wanted to get
    rid of the window label/buttons. I suppose a toolbar format
    string would be nice to have. I'm generally happy with the
    default ordering, though.

    Re: 2. The patch does not check for any sort of safety.
    However, I did think of the possibility, so "fit to size"
    does not apply if the window label is enabled.

    I did not know if/how patches get merged, so I just put my
    code here. If it gets merged into the main code, then
    safety checks should be necessary.

    Thanks.
    ashendon-at-gmail.com

     

Log in to post a comment.