From 3b1918496ea4b20ec61287ffbb9e1573e950fdcc Mon Sep 17 00:00:00 2001 From: gotmor Date: Wed, 1 Aug 2007 19:15:37 +0000 Subject: release 0.7.5 fixed memory leak added in-text commands: ^tw() ^c() ^p() added gadgets: kittscanner gdbar gcpubar git-svn-id: http://dzen.googlecode.com/svn/trunk@149 f2baff5b-bf2c-0410-a398-912abdc3d8b2 --- README.dzen | 211 +++++++++++++++++++++++++++++++++--------------------------- 1 file changed, 115 insertions(+), 96 deletions(-) (limited to 'README.dzen') diff --git a/README.dzen b/README.dzen index bc002c4..d2d4eaa 100644 --- a/README.dzen +++ b/README.dzen @@ -1,5 +1,5 @@ ^fg(lightgreen)================================== -^fg(green) dzen, (c) 2007 by Robert Manea +^fg(#6fbf47) dzen, (c) 2007 by Robert Manea ^fg(lightgreen)================================== A general purpose messaging, notification and menu program @@ -13,8 +13,8 @@ Script archive with a collection of interesting ideas: -^fg(green)Features -^fg(green)-------- +^fg(#6fbf47)Features +^fg(#6fbf47)-------- * scriptable in any language @@ -35,40 +35,40 @@ Script archive with a collection of interesting ideas: * Xinerama support -^fg(green)Requirements -^fg(green)------------ +^fg(#6fbf47)Requirements +^fg(#6fbf47)------------ In order to build dzen you need the Xlib header files. -^fg(green)Installation -^fg(green)------------ +^fg(#6fbf47)Installation +^fg(#6fbf47)------------ Edit config.mk to match your local setup (dzen is installed into the /usr/local namespace by default). Afterwards enter the following command to build and install dzen (if necessary as root): - ^fg(grey70)make clean install + ^fg(grey85)make clean install Optionally if you want to use dzen's gadgets: - ^fg(grey70)cd gadgets - ^fg(grey70)make clean install + ^fg(grey85)cd gadgets + ^fg(grey85)make clean install -^fg(Khaki)Note: By default dzen will not be compiled with Xinerama support. +^fg(Khaki)Note: By default dzen will ^fg(red)not^fg(Khaki) be compiled with Xinerama support. ^fg(Khaki)Uncomment the respective lines in config.mk to change this. -^fg(green)Contact: -^fg(green)-------- +^fg(#6fbf47)Contact: +^fg(#6fbf47)-------- Feature requests, patches or anything else related to dzen can be send -to: rob dot manea at gmail dot com +to: ^fg(Khaki)rob dot manea at gmail dot com -^fg(green)Running dzen -^fg(green)------------ +^fg(#6fbf47)Running dzen +^fg(#6fbf47)------------ dzen accepts a couple of options: -fg foreground color @@ -78,11 +78,11 @@ dzen accepts a couple of options: l(eft), c(center), r(ight) -tw title window width -sa alignment of slave window, see "-ta" - -l lines, see (1) - -e events and actions, ^fg(green)see (2) - -m menu mode, ^fg(green)see (3) + -l lines, ^fg(#6fbf47)see (1) + -e events and actions, ^fg(#6fbf47)see (2) + -m menu mode, ^fg(#6fbf47)see (3) -u update contents of title and - slave window simultaneously, ^fg(green)see (4) + slave window simultaneously, ^fg(#6fbf47)see (4) -p persist EOF (optional timeout in seconds) -x x position -y y position @@ -90,35 +90,37 @@ dzen accepts a couple of options: -xs number of Xinerama screen -v version information - ^fg(green)see (5)^fg(#5FBF77) for the in-text formating language. + ^fg(#6fbf47)see (5)^fg(grey70), for the in-text formating language. -^fg(green)Window layout -^fg(green)------------- +^fg(#6fbf47)Window layout +^fg(#6fbf47)------------- Dzen's window layout is as follows: - ------------------------------------------ - | Title window, single line | - `------------------------------------------´ - | | - | scrollable | - | Slave window | - | multiple lines | - | lines to display simultaneously | - | controlled with the | - | '-l' option | - | | - | | - `------------------------------------------´ +^fg(red) ------------------------------------------ +^fg(red) | Title window, single line | +^fg(red) `------------------------------------------´ +^fg(#6fbf47) | | +^fg(#6fbf47) | scrollable | +^fg(#6fbf47) | Slave window | +^fg(#6fbf47) | multiple lines | +^fg(#6fbf47) | lines to display simultaneously | +^fg(#6fbf47) | controlled with the | +^fg(#6fbf47) | '-l' option | +^fg(#6fbf47) | | +^fg(#6fbf47) | | +^fg(#6fbf47) `------------------------------------------´ The first line you provide to dzen always goes to the title window, -all other consecutive lines will be drawn to the slave window. +all other consecutive lines will be drawn to the slave window unless +you explicitly overide this with the ^fg(#6fbf47)(5) In-text formating language +^fg(grey70)command ^^tw(). -^fg(green)QA: -^fg(green)--- +^fg(#6fbf47)QA: +^fg(#6fbf47)--- Q1: I don't want a slave window, what to do? @@ -130,38 +132,39 @@ Q2: I used the '-l' option but no slave window appears. A2: With the default event/action handling the slave window will only be displayed if you hoover with the mouse over the title - window. See "(2) Events and actions" if you'd like to change + window. See ^fg(#6fbf47)(2) Events and actions ^fg(grey70)if you'd like to change this. Q3: If I echo some text or cat a file dzen closes itself imediatelly. A3: There are 2 different approaches dzen uses to terminate itself, - see next section "Termination". + see next section ^fg(#6fbf47)Termination^fg(grey70). Q4: Ok, the title and slave thing works, can I update the contents of both windows at the same time? -A4: Sure, see "(4) Simultaneous updates". - +A4: Sure, see ^fg(#6fbf47)(4) Simultaneous updates ^fg(grey70)or use the in-text + command ^^tw() to explicitly draw to the title windwow. + See ^fg(#6fbf47)(5) In-Text formating language ^fg(grey70)for further details Q5: Can i chnage color of my input at runtime? A5: Yes, you can change both background and foreground colors and - much more See "(5) In-Text formating language" + much more See ^fg(#6fbf47)(5) In-Text formating language^fg(grey70). Q6: Can I use dzen as a menu? A6: Yes, both vertical and horizontal menus are supported. - See "(3) Menu" for further details. + See ^fg(#6fbf47)(3) Menu ^fg(grey70)for further details. -^fg(green)Termination: -^fg(green)------------ +^fg(#6fbf47)Termination: +^fg(#6fbf47)------------ dzen uses two different approaches to terminate itself: * Timed termination: if EOF is received -> terminate @@ -170,21 +173,21 @@ dzen uses two different approaches to terminate itself: · '-p' with argument n persist for n seconds * Interactive termination: if mouse button3 is clicked -> terminate - - this is the default behaviour, see (2) - - in some modes the Escape key terminates too, see (2) + - this is the default behaviour, ^fg(#6fbf47)see (2) + - in some modes the Escape key terminates too, ^fg(#6fbf47)see (2) -^fg(green)Return values: -^fg(green)-------------- +^fg(#6fbf47)Return values: +^fg(#6fbf47)-------------- 0 - dzen received EOF 1 - some error occured, inspect the error message -user defined - set with 'exit:retval' action, see (2) +user defined - set with 'exit:retval' action, ^fg(#6fbf47)see (2) -^fg(green)(1) Option "-l": Slave window -^fg(green)-------------------------------- +^fg(#6fbf47)(1) Option "-l": Slave window +^fg(#6fbf47)-------------------------------- Enables support for displaying multiple lines. The parameter to "-l" specifies the number of lines to be displayed. @@ -200,8 +203,8 @@ and down if the content exceeds the window height (default action). -^fg(green)(2) Option '-e': Events and actions -^fg(green)----------------------------------- +^fg(#6fbf47)(2) Option '-e': Events and actions +^fg(#6fbf47)----------------------------------- dzen allows the user to associate actions to events. @@ -209,7 +212,7 @@ The command line syntax is as follows: -e 'event1=action1:option1:...option,...,action;...;event' Every event can take any number of actions and every action can take any number -of options. (Currently limited to 64 each, easily changable in action.h) +of options. (By default limited to 64 each, easily changable in action.h) An example: ^fg(grey70) -e 'button1=exec:xterm:firefox;entertitle=uncollapse,unhide;button3=exit' @@ -229,8 +232,8 @@ An example: on button3 event exit dzen -^fg(green)Supported events: -^fg(green)----------------- +^fg(#6fbf47)Supported events: +^fg(#6fbf47)----------------- onstart Perform actions right after startup onexit Perform actions just before exiting @@ -249,8 +252,8 @@ An example: key_KEYNAME Keyboard events (*) - ^fg(green)(*) Keyboard events: - ^fg(green)-------------------- + ^fg(#6fbf47)(*) Keyboard events: + ^fg(#6fbf47)-------------------- Every key can be bound to an action (see below). The format is: key_KEYNAME where KEYNAME is the name of the key as defined in @@ -259,8 +262,8 @@ An example: -^fg(green)Supported actions: -^fg(green)------------------ +^fg(#6fbf47)Supported actions: +^fg(#6fbf47)------------------ exec:command1:..:n execute all given options menuexec executes selected menu entry @@ -288,14 +291,14 @@ An example: ^fg(Khaki)Note: If no events/actions are specified dzen defaults to: - ^fg(green)Title only mode: - ^fg(green)---------------- + ^fg(#6fbf47)Title only mode: + ^fg(#6fbf47)---------------- -e 'button3=exit:13' - ^fg(green)Multiple lines and vertical menu mode: - ^fg(green)-------------------------------------- + ^fg(#6fbf47)Multiple lines and vertical menu mode: + ^fg(#6fbf47)-------------------------------------- -e 'entertitle=uncollapse,grabkeys; enterslave=grabkeys;leaveslave=collapse,ungrabkeys; @@ -304,8 +307,8 @@ An example: key_Escape=ungrabkeys,exit' - ^fg(green)Horizontal menu mode: - ^fg(green)--------------------- + ^fg(#6fbf47)Horizontal menu mode: + ^fg(#6fbf47)--------------------- -e 'enterslave=grabkeys;leaveslave=ungrabkeys; button4=scrollup;button5=scrolldown; @@ -320,11 +323,11 @@ An example: -^fg(green)(3) Option '-m', Menu -^fg(green)--------------------- +^fg(#6fbf47)(3) Option '-m', Menu +^fg(#6fbf47)--------------------- Dzen provides two menu modes, vertical and horizontal menus. You can -access these modes by adding 'v'(ertical) or 'h'(horizontal) to the +access these modes by adding 'v'(ertical) or 'h'(orizontal) to the '-m' option. If nothing is specified dzen defaults to vertical menus. Vertical menu, both invocations are equivalent: @@ -345,8 +348,8 @@ All actions beginning with "menu" work on the selected menu entry. -^fg(green)(4) Option '-u', Simultaneous updates -^fg(green)------------------------------------- +^fg(#6fbf47)(4) Option '-u', Simultaneous updates +^fg(#6fbf47)------------------------------------- This option provides facilities to update the title and slave window at the same time. @@ -371,8 +374,8 @@ of lines to the slave window as defined by the parameter to '-l'. -^fg(green)(5) In-text formating language: -^fg(green)------------------------------- +^fg(#6fbf47)(5) In-text formating language: +^fg(#6fbf47)------------------------------- This feature allows to dynamically (at runtime) format the text dzen displays. @@ -384,7 +387,15 @@ Currently the following commands are supported: ^^bg(color) set background color ^^i(path) draw icon specified by path ^^r(WIDTHxHEIGHT) draw a rectangle with the dimensions - WIDTH and HEIGHT + WIDTH and HEIGHT + ^^c(RADIUS) draw a circel with size RADIUS pixels + ^^p(PIXEL) increment momentary position by PIXEL + ^^tw() draw to title window + This command has some annoyances, as only + the input after the command will be drawn + to the title window, so it is best used + only once and as first command per line + Subject to be improved in the future. These commands can appear anywhere and in any combination in dzen's input. @@ -425,12 +436,14 @@ Some examples: Resulting in: ^fg(grey70)Some text containing ^^ characters + Input for icons: ^^i(bitmaps/envelope.xbm) I am an envelope ^^fg(yellow)and ^^i(bitmaps/battery.xbm) I'm a baterry. Resulting in: ^i(bitmaps/envelope.xbm) I am an envelope ^fg(yellow)and ^i(bitmaps/battery.xbm) I'm a baterry. + Input for rectangles: 6x4 rectangle ^^r(6x4) ^^fg(red)12x8 ^^r(12x8) ^^fg(yellow)and finally 100x15 ^^r(100x15) @@ -438,65 +451,71 @@ Some examples: 6x4 rectangle ^r(6x4) ^fg(red)12x8 ^r(12x8) ^fg(yellow)and finally 100x15 ^r(100x15) + Input for relative positioning: + Some text^^p(100)^^fg(yellow)100 pixels to the right^^p(50)^^fg(red)50 more pixels to the right + + Resulting in: + Some text^p(100)^fg(yellow)100 pixels to the right^p(50)^fg(red)50 more pixels to the right + + -^fg(green)Examples: -^fg(green)--------- +^fg(#6fbf47)Examples: +^fg(#6fbf47)--------- * Display message and timeout after 10 seconds: -^fg(grey70) (echo "This is a message"; sleep 10) | dzen2 -bg darkred -fg grey80 -fn fixed +^fg(grey85) (echo "This is a message"; sleep 10) | dzen2 -bg darkred -fg grey85 -fn fixed * Display message and never timeout: -^fg(grey70) echo "This is a message"| dzen2 -p +^fg(grey85) echo "This is a message"| dzen2 -p * Display updating single line message: -^fg(grey70) for i in $(seq 1 20); do A=${A}'='; print $A; sleep 1; done | dzen2 +^fg(grey85) for i in $(seq 1 20); do A=${A}'='; print $A; sleep 1; done | dzen2 * Display header and a message with multiple lines: -^fg(grey70) (echo Header; cal; sleep 20) | dzen2 -l 8 +^fg(grey85) (echo Header; cal; sleep 20) | dzen2 -l 8 - Displays "Header" in the main alert window and - the output of cal in the 8 lines high slave - window. + Displays "Header" in the title window and the output of cal in the + 8 lines high slave window. * Display updating messages: -^fg(grey70) (echo Header; while true; do echo test$((i++)); sleep 1; done) | dzen2 -l 12 +^fg(grey85) (echo Header; while true; do echo test$((i++)); sleep 1; done) | dzen2 -l 12 The slave window will update contents if new input has arrived. * Display log files: -^fg(grey70) (su -c "echo LOGFILENAME; tail -f /var/log/messages") | dzen2 -l 20 -x 100 -y 300 -w 500 +^fg(grey85) (su -c "echo LOGFILENAME; tail -f /var/log/messages") | dzen2 -l 20 -x 100 -y 300 -w 500 * Monthly schedule with remind: -^fg(grey70) (echo Monthly Schedule; remind -c1 -m) | dzen2 -l 52 -w 410 -p -fn lime -bg '#e0e8ea' -fg black -x 635 +^fg(grey85) (echo Monthly Schedule; remind -c1 -m) | dzen2 -l 52 -w 410 -p -fn lime -bg '#e0e8ea' -fg black -x 635 * Simple menu: -^fg(grey70) echo "Applications" | dzen2 -l 4 -p -m < menufile +^fg(grey85) echo "Applications" | dzen2 -l 4 -p -m < menufile * Horizontal menu without any files: -^fg(grey70) {echo Menu; echo -e "xterm\nxclock\nxeyes\nxfontsel"} | dzen2 -l 4 -m h -p +^fg(grey85) {echo Menu; echo -e "xterm\nxclock\nxeyes\nxfontsel"} | dzen2 -l 4 -m h -p * Extract PIDs from the process table: -^fg(grey70) {echo Procs; ps -a} | dzen2 -m -l 12 -p \ -^fg(grey70) -e 'button1=menuprint;button3=exit;button4=scrollup:3;button5=scrolldown:3;entertitle=uncollapse;leaveslave=collapse' \ -^fg(grey70) | awk '{print $1}' +^fg(grey85) {echo Procs; ps -a} | dzen2 -m -l 12 -p \ +^fg(grey85) -e 'button1=menuprint;button3=exit;button4=scrollup:3;button5=scrolldown:3;entertitle=uncollapse;leaveslave=collapse' \ +^fg(grey85) | awk '{print $1}' * Dzen as xmonad (see http://xmonad.org) statusbar: -^fg(grey70) status.sh | dzen2 -ta r -fn '-*-profont-*-*-*-*-11-*-*-*-*-*-iso8859' -bg '#aecf96' -fg black \ -^fg(grey70) -p -e 'sigusr1=raise;sigusr2=lower;onquit=exec:rm /tmp/dzen2-pid;button3=exit' & echo $! > /tmp/dzen2-pid +^fg(grey85) status.sh | dzen2 -ta r -fn '-*-profont-*-*-*-*-11-*-*-*-*-*-iso8859' -bg '#aecf96' -fg black \ +^fg(grey85) -p -e 'sigusr1=raise;sigusr2=lower;onquit=exec:rm /tmp/dzen2-pid;button3=exit' & echo $! > /tmp/dzen2-pid -- cgit v1.2.3-54-g00ecf