Commit graph

18 commits

Author SHA1 Message Date
Nikos Ntarmos
a44277c84b Add a 'flush'-like function to awesome-client 2008-01-07 19:59:26 +01:00
Julien Danjou
cf6305570e awesome-client send now everything in one message 2008-01-07 18:30:17 +01:00
Julien Danjou
437bc5c22c add 2008 copyright notice 2008-01-02 16:59:43 +01:00
Julien Danjou
d4758481dc remove LAYOUT_PROTO, use a LayoutArrange typedef 2008-01-01 17:33:12 +01:00
Aldo Cortesi
ce556ec743 The preferred line length is 80 characters. 2007-12-18 11:27:26 +01:00
Julien Danjou
ebff63e89a remove some useless #include 2007-12-05 14:31:15 +01:00
Nikos Ntarmos
963bef908e Move string manipulation of the DISPLAY env var into get_client_addr
awesome-client.c manipulates the string returned from getenv("DISPLAY"),
removing anything after the first dot ('.'). awesome.c however has no
such thing, leading to awesome listening on a '...0.0' socket. Anyway,
this seems like something that should be in get_client_addr as opposed
to hardwired in awesome-client.c or awesome.c. The attached patch moves
it into awesome-client-common.c:get_client_addr() and teaches
awesome-client.c of the change.
2007-11-27 14:09:21 +01:00
Julien Danjou
37fae50fbe close csfd 2007-11-26 10:49:59 +01:00
Julien Danjou
e0a72e79ac use $DISPLAY 2007-11-26 10:49:22 +01:00
Julien Danjou
359ff93666 cosmetic 2007-11-26 09:48:03 +01:00
Julien Danjou
279baed9c6 add GNU/Hurd workaround
thanks Fabienne Ducroquet
2007-11-19 20:43:53 +01:00
Nikos Ntarmos
1a829fd76d Make awesome-client exit with a meaningful value on error
As discussed on #awesome, the attached patch makes awesome-client exit
with a meaningful value (i.e. that of errno) when it encounters an
error. Since the most frequent error with awesome-client is a mismatch
in the socket path, there is an explicit case for ENOENT errors. I
thought of adding a matching fprintf in awesome.c, but you can tell what
socket awesome is listening on by looking at what ~/.awesome_ctl.* file
you have.

CAVEAT: Exiting on error may break setups such as:

	while true; do
		echo "some text"
	done | /path/to/awesome-client

which relied on awesome-client continuing to send to the given socket
(although failing) until EOF was encountered on stdin.
2007-11-19 20:42:06 +01:00
Julien Danjou
f28f0e7407 add display name in socket path 2007-10-29 17:29:58 +01:00
Julien Danjou
7476a9712a don't forget to delete addr pointers 2007-10-29 16:23:05 +01:00
Julien Danjou
c8e489d4c9 return EXIT_FAILURE on failure 2007-10-29 16:20:11 +01:00
Julien Danjou
27e7706800 move common stuff for socket com into awesome-client-common.c 2007-10-29 16:14:50 +01:00
Julien Danjou
7e755c17ea add awesome-client.h with common #define and add copyright notice in awesome-client.c 2007-10-27 18:47:13 +02:00
daniel@brinkers.de
23d2e4dd57 add awesome-client to communicate via awesome socket 2007-10-27 18:11:27 +02:00