aboutsummaryrefslogtreecommitdiff
path: root/client.c (follow)
Commit message (Collapse)AuthorAgeLines
* add option to detach the client process from the terminal instanceFelipe Trzaskowski2021-03-13-1/+9
|
* client: repair usage outputDaniel Eklöf2021-03-12-2/+2
|
* client: remove excess ‘-’ from ‘--log-level’ in usageDaniel Eklöf2021-03-12-1/+1
|
* client: -D,--working-directory: check path exists and is a directoryDaniel Eklöf2021-02-13-1/+8
|
* main/client: add -D,--working-directory=DIRDaniel Eklöf2021-02-12-6/+15
| | | | | This overrides the CWD the slave process chdir()’s into before exec:ing the client application.
* main/client: add missing short options to usage (--help output)Daniel Eklöf2021-02-12-5/+5
| | | | | | | | | | | | | | | | | | Initially, these options *did not* have short options. Then, in e81388336750a20a2da98a57e9726c8ba1b481e3, the short options were added to footclient’s getopt_long() call. This was in a sense incorrect. But instead of reverting it, the short options were made official in 8eaa1959904ecff0e7e75d152220344457912f76, by adding the short options to foot, documenting them in the man pages, and adding them to the shell completions. Though the commit message of 8eaa1959904ecff0e7e75d152220344457912f76 says the options have now been included in usage(), they were in fact *not* added to usage. This patch does just that.
* main: client: factor out some common code for "--log-level" optionCraig Barnes2021-02-11-29/+8
|
* client: add -d,--log-levelDaniel Eklöf2021-02-09-14/+54
|
* client: explicitly use a 64-bit type for ‘total_len’Daniel Eklöf2021-01-23-1/+1
| | | | | | | | This fixes an out-of-range comparison in 32-bit builds: client.c:289:19: error: result of comparison of constant 4294967296 with expression of type 'size_t' (aka 'unsigned int') is always false [-Werror,-Wtautological-constant-out-of-range-compare] if (total_len >= 1llu << (8 * sizeof(uint32_t)) || ~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* client/server: switch to POSIX header for sockaddr_unJan Beich2021-01-21-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | client.c:13:10: fatal error: 'linux/un.h' file not found #include <linux/un.h> ^~~~~~~~~~~~ client.c:195:24: error: variable has incomplete type 'struct sockaddr_un' struct sockaddr_un addr = {.sun_family = AF_UNIX}; ^ client.c:195:12: note: forward declaration of 'struct sockaddr_un' struct sockaddr_un addr = {.sun_family = AF_UNIX}; ^ server.c:11:10: fatal error: 'linux/un.h' file not found #include <linux/un.h> ^~~~~~~~~~~~ server.c:307:24: error: variable has incomplete type 'struct sockaddr_un' struct sockaddr_un addr; ^ server.c:307:12: note: forward declaration of 'struct sockaddr_un' struct sockaddr_un addr; ^ server.c:347:24: error: variable has incomplete type 'struct sockaddr_un' struct sockaddr_un addr = {.sun_family = AF_UNIX}; ^ server.c:347:12: note: forward declaration of 'struct sockaddr_un' struct sockaddr_un addr = {.sun_family = AF_UNIX}; ^ server.c:394:24: error: variable has incomplete type 'struct sockaddr_un' struct sockaddr_un addr = {.sun_family = AF_UNIX}; ^ server.c:394:12: note: forward declaration of 'struct sockaddr_un' struct sockaddr_un addr = {.sun_family = AF_UNIX}; ^
* debug: rename assert() to xassert(), to avoid clashing with <assert.h>Craig Barnes2021-01-16-1/+1
|
* Print stack trace on assert() failure or when calling fatal_error()Craig Barnes2021-01-16-1/+1
| | | | | | Note: this uses the __sanitizer_print_stack_trace() function from the AddressSanitizer runtime, so it only works when AddressSanitizer is in use.
* features: include compile-time enable/disable state of features when printing versionDaniel Eklöf2020-12-07-1/+11
|
* client: add new "--window-size-*" options to docs and CHANGELOG.mdCraig Barnes2020-11-22-0/+2
|
* client: add "--window-size-pixels" and "--window-size-chars" optionsCraig Barnes2020-11-22-13/+37
|
* client: fix handling of "-m" command-line flagCraig Barnes2020-11-22-1/+1
|
* client: add missing options to getopt_long(3) optstring argumentCraig Barnes2020-11-21-1/+1
|
* client: we added argv lengths twiceDaniel Eklöf2020-11-21-1/+0
|
* client: avoid doing a signed vs. unsigned comparisonDaniel Eklöf2020-11-21-1/+1
|
* client/server: simplify setup packet handlingDaniel Eklöf2020-11-21-75/+58
| | | | | | Instead of writing (and logging errors for) every parameter, one at a time, send all fixed size data in a single struct, followed by all the variable length data.
* client: let getopt_long(3) print error messagesDaniel Eklöf2020-11-10-6/+1
| | | | Closes #191
* Convert most dynamic allocations to use functions from xmalloc.hCraig Barnes2020-08-08-1/+2
|
* server/client: use $WAYLAND_DISPLAY instead of $XDG_SESSION_ID in default socket pathDaniel Eklöf2020-08-02-5/+8
| | | | | | | | | Foot is a Wayland client and cannot be run outside of a Wayland session. As such, it makes more sense to use $WAYLAND_SESSION instead of $XDG_SESSION_ID in the default socket path since this makes it clearer which Wayland session we belong to. Closes #55.
* doc: foot.1: fix default path in -s,--serverDaniel Eklöf2020-08-02-1/+1
| | | | | | | | | | | | | | | | | | | The documentation incorrectly stated that the default path is $XDG_RUNTIME_DIR/foot.sock. The correct default path is * $XDG_RUNTIME_DIR/foot-$XDG_SESSION_ID.sock * $XDG_RUNTIME_DIR/foot-no-session.sock * /tmp/foot.sock Depending on whether XDG_RUNTIME_DIR and XDG_SESSION_ID has been set or not. This also removes the '<>' from the default when XDG_SESSION_ID is not set. Closes #53.
* client/server: implement '--hold' in footclientDaniel Eklöf2020-05-26-0/+13
|
* main/client: be POSIXLY_CORRECT when parsing command lineDaniel Eklöf2020-05-08-3/+3
| | | | | | | | | | | | | | | | | | | | This means command line parsing stops when it encounters the first nonoption argument. The result is that one no longer need to use '--' to ensure arguments are passed to the shell/command, instead of parsed by foot. That is, instead of foot -- sh -c true one can now do foot sh -c true Arguments to foot *must* go before the command: foot --fullscreen sh -c true
* conf: add 'title' conf option and --title command line optionDaniel Eklöf2020-04-01-0/+16
|
* conf: add app-id config option and --app-id command line optionDaniel Eklöf2020-04-01-10/+25
|
* client: add --maximized and --fullscreenDaniel Eklöf2020-03-27-0/+28
| | | | | | | | | We now create a copy of the config for each client, and updates it with the values passed from the client. Since we're not actually cloning it (and e.g. strdup() all strings etc) we can't call conf_destroy() to free it, but need to free just the strings we've replaced.
* client: log path we actually tried to connect to (and failed)Daniel Eklöf2020-03-10-1/+1
|
* client: update --server-socket usage to mention XDG_SESSION_IDDaniel Eklöf2020-03-10-1/+1
|
* server/client: add XDG_SESSION_ID to the default socket pathDaniel Eklöf2020-03-09-1/+4
| | | | This allows multiple foot servers to run in multiple sessions.
* client: make sure 'cwd' is in scope of all goto'sDaniel Eklöf2020-02-20-1/+3
|
* client: allocate current working directory buffer dynamicallyDaniel Eklöf2020-02-20-2/+14
|
* slave: prefix argv[0] with a '-' when spawning a login-shellDaniel Eklöf2020-02-20-0/+6
|
* client: add --login-shell command line optionDaniel Eklöf2020-02-20-0/+7
|
* main: add --print-pid=FILE|FDDaniel Eklöf2020-02-05-5/+22
| | | | | When specified, our PID is written to the specified file (or FD), after we've successfully started up.
* client/server: client sends its CWD to serverDaniel Eklöf2019-12-21-0/+12
|
* log: caller can control syslog levelDaniel Eklöf2019-12-17-1/+1
|
* client: strncpy() size limit must be less than destination sizeDaniel Eklöf2019-12-14-1/+1
|
* client: add missing break after handling -t,--termDaniel Eklöf2019-12-14-0/+1
|
* client: add 's:' to the list of recognized short optionsDaniel Eklöf2019-12-14-1/+1
|
* client: initialize/deinitialize the logging systemDaniel Eklöf2019-12-14-0/+2
|
* client: add -s,--server-socket command line optionDaniel Eklöf2019-12-14-16/+34
| | | | | This allows the user to override the default path (XDG_RUNTIME_DIR/foot.sock) we try to connect to.
* server/client: harden reading of initialization data, and make asyncDaniel Eklöf2019-11-05-2/+21
| | | | | | | | | | | | | | | | | | | | * Client terminal initialization data is now received asynchronously. To facilitate this, a couple of minor changes to the protocol was made: - The client now starts with sending a 4-byte unsigned integer with the *total* size of the initialization data (*not* including the size field itself. - Strings (TERM variable + argv) are now sent NULL-terminated * The server allocates a single buffer, and fills it asynchronously. When full (as indicated by the initial 'total size' integer), we parse it (taking care not to read outside boundaries etc, and verifies the lengths (of the TERM variable and argv array) indicated by the client matches the actual lengths of the strings received. * The server now ignores 'unexpected' data received from the client, after the terminal has been instantiated.
* client: bug: verify argv was sent correctlyDaniel Eklöf2019-11-01-1/+1
| | | | We checked we had written 2 bytes (sizeof(len)), not <len> bytes.
* client: add debug logging of argc/argvDaniel Eklöf2019-11-01-0/+4
|
* client: register signal handler for SIGTERM tooDaniel Eklöf2019-11-01-1/+2
|
* client/server: add -t,--term to footclientDaniel Eklöf2019-11-01-2/+18
|
* client: add long options for --verbose and --helpDaniel Eklöf2019-11-01-1/+7
|
* client: a standalone binary that connects to a foot --serverDaniel Eklöf2019-11-01-0/+130