Commit Graph

46 Commits (0b621292246f2736eeed82ef106f64749c058f68)

Author SHA1 Message Date
Orestis Floros 0b62129224
Remove unused headers
With help from
https://github.com/include-what-you-use/include-what-you-use/
2020-04-20 04:25:06 +02:00
Orestis Floros d14e59b3a7
i3bar: Make header declarations extern
See #3914
2020-02-01 17:33:53 +01:00
Ingo Bürk ca82f95812 feat: added support for user-defined border widths in i3bar blocks (#3726)
This change introduces support for four new properties on the i3bar
protocol, namely "border_top", "border_right", "border_bottom"
and "border_left".

If a block is drawn with a border, these values define the width of
the corresponding edge in pixels. They all default to 1 if not
specified to preserve compatibility.

fixes #3722
2019-06-22 22:18:29 +02:00
Michael Stapelberg fff3f79da9 switch to clang-format-3.8 (#2547)
https://llvm.org/bugs/show_bug.cgi?id=30353 was filed for the unintended
line break between in e.g. “TAILQ_ENTRY(foo)\nbar;”.

Until that’s fixed or a workaround is known, we’ll live with line
breaks. To make it a bit easier for readers to see what’s going on, I
added extra line breaks around each such struct member/variable
definition, so that they at least visually are a single unit.

fixes #2174
2016-11-08 13:46:43 -08:00
Michael Stapelberg f354f53435 Ensure all *.[ch] files include config.h
Including config.h is necessary to get e.g. the _GNU_SOURCE define and
any other definitions that autoconf declares. Hence, config.h needs to
be included as the first header in each file.

This is done either via:
1. Including "common.h" (i3bar)
2. Including "libi3.h"
3. Including "all.h" (i3)
4. Including <config.h> directly

Also remove now-unused I3__FILE__, add copyright/license statement
where missing and switch include/all.h to #pragma once.
2016-10-23 21:09:24 +02:00
Michael Stapelberg 4e9925de73 rename config.h to configuration.h
This is a preparation step for the next commit.
2016-10-23 17:41:46 +02:00
Ingo Bürk 90d94298fa Move draw_util.c to libi3.
In order to prepare for using cairo for rendering i3 decorations,
we need to make the draw_util.c from i3bar available via libi3 such
that both i3bar and i3 can use it.

relates to #1278
2015-11-23 22:18:02 +01:00
David Simon 071f11f9b9 Use separate buffers for i3bar statusline for each workspace, track short and long renders separately, fixes #1824 2015-10-26 16:15:01 -04:00
Ingo Bürk a0add1ba73 Added background and border keys to the i3bar protocol.
This patch adds two new status block keys, background and border, which
define the respective colors for the status block. If not specified, the
current behavior is kept, e.g., no background / border will be drawn.

If the status block is marked urgent, the urgent color is prioritized.

fixes #2022
2015-10-22 16:11:08 +02:00
Michael Stapelberg d622df70ad Merge pull request #1990 from Airblader/bug-1989
Flush cairo surface after drawing text.
2015-10-14 13:32:31 -07:00
Ingo Bürk 02468296c4 Introduce switch for the drawing backend
This commit restores the old XCB drawing code paths while keeping the
cairo drawing available via a compile-time switch (I3BAR_CAIRO). This
is necessary as cairo currently has a bug that breaks i3bar for users
without the RENDER extension, which might be the case, e.g., for VNC
users.

For more context, see #1989 and the discussions about its fix. Once the
cairo fix is available in a stable release, i3 can depend on that version
and remove the XCB drawing code paths.

fixes #1989
2015-10-14 21:12:33 +02:00
Ingo Bürk fec61791e1 Rename is_markup to pango_markup. 2015-10-13 09:59:26 +02:00
Ingo Bürk 410c5da7cf Use cairo for all drawing operations in i3bar.
fixes #1878
2015-10-05 09:29:17 +02:00
Deiz 884214f14f Update copyright notices and get rid of ranges
The script used to make these changes can be found at:

   https://gist.github.com/Deiz/32322020f76d23e2bf8f
2015-04-20 17:50:21 -04:00
Tony Crisci e681f34ec1 i3bar: set markup per block
Add `markup` to the i3bar protocol as a block member.

This is a string that determines how the block should be parsed as
markup. "pango" indicates the block should be parsed as Pango markup.
"none" indicates the block should not be parsed as markup.
2015-03-24 02:27:38 -04:00
Ingo Bürk dd488818a9 Introduce the short_text property on blocks and parse it according to the documentation. 2015-03-23 11:03:45 +01:00
Ingo Bürk 1fde82d584 removed forgotten declaration of unused variable 2015-02-18 20:23:26 +01:00
Ingo Bürk 9ff230c375 remove unused statusline_buffer 2015-02-18 20:01:52 +01:00
Ingo Bürk bf1d0c9335 ensure align = left is the default and update documentation accordingly
fixes #1403
2014-12-03 08:12:04 +01:00
Michael Stapelberg 4c06e7a573 clang-format-3.5 **/*.h **/*.c
This should be the last commit that formats a big bunch of files. From
here on, whenever I merge patches, I’ll run clang-format like described
in the title.
2014-06-19 11:20:32 +02:00
Alexander Kedrik e2ebe3e2ae Use #pragma once
#pragma once is safer and simpler. According to Wikipedia it's supported by all major compilers.
2014-01-01 15:06:57 +01:00
enkore 58e68940f6 Add click events to i3bar
If the statusline generator (i.e. i3status) specifies click_events:true
in the protocol header, i3bar will write a JSON array on it's stdin
notifying it if the user clicks on a block.

The exact protocol is documented in docs/i3bar-protocol.
2013-03-21 23:55:30 +01:00
Artem Shinkarov 5f05ca6b5d Separator color via config; separator width and on/off via ipc
This patch adds the following features:
1) Configure a color of the separator via config.  It is done like
   bar {
      colors {
         separator #000000
      }
   }
2) A block can have an integer entry "separator_block_width" which
   sets the width of the gap which would follow after the current block.

