89ca48be20
i3bar: Honor "urgent" protocol hint by unhiding
2012-09-22 15:15:57 +02:00
830829922b
i3bar: Allow to force unhide with draw_bars
2012-09-22 15:15:57 +02:00
8210c6be79
i3bar: Allow child to specify signals to use
...
We now wait for the child process to send the first line before stopping
it to use the signal which might be specified in the i3bar protocol
header
Since clients might use the same signal for both stop and cont, we also
save the stopped state of the child to avoid stopping it while hidden!
2012-09-22 15:13:21 +02:00
1e114d7ab5
i3bar: Fully parse the JSON header
2012-09-22 15:13:21 +02:00
34dc6d4d64
i3bar: Introduce i3bar_child struct
2012-09-22 15:13:21 +02:00
310ae2d0b5
i3bar: Handle the first line with another callback
2012-09-22 15:13:21 +02:00
f691927aa7
i3bar: Split JSON line logic to read_json_input
2012-09-22 15:13:21 +02:00
103b1a3f3a
i3bar: Split flat line logic to read_flat_input
2012-09-22 15:13:21 +02:00
3732cef764
i3bar: Split stdin reading logic to get_buffer
2012-09-22 15:13:21 +02:00
f18ab28f5c
bugfix: memleak: use i3STRING_FREE() instead of FREE()
2012-09-03 00:42:17 +02:00
2d1ebc2b90
Bugfix: memleak: because we use i3string_from_utf8(), we need to free buffer()
...
Previously, buffer was directly used and thus not freed, but
i3string_from_utf8() makes a copy.
2012-09-03 00:42:14 +02:00
b9255f51f8
Use (void) instead of () for functions without args
2012-08-23 19:34:37 +02:00
bbd1b16043
i3bar: Port to i3String
2012-08-13 11:30:05 +02:00
e53405c216
i3bar: be less strict about the {"version":1} JSON header
2012-08-12 18:40:15 +02:00
8f2e225db9
i3bar: Fix warnings with libyajl1 (Thanks prg)
...
yajl1 has the status yajl_status_insufficient_data, which in our stream
parsing context basically means "ok". Therefore, in yajl1, we no longer
print an error in this case.
2012-07-16 19:23:37 +02:00
156a06e495
i3bar: Don’t crash when full_text is missing or null in the JSON input (Thanks fernandotcl)
2012-05-12 08:23:51 +02:00
24ac6e32aa
Bugfix: Properly terminate lines not ending with a newline (Thanks xeen)
...
Previously, we didn’t check for a newline and thus could be corrupting
formerly valid UTF-8 input, such as
echo -n '↓'
Fixes : #671
2012-04-07 19:15:41 +02:00
d519659ea7
i3bar: kill child processes when exit()ing (they might be stopped) (Thanks darkraven)
2012-03-26 17:36:00 +02:00
607ba6fcde
i3bar: Fix memory for old plain-text input (Thanks Han)
2012-03-19 22:30:20 +01:00
a3ee8491fd
i3bar: compile with yajl < 2
2012-02-16 23:41:58 +00:00
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
f0cc13f356
i3bar: fix indention in src/child.c
2011-11-07 21:34:50 +00:00
726f2a1e5a
normalize file headers across **/*.{h,c}
2011-10-25 21:19:38 +01:00
96f67a53a5
i3bar: check exit code of pipe()
2011-10-23 14:31:43 +01:00
d71db710dd
i3bar: use safewrappers from libi3
2011-10-21 19:30:46 +01:00
64a7017c32
i3bar: add modelines to all files
2011-10-09 14:28:20 +01:00
c7ac1f9077
Merge branch 'master' into next
2011-08-25 18:51:02 +02:00
39cff5c31f
i3bar: Bugfix: When receiving EOF, immediately redraw and discard input
2011-08-25 18:46:08 +02:00
9c587a767c
Bugfix: set statusline = NULL, print error messages about EOF/SIGCHLD to stderr (Thanks cls)
2011-08-25 17:10:45 +02:00
7cb7700b02
i3bar: Fixup indentions
2011-08-12 18:43:09 +02:00
8d09ed7bf5
Update changelog and copyright, bump version and more
2011-07-31 16:16:17 +02:00
3d05fe7a52
Use cleanup() in child.c
2011-07-10 04:34:18 +02:00
97827372af
Bugfix: Correctly handle EOF on stdin (Thanks woddf2)
2011-07-10 04:31:53 +02:00
dfd566511e
Bugfix: Don't segfault, if child was killed
2011-03-14 09:17:06 +01:00
972be13dc5
Bugfix: _only_ stop child, if hide_on_modifier is set (thx cradle)
2011-02-04 10:05:48 +01:00
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
34dd4bc89e
Bugfix: If hide-on-modifier is set, stop the child after starting
2011-01-06 17:35:23 +01:00
497a091fbb
Use strerror() for more usefull errormessages
2011-01-01 16:55:13 +01:00
600c4ae95c
Use "*buffer == '\0'" instead of "strlen(buffer) == 0" (thanks dothebart)
2011-01-01 15:08:43 +01:00
ff0522fe95
Bugfix: Send child a SIGCONT, so it reacts to SIGTERM (no zombies \o/)
2010-12-26 14:48:39 +01:00
cdf56f16bf
Revert "Double-fork() to avoid zombies"
...
This reverts commit a4eafae108b63f5df76eea2958aee8cf95cb1ad6.
2010-12-26 14:48:14 +01:00
8301d3d9f3
Send a SIGTERM instead of a SIGQUIT to exit the child
2010-11-11 02:59:17 +01:00
eada483765
Double-fork() to avoid zombies
2010-11-10 18:46:47 +01:00
920721bb93
Use DLOG/ELOG-macros, provide --verbose-option
2010-09-17 06:49:28 +02:00
93453c64f2
Add some more comments
2010-09-17 05:26:31 +02:00
0e4487e489
Move child_pid into child.c
2010-09-17 03:03:43 +02:00
d245d14765
Use realloc instead of manually reallocating
2010-09-17 02:28:56 +02:00
4d38bf81ba
Allocate the right amount of memory for ev_child
2010-09-07 17:28:56 +02:00
0963a0e5ac
Merge branch 'hide' into next
2010-08-26 00:03:41 +02:00
a83e7699e7
Send the child SIGSTOPs and SIGCONTs
2010-08-25 18:31:03 +02:00