aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgotmor <gotmor@f2baff5b-bf2c-0410-a398-912abdc3d8b2>2007-08-04 13:04:19 +0000
committergotmor <gotmor@f2baff5b-bf2c-0410-a398-912abdc3d8b2>2007-08-04 13:04:19 +0000
commite6a7733799d32bb6bf719ee34beb5b01d9db68ad (patch)
treec10481b0cbc717e3e5768d5ad2dff0c88d79768b
parent63a6038c331449d728f090da9cf09de0c7a5124f (diff)
downloaddzen-e6a7733799d32bb6bf719ee34beb5b01d9db68ad.tar.gz
dzen-e6a7733799d32bb6bf719ee34beb5b01d9db68ad.zip
ready for release 0.8.0
new in-text commands: ^fg() and ^bg() without arguments set default colors ^ro() and ^co() outlined rectangle/circle fixes to gcpubar and gdbar to use ^fg() git-svn-id: http://dzen.googlecode.com/svn/trunk@151 f2baff5b-bf2c-0410-a398-912abdc3d8b2
-rw-r--r--README14
-rw-r--r--README.dzen82
-rw-r--r--TODO4
-rw-r--r--bitmaps/battery.xbm10
-rw-r--r--bitmaps/envelope.xbm10
-rw-r--r--config.mk2
-rw-r--r--draw.c70
-rw-r--r--dzen.h8
-rw-r--r--gadgets/README.gcpubar7
-rw-r--r--gadgets/gcpubar.c25
-rw-r--r--gadgets/gdbar.c2
-rwxr-xr-xhelp5
12 files changed, 153 insertions, 86 deletions
diff --git a/README b/README
index 9630f18..48e0cf4 100644
--- a/README
+++ b/README
@@ -387,17 +387,25 @@ Currently the following commands are supported:
^fg(color) set foreground color
+ ^fg() without arguments, sets default fg color
^bg(color) set background color
- ^i(path) draw icon specified by path
+ ^bg() without arguments, sets default bg color
+
^r(WIDTHxHEIGHT) draw a rectangle with the dimensions
WIDTH and HEIGHT
- ^c(RADIUS) draw a circel with size RADIUS pixels
+ ^ro(WIDTHxHEIGHT) rectangle outline
+
+ ^c(RADIUS) draw a circle with size RADIUS pixels
+ ^co(RADIUS) circle outline
+
^p(PIXEL) increment momentary position by PIXEL
+ ^i(path) draw icon specified by path
+
^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.
+ 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
diff --git a/README.dzen b/README.dzen
index d2d4eaa..952ca63 100644
--- a/README.dzen
+++ b/README.dzen
@@ -1,6 +1,6 @@
-^fg(lightgreen)==================================
-^fg(#6fbf47) dzen, (c) 2007 by Robert Manea
-^fg(lightgreen)==================================
+^fg(lightgreen)^r(190x4)^fg(#6fbf47)^r(38x4)^fg(darkgreen)^r(9x4)
+^fg(#6fbf47) dzen, (c) 2007 by Robert Manea
+^fg(darkgreen)^r(9x4)^fg(#6fbf47)^r(38x4)^fg(lightgreen)^r(190x4)
A general purpose messaging, notification and menu program
@@ -16,23 +16,23 @@ Script archive with a collection of interesting ideas:
^fg(#6fbf47)Features
^fg(#6fbf47)--------
- * scriptable in any language
+ ^co(4x4) scriptable in any language
- * dynamic colorizer
+ ^co(4x4) dynamic colorizer
- * keyboard support
+ ^co(4x4) keyboard support
- * single line and/or windows holding multiple lines
+ ^co(4x4) single line and/or windows holding multiple lines
- * menu functionality
+ ^co(4x4) menu functionality
- * in-text formating language
+ ^co(4x4) in-text formating language
- * flexible event/action mechanism
+ ^co(4x4) flexible event/action mechanism
- * hideable, collapsable
+ ^co(4x4) hideable, collapsable
- * Xinerama support
+ ^co(4x4) Xinerama support
^fg(#6fbf47)Requirements
@@ -90,7 +90,7 @@ dzen accepts a couple of options:
-xs number of Xinerama screen
-v version information
- ^fg(#6fbf47)see (5)^fg(grey70), for the in-text formating language.
+ ^fg(#6fbf47)see (5)^fg(), for the in-text formating language.
@@ -116,7 +116,7 @@ Dzen's window layout is as follows:
The first line you provide to dzen always goes to the title 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()command ^^tw().
^fg(#6fbf47)QA:
@@ -132,33 +132,33 @@ 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 ^fg(#6fbf47)(2) Events and actions ^fg(grey70)if you'd like to change
+ window. See ^fg(#6fbf47)(2) Events and actions ^fg()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 ^fg(#6fbf47)Termination^fg(grey70).
+ see next section ^fg(#6fbf47)Termination^fg().
Q4: Ok, the title and slave thing works, can I update the
contents of both windows at the same time?
-A4: Sure, see ^fg(#6fbf47)(4) Simultaneous updates ^fg(grey70)or use the in-text
+A4: Sure, see ^fg(#6fbf47)(4) Simultaneous updates ^fg()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
+ See ^fg(#6fbf47)(5) In-Text formating language ^fg()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 ^fg(#6fbf47)(5) In-Text formating language^fg(grey70).
+ much more See ^fg(#6fbf47)(5) In-Text formating language^fg().
Q6: Can I use dzen as a menu?
A6: Yes, both vertical and horizontal menus are supported.
- See ^fg(#6fbf47)(3) Menu ^fg(grey70)for further details.
+ See ^fg(#6fbf47)(3) Menu ^fg()for further details.
@@ -167,12 +167,12 @@ A6: Yes, both vertical and horizontal menus are supported.
^fg(#6fbf47)------------
dzen uses two different approaches to terminate itself:
- * Timed termination: if EOF is received -> terminate
+ ^co(4x4) Timed termination: if EOF is received -> terminate
- unless the '-p' option is set
· '-p' without argument persist forever
· '-p' with argument n persist for n seconds
- * Interactive termination: if mouse button3 is clicked -> terminate
+ ^co(4x4) Interactive termination: if mouse button3 is clicked -> terminate
- this is the default behaviour, ^fg(#6fbf47)see (2)
- in some modes the Escape key terminates too, ^fg(#6fbf47)see (2)
@@ -384,12 +384,20 @@ Currently the following commands are supported:
^^fg(color) set foreground color
+ ^^fg() without arguments, sets default fg color
^^bg(color) set background color
- ^^i(path) draw icon specified by path
+ ^^bg() without arguments, sets default bg color
+
^^r(WIDTHxHEIGHT) draw a rectangle with the dimensions
WIDTH and HEIGHT
- ^^c(RADIUS) draw a circel with size RADIUS pixels
+ ^^ro(WIDTHxHEIGHT) rectangle outline
+
+ ^^c(RADIUS) draw a circle with size RADIUS pixels
+ ^^co(RADIUS) circle outline
+
^^p(PIXEL) increment momentary position by PIXEL
+ ^^i(path) draw icon specified by path
+
^^tw() draw to title window
This command has some annoyances, as only
the input after the command will be drawn
@@ -431,10 +439,10 @@ Some examples:
Input:
- ^^fg(grey70)Some text containing ^^^^ characters
+ ^^fg(white)Some text containing ^^^^ characters
Resulting in:
- ^fg(grey70)Some text containing ^^ characters
+ ^fg(white)Some text containing ^^ characters
Input for icons:
@@ -464,55 +472,55 @@ Some examples:
^fg(#6fbf47)Examples:
^fg(#6fbf47)---------
-* Display message and timeout after 10 seconds:
+^co(4x4) Display message and timeout after 10 seconds:
^fg(grey85) (echo "This is a message"; sleep 10) | dzen2 -bg darkred -fg grey85 -fn fixed
-* Display message and never timeout:
+^co(4x4) Display message and never timeout:
^fg(grey85) echo "This is a message"| dzen2 -p
-* Display updating single line message:
+^co(4x4) Display updating single line message:
^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:
+^co(4x4) Display header and a message with multiple lines:
^fg(grey85) (echo Header; cal; sleep 20) | dzen2 -l 8
Displays "Header" in the title window and the output of cal in the
8 lines high slave window.
-* Display updating messages:
+^co(4x4) Display updating messages:
^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:
+^co(4x4) Display log files:
^fg(grey85) (su -c "echo LOGFILENAME; tail -f /var/log/messages") | dzen2 -l 20 -x 100 -y 300 -w 500
-* Monthly schedule with remind:
+^co(4x4) Monthly schedule with remind:
^fg(grey85) (echo Monthly Schedule; remind -c1 -m) | dzen2 -l 52 -w 410 -p -fn lime -bg '#e0e8ea' -fg black -x 635
-* Simple menu:
+^co(4x4) Simple menu:
^fg(grey85) echo "Applications" | dzen2 -l 4 -p -m < menufile
-* Horizontal menu without any files:
+^co(4x4) Horizontal menu without any files:
^fg(grey85) {echo Menu; echo -e "xterm\nxclock\nxeyes\nxfontsel"} | dzen2 -l 4 -m h -p
-* Extract PIDs from the process table:
+^co(4x4) Extract PIDs from the process table:
^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:
+^co(4x4) Dzen as xmonad (see http://xmonad.org) statusbar:
^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
diff --git a/TODO b/TODO
index 765cad7..ba86b7a 100644
--- a/TODO
+++ b/TODO
@@ -11,4 +11,6 @@
# user interface
- o in-text command to draw to the title window
+ o improve in-text command to draw
+ to the title window
+ o auto fit window width to text length
diff --git a/bitmaps/battery.xbm b/bitmaps/battery.xbm
index ca37847..26b465e 100644
--- a/bitmaps/battery.xbm
+++ b/bitmaps/battery.xbm
@@ -1,6 +1,6 @@
-#define battery_width 16
-#define battery_height 16
+#define battery_width 15
+#define battery_height 15
static unsigned char battery_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x1f, 0xfc, 0x11,
- 0xfc, 0x71, 0xfc, 0x71, 0xfc, 0x71, 0xfc, 0x11, 0xfc, 0x1f, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x0f,
+ 0xfc, 0x08, 0xfc, 0x38, 0xfc, 0x38, 0xfc, 0x08, 0xfc, 0x0f, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/bitmaps/envelope.xbm b/bitmaps/envelope.xbm
index dabbc1e..de44eb0 100644
--- a/bitmaps/envelope.xbm
+++ b/bitmaps/envelope.xbm
@@ -1,6 +1,6 @@
-#define envelope_width 16
-#define envelope_height 16
+#define envelope_width 15
+#define envelope_height 15
static unsigned char envelope_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x3f, 0x0c, 0x30, 0x1c, 0x38,
- 0x34, 0x2c, 0xc4, 0x23, 0x84, 0x21, 0x04, 0x20, 0x04, 0x20, 0xfc, 0x3f,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x1f, 0x0c, 0x18, 0x1c, 0x1c,
+ 0x34, 0x16, 0xc4, 0x11, 0x84, 0x10, 0x04, 0x10, 0xfc, 0x1f, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/config.mk b/config.mk
index 859b406..75fd4c9 100644
--- a/config.mk
+++ b/config.mk
@@ -1,5 +1,5 @@
# dzen version
-VERSION = 0.7.5
+VERSION = 0.8.0
# Customize below to fit your system
diff --git a/draw.c b/draw.c
index 7513a40..54b9a18 100644
--- a/draw.c
+++ b/draw.c
@@ -11,11 +11,11 @@
#include <string.h>
/* command types for the in-text parser */
-enum ctype {bg, fg, icon, rect, circle, pos, titlewin};
+enum ctype {bg, fg, icon, rect, recto, circle, circleo, pos, titlewin};
int get_tokval(const char* line, char **retdata);
int get_token(const char* line, int * t, char **tval);
-void set_opts(int type, char * value, int reverse);
+static void set_opts(int type, char * value, int reverse);
static unsigned int
textnw(const char *text, unsigned int len) {
@@ -132,58 +132,74 @@ get_token(const char *line, int * t, char **tval) {
*t = bg;
}
/* ^fg(#rrggbb) foreground color, type: fg */
- if((*line == 'f') && (*(line+1) == 'g') && (*(line+2) == '(')) {
+ else if((*line == 'f') && (*(line+1) == 'g') && (*(line+2) == '(')) {
off=3;
next_pos = get_tokval(line+off, &tokval);
*t = fg;
}
/* ^tw() draw to title window, type: titlewin */
- if((*line == 't') && (*(line+1) == 'w') && (*(line+2) == '(')) {
+ else if((*line == 't') && (*(line+1) == 'w') && (*(line+2) == '(')) {
off=3;
next_pos = get_tokval(line+off, &tokval);
*t = titlewin;
}
/* ^i(iconname) bitmap icon, type: icon */
- if((*line == 'i') && (*(line+1) == '(')) {
+ else if((*line == 'i') && (*(line+1) == '(')) {
off = 2;
next_pos = get_tokval(line+off, &tokval);
*t = icon;
}
/* ^r(widthxheight) filled rectangle, type: rect */
- if((*line == 'r') && (*(line+1) == '(')) {
+ else if((*line == 'r') && (*(line+1) == '(')) {
off = 2;
next_pos = get_tokval(line+off, &tokval);
*t = rect;
}
+ /* ^ro(widthxheight) outlined rectangle, type: recto */
+ else if((*line == 'r') && (*(line+1) == 'o') && (*(line+2) == '(')) {
+ off = 3;
+ next_pos = get_tokval(line+off, &tokval);
+ *t = recto;
+ }
/* ^p(widthxheight) relative position, type: pos */
- if((*line == 'p') && (*(line+1) == '(')) {
+ else if((*line == 'p') && (*(line+1) == '(')) {
off = 2;
next_pos = get_tokval(line+off, &tokval);
*t = pos;
}
- /* circle */
- if((*line == 'c') && (*(line+1) == '(')) {
+ /*^c(radius) filled circle, type: circle */
+ else if((*line == 'c') && (*(line+1) == '(')) {
off = 2;
next_pos = get_tokval(line+off, &tokval);
*t = circle;
}
+ /* ^co(radius) outlined circle, type: circleo */
+ else if((*line == 'c') && (*(line+1) == 'o') && (*(line+2) == '(')) {
+ off = 3;
+ next_pos = get_tokval(line+off, &tokval);
+ *t = circleo;
+ }
*tval = tokval;
return next_pos+off;
}
-void
+static void
set_opts(int type, char * value, int reverse) {
+
+ if(!strncmp(value, "", 1))
+ value = NULL;
+
switch(type) {
case fg:
reverse ?
- XSetBackground(dzen.dpy, dzen.tgc, getcolor(value)) :
- XSetForeground(dzen.dpy, dzen.tgc, getcolor(value));
+ XSetBackground(dzen.dpy, dzen.tgc, value ? getcolor(value) : dzen.norm[ColFG]):
+ XSetForeground(dzen.dpy, dzen.tgc, value ? getcolor(value) : dzen.norm[ColFG]);
break;
case bg:
reverse ?
- XSetForeground(dzen.dpy, dzen.tgc, getcolor(value)) :
- XSetBackground(dzen.dpy, dzen.tgc, getcolor(value));
+ XSetForeground(dzen.dpy, dzen.tgc, value ? getcolor(value) : dzen.norm[ColBG]):
+ XSetBackground(dzen.dpy, dzen.tgc, value ? getcolor(value) : dzen.norm[ColBG]);
break;
}
}
@@ -306,11 +322,24 @@ parse_line(const char *line, int lnr, int align, int reverse, int nodraw) {
px += rectw;
}
+ else if(t == recto) {
+ get_rect_vals(tval, &rectw, &recth);
+ rectw = rectw+px > dzen.w ? dzen.w-px : rectw;
+ recth = recth > dzen.line_height ? dzen.line_height : recth-1;
+ recty = (dzen.line_height - recth)/2;
+ XDrawRectangle(dzen.dpy, pm, dzen.tgc, px, (int)recty, rectw-1, recth);
+ px += rectw;
+ }
else if(t == circle) {
rectw = recth = atoi(tval);
XFillArc(dzen.dpy, pm, dzen.tgc, px, (dzen.line_height - recth)/2, rectw, recth, 2880, 23040);
px += rectw;
}
+ else if(t == circleo) {
+ rectw = recth = atoi(tval);
+ XDrawArc(dzen.dpy, pm, dzen.tgc, px, (dzen.line_height - recth)/2, rectw-1, recth-1, 2880, 23040);
+ px += rectw;
+ }
else if(t == pos) {
if((n_pos = atoi(tval)) < 0)
n_pos *= -1;
@@ -383,11 +412,24 @@ parse_line(const char *line, int lnr, int align, int reverse, int nodraw) {
XFillRectangle(dzen.dpy, pm, dzen.tgc, px, (int)recty, rectw, recth);
px += rectw;
}
+ else if(t == recto) {
+ get_rect_vals(tval, &rectw, &recth);
+ rectw = rectw+px > dzen.w ? dzen.w-px : rectw;
+ recth = recth > dzen.line_height ? dzen.line_height : recth-1;
+ recty = (dzen.line_height - recth)/2;
+ XDrawRectangle(dzen.dpy, pm, dzen.tgc, px, (int)recty, rectw-1, recth);
+ px += rectw;
+ }
else if(t == circle) {
rectw = recth = atoi(tval);
XFillArc(dzen.dpy, pm, dzen.tgc, px, (dzen.line_height - recth)/2, rectw, recth, 2880, 23040);
px += rectw;
}
+ else if(t == circleo) {
+ rectw = recth = atoi(tval);
+ XDrawArc(dzen.dpy, pm, dzen.tgc, px, (dzen.line_height - recth)/2, rectw-1, recth-1, 2880, 23040);
+ px += rectw;
+ }
else if(t == pos) {
if((n_pos = atoi(tval)) < 0)
n_pos *= -1;
diff --git a/dzen.h b/dzen.h
index 9dec364..d3d2334 100644
--- a/dzen.h
+++ b/dzen.h
@@ -11,15 +11,15 @@
#endif
#define FONT "-*-fixed-*-*-*-*-*-*-*-*-*-*-*-*"
-#define BGCOLOR "#ab0b0b"
-#define FGCOLOR "#efefef"
+#define BGCOLOR "#111111"
+#define FGCOLOR "grey70"
#define ALIGNCENTER 0
#define ALIGNLEFT 1
#define ALIGNRIGHT 2
-#define MIN_BUF_SIZE 524
-#define MAX_LINE_LEN 512
+#define MIN_BUF_SIZE 1024
+#define MAX_LINE_LEN 1024
/* gui data structures */
enum { ColFG, ColBG, ColLast };
diff --git a/gadgets/README.gcpubar b/gadgets/README.gcpubar
index e8f86aa..ec548cc 100644
--- a/gadgets/README.gcpubar
+++ b/gadgets/README.gcpubar
@@ -15,7 +15,7 @@ Command line options:
less than 1 for intervals
shorter than a second
- -c : Terminate after diplaying (default: infite)
+ -c : Terminate after diplaying (default: infinite)
argument to '-c' values
-w : Width of the meter in pixels (default: 100)
@@ -26,4 +26,9 @@ Command line options:
-bg : Meter background color (default: darkgrey)
+ -nonl: no new line, don't put
+ '\n' at the end of the bar (default: do print '\n')
+
+
+
diff --git a/gadgets/gcpubar.c b/gadgets/gcpubar.c
index f65569c..ea96d1a 100644
--- a/gadgets/gcpubar.c
+++ b/gadgets/gcpubar.c
@@ -32,7 +32,7 @@ THE SOFTWARE.
/* bar color for critical values */
#define CRITCOL "red"
-static void pbar (double, int, int);
+static void pbar (double, int, int, int);
struct cpu_info {
unsigned long long user;
@@ -44,7 +44,7 @@ struct cpu_info {
char *bg, *fg;
static void
-pbar(double perc, int maxc, int height) {
+pbar(double perc, int maxc, int height, int print_nl) {
int i, rp;
double l;
@@ -57,9 +57,9 @@ pbar(double perc, int maxc, int height) {
else
rp = (int)perc;
- printf("CPU: %3d%% ^fg(%s)^r(%dx%d)^fg(%s)^r(%dx%d)\n", rp,
+ printf("CPU: %3d%% ^fg(%s)^r(%dx%d)^fg(%s)^r(%dx%d)^fg()%s", rp,
(rp>=CPUCRIT) ? CRITCOL : fg, (int)l, height,
- bg, maxc-(int)l, height);
+ bg, maxc-(int)l, height, print_nl ? "\n" : "");
fflush(stdout);
}
@@ -74,11 +74,11 @@ main(int argc, char *argv[])
char buf[256], *ep;
/* defaults */
- double ival=1.0;
- int counts = 0;
- int barwidth=100;
- int barheight=10;
- char *myfont = NULL;
+ double ival = 1.0;
+ int counts = 0;
+ int barwidth = 100;
+ int barheight = 10;
+ int print_nl = 1;
for(i=1; i < argc; i++) {
if(!strncmp(argv[i], "-i", 3)) {
@@ -120,8 +120,11 @@ main(int argc, char *argv[])
strcpy(bg, "darkgrey");
}
}
+ else if(!strncmp(argv[i], "-nonl", 6)) {
+ print_nl = 0;
+ }
else {
- printf("usage: %s [-i <interval>] [-c <count>] [-fg <color>] [-bg <color>] [-w <pixel>] [-h <pixel>]\n", argv[0]);
+ printf("usage: %s [-i <interval>] [-c <count>] [-fg <color>] [-bg <color>] [-w <pixel>] [-h <pixel>] [-nonl]\n", argv[0]);
return EXIT_FAILURE;
}
}
@@ -163,7 +166,7 @@ main(int argc, char *argv[])
total = (mcpu.user + mcpu.sys + mcpu.idle + mcpu.iowait) / 100.0;
myload = (mcpu.user + mcpu.sys + mcpu.iowait) / total;
- pbar(myload, barwidth, barheight);
+ pbar(myload, barwidth, barheight, print_nl);
ocpu = ncpu;
}
}
diff --git a/gadgets/gdbar.c b/gadgets/gdbar.c
index 4138770..af25632 100644
--- a/gadgets/gdbar.c
+++ b/gadgets/gdbar.c
@@ -51,7 +51,7 @@ pbar(const char* label, double perc, int maxc, int height, int pnl) {
else
rp = (int)perc;
- printf("%s %3d%% ^fg(%s)^r(%dx%d)^fg(%s)^r(%dx%d)%s",
+ printf("%s %3d%% ^fg(%s)^r(%dx%d)^fg(%s)^r(%dx%d)^fg()%s",
label ? label : "", rp,
fg, (int)l, height,
bg, maxc-(int)l, height,
diff --git a/help b/help
index 336e3c3..e53bc59 100755
--- a/help
+++ b/help
@@ -2,11 +2,10 @@
#
# (c) 2007, by Robert Manea
-OPTS='-bg #323232 -fg grey70 -p -l 30 -e onstart=uncollapse,scrollhome;button5=scrolldown;key_Down=scrolldown;button4=scrollup;key_Up=scrollup;key_Page_Down=scrolldown:30;key_Page_Up=scrollup:30;key_Escape=exit;button3=exit;entertitle=grabkeys;enterslave=grabkeys;leaveslave=ungrabkeys'
+OPTS='-bg #111111 -fg grey70 -p -l 30 -e onstart=uncollapse,scrollhome;button5=scrolldown;key_Down=scrolldown;button4=scrollup;key_Up=scrollup;key_Page_Down=scrolldown:30;key_Page_Up=scrollup:30;key_Escape=exit;button3=exit;entertitle=grabkeys;enterslave=grabkeys;leaveslave=ungrabkeys'
if test -x ./dzen2 ; then
- (echo "^fg(#323232)^bg(#5FBF77)Documentation (use: scrollwheel, arrow keys, \
-PgUP/PgDown to scroll. Escape or right mouse button to quit)"; cat README.dzen) | ./dzen2 $OPTS
+ (echo "^fg(#323232)^bg(#5FBF77) Documentation (use: scrollwheel, arrow keys, PgUP/PgDown to scroll. Escape or right mouse button to quit) "; cat README.dzen) | ./dzen2 $OPTS
else
echo "Please type 'make' to build dzen and rerun help"
fi