3) A block can have a boolean entry "separator" and if it is set
   to false, then the drawing of the separating line would be disabled.
2013-02-18 10:44:44 +01:00
Antoine Millet e8149c77b3 i3bar: add min_width and align keys to blocks 2012-12-06 09:48:27 +01:00
Pavel Löbl 6148136e7c i3bar: Add current binding mode indicator 2012-11-16 13:44:29 +01:00
Quentin Glidic 89ca48be20 i3bar: Honor "urgent" protocol hint by unhiding 2012-09-22 15:15:57 +02:00
Quentin Glidic 13ecc79fcc i3bar: Rename determine_json_version to parse_json_header 2012-09-22 15:13:21 +02:00
Quentin Glidic bbd1b16043 i3bar: Port to i3String 2012-08-13 11:30:05 +02:00
Michael Stapelberg e53405c216 i3bar: be less strict about the {"version":1} JSON header 2012-08-12 18:40:15 +02:00
Michael Stapelberg 31b9d24c2b Implement the i3bar JSON protocol (with fallback to plain text)
If the first line of the input starts with {"version":, then the input is
considered to be JSON, otherwise it is interpreted as plain text.

Only the "full_text" and "color" parts of a block are currently understood by
i3bar.
2012-02-16 23:28:18 +00:00
Fernando Tarlá Cardoso Lemos fb11cc2d14 Consolidate all convert_* functions into libi3.
Some minor fixes along the way as well. Very minor stuff, unlikely
to ever be visible to the user.
2011-11-16 20:54:30 +00:00
Michael Stapelberg 726f2a1e5a normalize file headers across **/*.{h,c} 2011-10-25 21:19:38 +01:00
Michael Stapelberg d71db710dd i3bar: use safewrappers from libi3 2011-10-21 19:30:46 +01:00
Michael Stapelberg 737cd10bdf i3bar: properly handle the _XEMBED_INFO property 2011-08-24 01:18:27 +02:00
Michael Stapelberg 2046e4112f i3bar: Correctly handle removal of tray clients 2011-08-24 01:18:27 +02:00
Axel Wagner 7cb7700b02 i3bar: Fixup indentions 2011-08-12 18:43:09 +02:00
Axel Wagner 8d09ed7bf5 Update changelog and copyright, bump version and more 2011-07-31 16:16:17 +02:00
Fernando Tarlá Cardoso Lemos 96e14d8103 Separate the lines received in a single read.
Fixes the case where multiple lines are read in a single read syscall
(it could be better optimized in the future). Also fixes a memory
corruption issue when rec == 0.
2011-01-08 14:56:52 +01:00
Axel Wagner 992612c89d Some stylechanges to previous commit 2010-11-04 12:27:10 +01:00
Axel Wagner 0e4487e489 Move child_pid into child.c 2010-09-17 03:03:43 +02:00
Axel Wagner c4c918cb06 Make hide_on_modifier configurable 2010-08-26 00:02:35 +02:00
Axel Wagner 60da522e13 Add licensing information 2010-08-07 18:05:16 +02:00
Axel Wagner 1daa395a77 Added Unicode-Support 2010-08-06 03:32:05 +02:00
Axel Wagner 7d7867acce Be more strict with encapsulation
I.e. move the xcb-event-handling into xcb.c and the
child-process-communications into newly created child.c.
Also change some includes.
2010-08-05 05:09:59 +02:00
Axel Wagner 27aa9a640e Display statusline (without formats) 2010-08-04 03:34:18 +02:00
Axel Wagner 02df973564 Start tracking changes 2010-07-22 01:15:18 +02:00