Merge branch 'master' into xft-port

* master: (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 14:00:49 +01:00
commit 3b6b0adc44
3 changed files with 585 additions and 446 deletions

View File

@ -1,8 +1,8 @@
CC ?= gcc CC ?= gcc
STRIP ?= strip STRIP ?= strip
CFLAGS = -std=c99 -I/usr/include/freetype2 -Os CFLAGS = -Wall -std=c99 -I/usr/include/freetype2 -Os
LDFLAGS = -lxcb -lxcb-xinerama -lxcb-randr -lX11 -lX11-xcb -lXft -lfreetype -lz -lfontconfig LDFLAGS = -lxcb -lxcb-xinerama -lxcb-randr -lX11 -lX11-xcb -lXft -lfreetype -lz -lfontconfig
CFDEBUG = -g3 -pedantic -Wall -Wextra -Wunused-parameter -Wlong-long\ CFDEBUG = -g3 -pedantic -Wall -Wunused-parameter -Wlong-long\
-Wsign-conversion -Wconversion -Wimplicit-function-declaration -Wsign-conversion -Wconversion -Wimplicit-function-declaration
EXEC = bar EXEC = bar

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>

861
bar.c

File diff suppressed because it is too large Load Diff