Merge branch 'master' of github.com:LemonBoy/bar

* 'master' of github.com:LemonBoy/bar: (22 commits)
  Prevent a NULL pointer deference if monitor_create fails
  Fix the 'T' command parsing
  Put the elements of rgba_t in the right order. Thanks to @mrshankly for noticing it
  Document #97 - Nested clickable areas
  Support colors in #rrggbb form
  Make bar compile with -Wall and no warning
  Treat getopt return value as int instead of char. Avoids bar getting stuck in an endless loop on PPC platforms. (Thanks to @electro7)
  Clean up the code doing color parsing and handling. Implement gradients as a bonus feature (not yet exposed)
  Strip all the unnecessary stuff when parsing the font list
  Fix typo in README.pod about the scroll up/down buttons
  change comment style
  move a declaration to the top of the function
  remove duplicate test
  area_add: Use str directly
  typo, whitin -> within
  Allow having clickable areas inside another
  Fix a silly bound-checking error. (#101) Close a long-standing PR by configuring the window position after mapping it Set the window title
  Fixed two memory leaks. Don't treat unicode sequences over two bytes long as latin1 codepoints (fixes #99).
  Allow explicitly specifying the font with %{Tindex}
  Add break from main loop when X conn has error
  ...
This commit is contained in:
krypt-n 2015-02-24 13:16:34 +01:00
commit 7f81f57426
3 changed files with 466 additions and 274 deletions

View File

@ -1,6 +1,5 @@
CC ?= gcc CC ?= gcc
STRIP ?= strip CFLAGS = -Wall -std=c99 -Os
CFLAGS = -std=c99 -Os
LDFLAGS = -lxcb -lxcb-xinerama -lxcb-randr LDFLAGS = -lxcb -lxcb-xinerama -lxcb-randr
CFDEBUG = -g3 -pedantic -Wall -Wunused-parameter -Wlong-long\ CFDEBUG = -g3 -pedantic -Wall -Wunused-parameter -Wlong-long\
-Wsign-conversion -Wconversion -Wimplicit-function-declaration -Wsign-conversion -Wconversion -Wimplicit-function-declaration
@ -22,7 +21,6 @@ doc: README.pod
${EXEC}: ${OBJS} ${EXEC}: ${OBJS}
${CC} -o ${EXEC} ${OBJS} ${LDFLAGS} ${CC} -o ${EXEC} ${OBJS} ${LDFLAGS}
${STRIP} -s ${EXEC}
debug: ${EXEC} debug: ${EXEC}
debug: CC += ${CFDEBUG} debug: CC += ${CFDEBUG}

View File

@ -84,6 +84,10 @@ Set the text background color. The parameter I<color> can be I<-> or a color in
Set the text foreground color. The parameter I<color> can be I<-> or a color in one of the formats mentioned before. The special value I<-> resets the color to the default one. Set the text foreground color. The parameter I<color> can be I<-> or a color in one of the formats mentioned before. The special value I<-> resets the color to the default one.
=item B<T>I<index>
Set the font used to draw the following text. The parameter I<index> is a 1-based index of the font list supplied to bar. Any other value (for example I<->) resets bar to normal behaviour (matching the first font that can be used for that character). If the selected font can't be used to draw a character, bar will fall back to normal behaviour for that character.
=item B<U>I<color> =item B<U>I<color>
Set the text underline color. The parameter I<color> can be I<-> or a color in one of the formats mentioned before. The special value I<-> resets the color to the default one. Set the text underline color. The parameter I<color> can be I<-> or a color in one of the formats mentioned before. The special value I<-> resets the color to the default one.
@ -94,7 +98,11 @@ Create a clickable area starting from the current position, when the area is cli
Eg. I<%{A:reboot:} Click here to reboot %{A}> Eg. I<%{A:reboot:} Click here to reboot %{A}>
The I<button> field is optional, it defaults to the left button, and it's a number ranging from 1 to 5 which maps to the left, middle, right, scroll down and scroll up movements. Your mileage may vary. The I<button> field is optional, it defaults to the left button, and it's a number ranging from 1 to 5 which maps to the left, middle, right, scroll up and scroll down movements. Your mileage may vary.
Nested clickable areas can trigger different commands.
Eg. I<%{A:reboot:}%{A3:halt:} Left click to reboot, right click to shutdown %{A}%{A}>
=item B<S>I<dir> =item B<S>I<dir>

716
bar.c

File diff suppressed because it is too large Load Diff