Commit Graph

98 Commits

Author SHA1 Message Date
Arun Persaud 910875aea6 i3-nagbar: add missing newline when printing version information 2014-03-23 18:56:53 +01:00
Peter Boström f78c1ba053 Fix 'gcc -Wextra -Wno-unused-parameter'. 2014-01-04 20:43:30 +01:00
Peter Boström 9c15b9504e Fix clang -Wextra except -Wunused-parameter.
Cleared all warnings that occur when passing
CFLAGS="-Wall -Wextra -Wno-unused-parameter" to make using clang 3.3 on
Linux x86-64.
2014-01-02 22:15:33 +01: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
Michael Stapelberg 0883dfbe14 only LOG() the DPI when it changes, DLOG() it otherwise (Thanks lkraav)
This avoids flooding stdout every time some text (e.g. a window
decoration) is drawn, yet leaves the message in place when it’s actually
relevant (upon DPI changes).

fixes #1115
2013-12-24 10:35:56 +01:00
Lancelot SIX f22995393a Remove references to PATH_MAX macro
Since the macro PATH_MAX is not defined on every system (GNU/Hurd being
one of those who do not define it), we remove all references to this
macro. Instead, we use a buffer of arbitraty size and grow it when
needed to contain paths.
2013-11-24 13:50:29 +01:00
Baptiste Daroussin f691a55923 Use _PATH_BSHELL to ensure using a bourne shell
[Michael]
This commit should fix problems with people using a non-bourne shell as
login shell, e.g. fish or rc. AFAICT, $SHELL should only be used for
interactive shells, but we just want a bourne shell, not an interactive
shell.
2013-11-09 10:11:32 +01:00
Tony Crisci 8fe17407ff i3-nagbar: Set button inner-width to the width of the label
Use predict_text_width to find the width of the label and then account
for right padding when calculating the width of the button.
2013-10-13 18:02:39 +02:00
Michael Stapelberg 8677936f6c Merge branch 'master' into next 2013-06-28 00:14:30 +02:00
Michael Stapelberg 4765427f21 i3-nagbar: Bugfix: -m requires an argument (crashes if none specified) (Thanks Mayhem) 2013-06-28 00:14:09 +02:00
Michael Stapelberg d51173b2ba i3-nagbar: take our terminal execution kludge to the next level
Please read commit 2bf80528bd first.
Then read the comment within the code of this commit.
Then run in circles and cry loudly.

fixes #1002
fixes #1026
2013-06-10 22:55:39 +02:00
Michael Stapelberg 2bf80528bd i3-nagbar: kludge to run the command shell script when inside a noexec mount
See the comment inside the commit for more information on how this
works.

fixes #947
2013-02-07 15:30:40 +01:00
Michael Stapelberg 66b1dadc38 i3-nagbar: don’t quote the -e argument for i3-sensible-terminal
…not all terminals support it
2012-12-24 16:56:20 +01:00
Michael Stapelberg b3d7531947 refactor both i3-nagbar starts into src/util.c
With this change, libev >= 4 is a hard dependency. It should be present
in all major linux distributions (even the latest ubuntu LTS).
2012-12-24 16:53:20 +01:00
Michael Stapelberg a01bac13fe don’t use reserved identifiers for include guards (left-overs)
fixes #804
2012-09-22 13:31:08 +02:00
Oliver Kiddle f7d825062a remove superfluous ev.h include statements 2012-09-20 11:15:17 +02:00
Michael Stapelberg 4636eb840d fix compilation with older xcb-util with -DXCB_COMPAT (Thanks okraits) 2012-09-03 14:55:27 +02:00
Michael Stapelberg 2896ae8057 logging: make libi3 use verboselog()/errorlog(), provide it in each caller
While this is a bit ugly, it makes the log messages end up where they
are supposed to: in the shmlog/stdout in case of i3 and on stdout in
case of utilities such as i3-input
2012-08-13 13:27:16 +02:00
Fernando Tarlá Cardoso Lemos 6ff3f7abad libi3: Implement Pango rendering 2012-08-13 11:39:30 +02:00
Quentin Glidic 53365fa887 libi3: Rework draw_text
We now have two versions of draw_text
draw_text: Now takes an i3String
draw_text_ascii: Designed for static strings in plain ASCII
2012-08-13 11:37:21 +02:00
Quentin Glidic 50b7764ae4 i3-nagbar: Port to i3String 2012-08-13 11:30:08 +02:00
Quentin Glidic b01545b131 Makefile: Always link libi3 first 2012-08-13 02:00:01 +02:00
Michael Stapelberg 8a1c8115ca fix a few warnings/places where the clang static analyzer complains 2012-08-05 16:34:38 +02:00
Quentin Glidic 0b4ee7a1da common.mk: Split XCB common flags 2012-07-23 00:12:55 +02:00
Quentin Glidic c7029a5e21 common.mk: Introduce I3_*FLAGS
CPPFLGES, CFLAGS and LDFLAGS should be user variables
We now provide default flags but use I3_*FLAGS flags for our own needed
flags

