From e481d461d6e13df2a2224d0d8f559e9b9a024379 Mon Sep 17 00:00:00 2001 From: gotmor Date: Sun, 13 Jun 2010 17:19:57 +0000 Subject: Updated README git-svn-id: http://dzen.googlecode.com/svn/trunk@270 f2baff5b-bf2c-0410-a398-912abdc3d8b2 --- README | 128 +++++++++++++++++++++++++++++++++++++++++------------------------ draw.c | 2 +- 2 files changed, 83 insertions(+), 47 deletions(-) diff --git a/README b/README index e8c279c..15edc37 100644 --- a/README +++ b/README @@ -1,40 +1,21 @@ -================================== - dzen, (c) 2007 by Robert Manea -================================== +==================================== + dzen, (c) 2007-2010 by Robert Manea +==================================== -A general purpose messaging, notification and menu program - - -The "gadgets" subdirectory contains some tools that you can -use in combination with dzen. - -Script archive with a collection of interesting ideas: - http://gotmor.googlepages.com/dzenscriptarchive - - -Use "./help" to view a nicely formated version of the documentation. +Dzen is a general purpose messaging, notification and menuing program for X11. +It was designed to be fast, tiny and scriptable in any language. Features -------- - * scriptable in any language - - * dynamic colorizer - - * keyboard support - - * single line and/or windows holding multiple lines - - * menu functionality - - * in-text formating language - - * flexible event/action mechanism - - * hideable, collapsable - - * Xinerama support + * Small, fast, very tiny set of dependencies (Xlib only by default) + * Scriptable in any language + * Sophisticated formating language - including colours, icons, graphics + * Versatile - display all sorts of information + * Interactive - user defined mouse and keyboard actions + * Optional XFT support + * Optional XINERAMA support Requirements @@ -373,6 +354,8 @@ Note: Menu mode only makes sense if '-l ' is specified! (4) Option '-u', Simultaneous updates ------------------------------------- +** DEPRECATED ** + This option provides facilities to update the title and slave window at the same time. @@ -396,15 +379,18 @@ of lines to the slave window as defined by the parameter to '-l'. -(5) In-text formating language: -------------------------------- +(5) In-text formating & control language: +----------------------------------------- This feature allows to dynamically (at runtime) format the text dzen -displays. +displays and control its behaviour. Currently the following commands are supported: +Note: Doubling the '^' character ('^^') will remove the special meaning from it. + + Colors: ------- @@ -429,14 +415,72 @@ Graphics: Positioning: ------------ - ^p(PIXEL) position next input amount of PIXELs to the right + ^p(ARGUMENT) position next input amount of PIXELs to the right or left of the current position a.k.a. relative positioning - ^pa(PIXEL) position next input at PIXEL + ^pa(ARGUMENT) position next input at PIXEL a.k.a. absolute positioning - For maximum predictability ^^pa() should only be - used with '-ta l' or '-sa l'. + + ARGUMENT: + + ^p(+-X) move X pixels to the right or left of the current position (on the X axis) + + ^p(+-X;+-Y) move X pixels to the right or left and Y pixels up or down of the current + position (on the X and Y axis) + + ^p(;+-Y) move Y pixels up or down of the current position (on the Y axis) + + ^p() without parameters resets the Y position to its default + + ^pa() takes the same parameters as described above but positions at + the absolute X and Y coordinates + + Further ^p() also takes some symbolic names as argument: + + _LOCK_X Lock the current X position, useful if you want to + align things vertically + _UNLOCK_X Unlock the X position + _LEFT Move current x-position to the left edge + _RIGHT Move current x-position to the right edge + _TOP Move current y-position to the top edge + _CENTER Move current x-position to center of the window + _BOTTOM Move current y-position to the bottom edge + +Interaction: +------------ + + ^ca(BTN, CMD) ... ^ca() + + Used to define 'clickable areas' anywhere inside the + title window. + - 'BTN' denotes the mouse button (1=left, 2=right, 3=middle, etc.) + - 'CMD' denotes the command that should be spawned when the specific + area has been clicked with the defined button + - '...' denotes any text or formating commands dzen accepts + - '^ca()' without arguments denotes the end of this clickable area + + Example: + foo ^ca(1, echo one)^fg(red)click me and i'll echo one^fg()^ca() bar + +Actions as commands: +-------------------- + + ^togglecollapse() + ^collapse() + ^uncollapse() + ^togglestick() + ^stick() See section (2) 'Events and actions' for a detailed description + ^unstick() of each command. + ^togglehide() + ^hide() + ^unhide() + ^raise() + ^lower() + ^scrollhome() + ^scrollend() + ^exit() + Other: ------ @@ -472,14 +516,6 @@ Icons must be in the XBM or optionally XPM format, see the "bitmaps" directory for some sample icons. With the standard "bitmap" application you can easily draw your own icons. -Note: Displaying XPM (pixmap) files imposes a somewhat - higher load than lightweight XBM files, so use - them with care in tight loops. - -Rectangles will be truncated to the maximum possible size if you specify -a size bigger than dzen's window. - -Doubling the '^^' character removes the special meaning from it. Some examples: diff --git a/draw.c b/draw.c index e6756f6..6e99586 100644 --- a/draw.c +++ b/draw.c @@ -808,7 +808,7 @@ parse_line(const char *line, int lnr, int align, int reverse, int nodraw) { } XftDrawStringUtf8(xftd, &xftc, - cur_fnt->xftfont, px, py + dzen.font.xftfont->ascent, lbuf, strlen(lbuf)); + cur_fnt->xftfont, px, py + dzen.font.xftfont->ascent, (const FcChar8 *)lbuf, strlen(lbuf)); if(xftcs_f) { free(xftcs); -- cgit v1.2.3-54-g00ecf