Commit Graph

84 Commits

Author SHA1 Message Date
shdown bc52fae15c libi3: change scalloc() signature to match calloc() 2015-08-03 12:50:13 +03: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
Thomas Anderson 196e1d0971 Respect EXEC_PREFIX and a users' choice of PKG_CONFIG.
The Makefiles should put binaries in $(EXEC_PREFIX) and
architecture-independent files in $(PREFIX). Also a user may have a
prefixed- pkg-config, as in the case of cross compiling on Exherbo
Linux, so respect the well-accepted $(PKG_CONFIG) variable for this
purpose.
2015-04-12 17:59:30 -07:00
Deiz 9b8c2b1d1a Respect XDG config directories in i3-config-wizard
$XDG_CONFIG_HOME is used for the config's write path, and the wizard
terminates if a config is found in ~/.i3 or $XDG_CONFIG_HOME/i3
2015-03-29 23:32:42 -04:00
Deiz 4daed31c3e Move resolve_tilde and get_config_path into libi3 2015-03-29 14:45:42 -04:00
Deiz 0aa18a602d Make wizard window size and click coordinates dependent on font
This guarantees the whole visible area of the pixmap is reinitialized,
and ensures that the click bounding boxes are properly aligned with
the displayed text.
2015-03-28 15:35:19 -04:00
Deiz 95fa121c56 Switch the wizard's modifier choice when up or down are pressed 2015-03-28 13:00:19 -04:00
Michael Stapelberg ad31b13cb6 update default fonts for i3-{input,config-wizard,nagbar}
We’ve done this a while ago in i3.config itself, but the tools in
question aren’t hooked up to that setting, so we need to do it here as
well.
2015-03-26 10:03:30 +01:00
Michael Stapelberg 414290df56 make i3-config-wizard work properly on hi-dpi displays 2015-03-26 10:00:13 +01:00
Michael Stapelberg 091f1db39a run clang-format (3.5.0)
Not quite sure why there are so many differences. Perhaps we’ve gotten
out of the habit of running clang-format after every change.

I guess it’d be best to have a travis hook that runs clang-format for us
and reports any problems on pull requests.
2015-03-01 17:16:03 +01:00
Michael Stapelberg 3f5a0f0024 Switch to xcb-xkb and libxkbcommon
This removes our last dependency on Xlib! :)

(Okay, an Xlib dependency still comes in through other libraries that we
 link against, but it’s not us. Our code is simpler by this change and
 uses one less connection to X11.)
2014-06-21 19:10:37 +02: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
Michael Stapelberg 9200094203 format **/*.c with clang-format-3.5
This has multiple effects:

1) The i3 codebase is now consistently formatted. clang-format uncovered
   plenty of places where inconsistent code made it into our code base.

2) When writing code, you don’t need to think or worry about our coding
   style. Write it in yours, then run clang-format-3.5

3) When submitting patches, we don’t need to argue about coding style.

The basic idea is that we don’t want to care about _how_ we write the
code, but _what_ it does :). The coding style that we use is defined in
the .clang-format config file and is based on the google style, but
adapted in such a way that the number of modifications to the i3 code
base is minimal.
2014-06-15 19:07:02 +02:00
Jean-Philippe Ouellet 88114bc055 "somewhen" -> "some time" in i3-config-wizard(1) 2014-05-16 18:00:00 +02: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
Michael Stapelberg d3beff2339 make i3bar use libi3’s root_atom_contents()
This removes code duplication, which will be useful for a subsequent
commit.

Furthermore, we now don’t open X11 connections unnecessarily in some
corner cases.
2013-11-22 15:48:45 +01:00
Baptiste Daroussin eb601a2615 All supported FreeBSD version has getline now 2013-03-20 11:17:26 +01:00
Michael Stapelberg a6c676e5d3 i3-config-wizard: clean all traces of the old config parser (Thanks cradle) 2012-12-26 14:23:47 +01:00
Michael Stapelberg 0e4c956c1d i3-config-wizard: switch away from bison/flex to hand-written parser
This adds some code duplication which we might remove in a future
refactoring or not. Depends on whether unifying the parsers actually
makes the code better or not. I suspect it doesn’t :-).
2012-12-25 14:20:17 +01:00
David Coppa 69e15bba5d OpenBSD has getline() now 2012-12-08 17:52:58 +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 b9fde552d0 fix make clean targets 2012-09-19 18:05:51 +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 b01545b131 Makefile: Always link libi3 first 2012-08-13 02:00:01 +02:00
Michael Stapelberg c64047157d config-wizard: use the level 0 keysym whenever it’s unambiguous
From the code:

    Try to use the keysym on the first level (lower-case). In case
    this doesn’t make it ambiguous (think of a keyboard layout
    having '1' on two different keys, but '!' only on keycode 10),
    we’ll stick with the keysym of the first level.

    This reduces a lot of confusion for users who switch keyboard
    layouts from qwerty to qwertz or other slight variations of
    qwerty (yes, that happens quite often).
2012-08-02 02:14:56 +02:00
Quentin Glidic 0b4ee7a1da common.mk: Split XCB common flags 2012-07-23 00:12:55 +02:00
Quentin Glidic 5e0cd52f10 common.mk: Split XCB keyboard flags 2012-07-23 00:06:37 +02:00
Quentin Glidic fde8c0dd85 common.mk: Split Xlib flags 2012-07-23 00:04:01 +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 0c2e4d8347 Move i3-config-wizard to the new Makefile layout 2012-07-22 19:57:21 +02:00
David Coppa 7a67938f3c Replace deprecated XKeycodeToKeysym() with XkbKeycodeToKeysym() 2012-05-30 17:24:43 +02:00
Michael Stapelberg 45d5f1fbaa i3-config-wizard: use fgetln on OpenBSD, too (Thanks David Coppa) 2012-02-21 15:23:58 +01:00
Michael Stapelberg 51728bab77 Merge branch 'master' into next 2012-02-12 10:21:01 +00:00
beauby b3e3ecf722 Fixed a memory leak 2012-02-12 10:19:34 +00:00
beauby 4f14850173 BugFix: keep the indentation of config.keycodes 2012-02-12 10:19:06 +00:00
Michael Stapelberg 2daa8d422a Merge branch 'master' into next
Conflicts:
	i3-config-wizard/main.c
2012-02-10 00:03:18 +00:00
beauby 891831be3a Fixed the fgetln workaround 2012-02-10 00:02:08 +00:00
Michael Stapelberg 53f19576d6 i3-config-wizard: Mark the currently selected modifier with an arrow (Thanks jjfoerch)
Boldface seems to be unrecognizable on some systems.

Fixes #607
2012-01-21 14:32:35 +00:00
Michael Stapelberg dee7c07ad2 shmlog: store meta information in the buffer itself, store path as X11 atom
This makes i3-dump-log completely independent of a running i3 instance.
2012-01-06 23:40:07 +00:00
Michael Stapelberg 2ec689ec7d Fix i3-config-wizard on FreeBSD 7.x (without getline()) (Thanks garga) 2011-12-30 00:50:54 +01:00
Michael Stapelberg acf29dbfd5 Makefiles: introduce $(FLEX) and $(BISON) 2011-11-22 00:01:01 +00:00