swc

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/swc
Log | Files | Refs | README | LICENSE

commit 1f194489fa1e55dd8d666b13e372566a703b5757
parent 2c1078c82c6e67f916cce99629a985f3b91d4022
Author: Michael Forney <mforney@mforney.org>
Date:   Sun,  3 Aug 2014 12:07:22 -0700

launch: Support alternate wayland sockets via a command line parameter

Diffstat:
Mlaunch/launch.c | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/launch/launch.c b/launch/launch.c @@ -78,7 +78,8 @@ static void __attribute__((noreturn,format(printf,1,2))) static void __attribute__((noreturn)) usage(const char * name) { - fprintf(stderr, "Usage: %s [-h] [--] <server> [server arguments...]\n", name); + fprintf(stderr, "Usage: %s [-s <server-socket>] [--] " + "<server> [server arguments...]\n", name); exit(EXIT_FAILURE); } @@ -427,10 +428,13 @@ int main(int argc, char * argv[]) struct sigaction action = { 0 }; sigset_t set; - while ((option = getopt(argc, argv, "h")) != -1) + while ((option = getopt(argc, argv, "hs:")) != -1) { switch (option) { + case 's': + setenv("WAYLAND_DISPLAY", optarg, true); + break; case 'h': default: usage(argv[0]);