Commit Graph

66 Commits

Author SHA1 Message Date
mihaicmn ad7dec31d5 Use the DPI setting within the i3bar (#2556) 2016-11-12 06:34:54 -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
koebi 655ed0ba27 fix i3bar crashing when I3SOCK present (#2471)
When I3SOCK is present, socket_path might be a pointer to an
environment variable, which cannot be free'd in line 157. This
commit duplicates the string if I3SOCK is present, thus making
socket_path a free-able pointer again.
2016-09-26 08:01:30 -07:00
Michael Stapelberg 9dde0b9b18 i3bar: fix memory leak in socket path 2016-01-09 12:30:15 +01: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
shdown 6922a820a6 i3bar: spelling fixes (2) 2015-03-24 15:41:16 +03:00
shdown e8704bb33b i3bar: spelling fixes 2015-03-23 22:56:49 +03:00
Ingo Bürk 9ff230c375 remove unused statusline_buffer 2015-02-18 20:01:52 +01: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
Marco Hunsicker 92868cf6d3 update year in copyright notices to 2014
This patch updates the copyright year information the i3 and
i3bar binaries show to the user.
2014-01-26 16:10: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
Simon Elsbrock 6b0efac483 i3bar: fix usage description, make -b happen 2013-03-29 09:55:03 +01: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
Michael Stapelberg a977b2d96e i3bar: fix -h output (Thanks IsoLnCHiP) 2011-10-31 20:44:55 +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 cf67966fa0 i3bar: document -b in --help (Thanks mxf) 2011-10-21 18:59:59 +01:00
Michael Stapelberg a5be27cb79 Make i3bar get its config from i3 via IPC
In order to not duplicate configuration options and make stuff confusing, we
dropped the commandline flags (except for socket_path and bar_id). This means
that you *have to* specify bar_id when starting i3bar. The best way is to let
i3 start i3bar, which it will do automatically for every bar {} configuration
block it finds.
2011-10-19 22:58:19 +01:00
Michael Stapelberg 64a7017c32 i3bar: add modelines to all files 2011-10-09 14:28:20 +01:00
Michael Stapelberg 339a7cb8c3 make i3bar use i3’s common.mk 2011-08-01 16:13:19 +02:00
Axel Wagner 3302b22f71 Bugfix: Delay event-subscription until reconnect (thx aniou) 2011-07-31 18:26:52 +02:00
Axel Wagner 8d09ed7bf5 Update changelog and copyright, bump version and more 2011-07-31 16:16:17 +02:00
Axel Wagner e7c2b25ddd Fix compiler-warnings from libev 2011-04-28 19:54:31 +02:00
Axel Wagner d31384e955 Revert "Allow space after space"
This reverts commit c9334c922de120a08e66cb3a8c340fc1a453bf55.
2011-04-22 01:18:57 +02:00
Axel Wagner bf078c673f Allow space after space 2011-04-22 00:42:24 +02:00
Axel Wagner ed5ac7f41d Implement disabling the workspace buttons („thx“ sECuRE) 2011-04-21 20:24:02 +02:00
Axel Wagner 52e70c3802 Add Color for focused ws (thx phnom) 2011-03-20 19:29:30 +01:00
Axel Wagner 2fd7449e29 Add support for I3_SOCKET_PATH-atom 2011-03-19 22:06:08 +01:00
Axel Wagner 5219493ffe Bugfix: Don't SIGSTOP child in dockmode 2011-03-14 09:24:32 +01:00
Axel Wagner 64f2a7561d Implement dock-positioning 2011-02-21 15:53:32 +01:00
Axel Wagner 7a7faff96d Remove superflous FREE_SLIST 2011-01-26 01:54:36 +01:00
Axel Wagner cc71c77329 Bugfix: free() command-string, after it is not needed anymore 2011-01-26 01:54:36 +01:00
Axel Wagner c9ee3eb21e Change default socketpath to /tmp/i3-ipc.sock 2011-01-22 17:41:24 +01:00
Axel Wagner caca38b68e Use I3SOCK environment-variable 2011-01-11 05:03:14 +01:00
Fernando Tarlá Cardoso Lemos 29f153c634 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:57:00 +01:00
Axel Wagner 497a091fbb Use strerror() for more usefull errormessages 2011-01-01 16:55:13 +01:00
Axel Wagner 3daab599ca Bugfix: Recover from closed socket 2010-12-26 20:03:06 +01:00
Axel Wagner 537851b929 Switch back ws_fg and ws_bg (Thanks julien) 2010-12-03 17:59:28 +01:00
Axel Wagner a88f7fb392 We don't need sig_quit 2010-11-11 03:01:40 +01:00
Axel Wagner 33202881c4 Handle SIGTERM/-INT/-HUP 2010-11-11 02:57:39 +01:00
Axel Wagner d5e3b58d47 -V actually does not take an argument (yet) 2010-11-11 02:57:25 +01:00
Axel Wagner 127c082e83 Call init_colors() earlier 2010-11-04 13:46:33 +01:00
Axel Wagner 992612c89d Some stylechanges to previous commit 2010-11-04 12:27:10 +01:00
Fernando Tarlá Cardoso Lemos 6376cf99d2 Custom colors can be set from the command line. 2010-11-04 11:51:26 +01:00
Axel Wagner 920721bb93 Use DLOG/ELOG-macros, provide --verbose-option 2010-09-17 06:49:28 +02:00
Axel Wagner 93453c64f2 Add some more comments 2010-09-17 05:26:31 +02:00
Axel Wagner 5deb95de33 Make i3_default_sock_path a local variable 2010-09-17 03:04:40 +02:00
Axel Wagner c4c918cb06 Make hide_on_modifier configurable 2010-08-26 00:02:35 +02:00
Axel Wagner 386abde4df Put usage-message in own function 2010-08-26 00:01:24 +02:00
Axel Wagner 84d7da0acf Correct typo in usage-message 2010-08-19 22:13:40 +02:00