Browse files

Code tidy and Readme addition.

  • Loading branch information...
1 parent bec149b commit 5805b835c66327e0852a68b52f6880d116caac3a @moetunes committed Aug 2, 2012
Showing with 10 additions and 7 deletions.
  1. +7 −4 Readme.md
  2. +3 −3 splitter_bar.c
View
11 Readme.md
@@ -1,14 +1,17 @@
##splitter_bar
-####Aimed at, but not limited to, monsterwm users
+###Aimed at, but not limited to, monsterwm users.
+
+The bar can show two sets of information with different timings. e.g.
Pipe monsterwm into splitter_bar to have it's output shown on the left.
-Set the root windows' name with conky or a script
+Set the root windows' name with conky or a script and it will be
+ shown on th rest of the bar.
e.g. conky | while read -r; do xsetroot -name "$REPLY"; done &
-###The ten colours are set at compile time so edit them to suit.
-###All ten colours can be used for the background or text.
+####The ten colours are set at compile time so edit them to suit.
+####All ten colours can be used for the background or text.
The first colour (colour0) is the default background and the second colour
is the default for the text, for both the piped in text and the text from xsetroot -name.
View
6 splitter_bar.c
@@ -31,7 +31,7 @@
/***************** DEFINES ***********************/
#define TOP_BAR 1 // 0=Bar at top, 1=Bar at bottom
-#define BAR_HEIGHT 16
+#define BAR_HEIGHT 18
#define BAR_WIDTH 0 // 0=Full width or use num pixels
// If font isn't found "fixed" will be used
#define FONT "-*-terminusmod.icons-medium-r-*-*-12-*-*-*-*-*-*-*,-*-stlarch-medium-r-*-*-12-*-*-*-*-*-*-*"
@@ -349,10 +349,10 @@ int main(int argc, char ** argv){
values.line_width = 2;
values.line_style = LineSolid;
if(font.fontset) {
- theme[i].gc = XCreateGC(dis, root, GCBackground|GCForeground|GCLineWidth|GCLineStyle,&values);
+ theme[i].gc = XCreateGC(dis, root, GCForeground|GCLineWidth|GCLineStyle,&values);
} else {
values.font = font.font->fid;
- theme[i].gc = XCreateGC(dis, root, GCBackground|GCForeground|GCLineWidth|GCLineStyle|GCFont,&values);
+ theme[i].gc = XCreateGC(dis, root, GCForeground|GCLineWidth|GCLineStyle|GCFont,&values);
}
}
old_length = 0;

0 comments on commit 5805b83

Please sign in to comment.