Also reoder lib flags a bit
2012-07-22 23:53:49 +02:00
Quentin Glidic 3b1b72ecbb *.mk: Support passing specific CFLAGS/LIBS 2012-07-22 23:53:13 +02:00
Quentin Glidic e452acb30e Add stub Makefiles to allow subdir make calls 2012-07-22 19:57:48 +02:00
Quentin Glidic 8910a138ff Move i3-nagbar to the new Makefile layout 2012-07-22 19:57:22 +02:00
Michael Stapelberg 4cd5bf94cf i3-nagbar: add -t to the synopsis (Thanks gamo) 2011-12-07 18:19:11 +00:00
Fernando Tarlá Cardoso Lemos 344c04af12 Implement set_font_colors.
This paves the way for other font rendering backends. Fonts and
colors shouldn't be specified manually from now on.
2011-11-21 20:52:32 +00:00
Fernando Tarlá Cardoso Lemos eafc7af606 Make all programs use draw_text. 2011-11-21 20:52:29 +00:00
Fernando Tarlá Cardoso Lemos af335f0403 Don't call free on statically allocated strings.
Fixes segfault when the option -f is used. Also, don't leak prompt
strings. We either keep FREE to prevent leaking, or choose to leak
and avoid strdup. Another option would be using a flag to indicate
whether or not the strings are heap allocated, but it's overkill.
2011-11-07 19:57:25 +00:00
Michael Stapelberg 726f2a1e5a normalize file headers across **/*.{h,c} 2011-10-25 21:19:38 +01:00
Michael Stapelberg f4469eee0b get rid of xcb.c in all i3-* tools
open_input_window was slightly different for each of them, so it made no sense
to generalize it (then we would end up with a thin and useless wrapper).
2011-10-23 23:20:57 +01:00
Michael Stapelberg a58018cf66 Add libi3/load_font, use it everywhere
…except for i3bar, which needs slightly more information about the font
2011-10-23 22:37:11 +01:00
Michael Stapelberg 78fea8e1fb i3-nagbar: eliminate xcb_change_gc_single with C99 2011-10-23 17:55:58 +01:00
Michael Stapelberg cb9bbcfccf Move get_colorpixel to libi3, use it everywhere else 2011-10-23 17:38:21 +01:00
Michael Stapelberg 753d67fb64 migration from exec i3bar to bar config: i3 substitutes exec with a bar block, shows nagbar 2011-10-22 16:33:00 +01:00
Michael Stapelberg d7eba46de5 i3-nagbar: Implement -t warning, makes colors yellow(ish) 2011-10-22 16:16:06 +01:00
Michael Stapelberg 4f6e58e250 Makefiles: prefix compilation messages (for parallel builds) 2011-10-02 16:04:18 +01:00
Michael Stapelberg 0d77ca9a3d i3-nagbar: correctly check for errors when connecting to X11 2011-07-27 13:30:12 +02:00
Michael Stapelberg e124241e72 i3-nagbar: fix warnings 2011-07-25 00:31:51 +02:00
Michael Stapelberg 6a07e08320 makefiles: build subdirs (Thanks Kacper) 2011-07-25 00:31:35 +02:00
Michael Stapelberg 6b4c65e04d i3-nagbar: Fix -h / --help output (Thanks ktosiek) 2011-07-14 13:26:59 +02:00
Michael Stapelberg 32af9d4106 i3-nagbar: implement -m, set default prompt to "Pleaso do not run this program"
It gets run by i3 automatically.
2011-07-13 18:36:21 +02:00
Michael Stapelberg 3749ed2fbe Makefile: respect and use LIBS (Thanks Kacper) 2011-07-13 13:28:31 +02:00
Michael Stapelberg 93f906308d makefiles: respect and use the CPPFLAGS variable (Thanks Kacper)
See also: http://stackoverflow.com/questions/2754966/cflags-vs-cppflags
2011-07-13 13:25:15 +02:00
Michael Stapelberg c55abca115 add i3-nagbar. tells you about config file errors (for example) 2011-07-10 14:33:19 +02:00