Commit Graph

42 Commits

Author SHA1 Message Date
Alex Cornejo 07d8168a45 Removed unused display variable.
I just realized this variable was unused in the original code, and in my
patched version. I removed it.

Signed-off-by: Alex Cornejo <acornejo@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-03-28 09:26:51 +01:00
Alex Cornejo 2689852e45 Changed socket interface to support fallbacks.
Now we support a list of fallback targets when opening the socket, and
socket binding/connect is done inside socket.* instead of luaa.c or
awesome-client.c

Signed-off-by: Alex Cornejo <acornejo@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-03-20 08:28:36 +01:00
Alex Cornejo 96cf05f002 Fixed socket usage to work with AFS home folders.
On corporate/university environments it is not uncommon for the home
folder of each user to be hosted on OpenAFS (so you can work from any
terminal and IT services can backup everything at will).

However it is not possible to create sockets in AFS, hence when awesome
attempts to create a socket at ~/.awesome-ctl it fails. To fix this
awesome now uses /tmp/.awesome-ctl as a fallback before giving up.

Signed-off-by: Alex Cornejo <acornejo@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-03-18 08:20:32 +01:00
Uli Schlachter 691b732f1a awesome-client: Don't go into an endless loop if awesome dies
This patch makes awesome-client give up after 10 tries when it lost the
connection to awesome. Also it now waits for some time between reconnect
attempts.
I like the behaviour of this, but some of the code seems a little icky...

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-03-17 20:01:38 +01:00
Roland Kammerer 7e6e50b1c5 awesome-client: fix warning by using a_asprintf()
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-29 18:57:43 +01:00
Konstantin Stepanov d7e5a8f1a3 socket: fix proto not supported under FreeBSD (FS#349)
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-03 14:53:23 +01:00
Julien Danjou 6a295e8e8c awesome-client: reconnect if disconnected
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-26 15:00:27 +02:00
Julien Danjou 9a4a1b90bd awesome-client: handle disconnection
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 16:59:53 +02:00
Julien Danjou 06905f515e awesome-client: read on !tty
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:10:07 +02:00
Julien Danjou ea5fe413cd awesome-client: fix memleak in history
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:05:41 +02:00
Nathan Weizenbaum 37f4fbfe39 awesome-client, socket, lua: make awesome-client into a true REPL
After recieving a command from awesome-client, awesome will send
the result of that command in return and awesome-client will print it out.

Signed-off-by: Nathan Weizenbaum <nex342@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:03:56 +02:00
Julien Danjou fa57be9588 socket, awesome-client: fix computing if DISPLAY unset
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-28 19:51:44 +02:00
Julien Danjou 46ead6ea3f comments fixing
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-20 08:38:00 +02:00
Niv Sardi d980db411d Add history to awesome-client
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-19 07:34:46 +02:00
Julien Danjou be108acc32 [util] warn() and eprint() now print \n
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-23 22:56:05 +02:00
Julien Danjou 1f046b3c9f [everything] Switch from libconfuse to Lua
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-20 18:01:15 +02:00
Julien Danjou e43ca13b6c [awesome-client] Add some more code documentation
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-03-31 14:18:27 +02:00
Julien Danjou 1d468c5583 Lot of cosmetic changes: proto change, etc.
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-03-23 15:52:22 +01:00
Julien Danjou accf223bb1 Use warn() instead of perror()
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-03-23 15:52:21 +01:00
Julien Danjou 11b0982a58 rename awclient.[ch] to socket.[ch] 2008-02-27 09:07:52 +01:00
Julien Danjou 6fd3801ef0 rename awesome-version.[ch] to version.[ch] 2008-02-27 09:04:17 +01:00
Julien Danjou ab8d95f13d rework include 2008-01-29 11:27:14 +01:00
Hans Ulrich Niedermann b457c4b4c9 Common version message for awesome and -client
At every build ("make", "make all"), if necessary, this
version message will be updated.

Note that "make awesome{,-client}" will NOT update the
version message.

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-01-25 12:10:33 +01:00
Julien Danjou 668702b777 move list.h and util.[ch] to common/ 2008-01-21 18:14:59 +01:00
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