From fa8959532ba3d3b0846dc3fb9f55ccbf4e6655ec Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Wed, 10 Oct 2018 18:34:50 +1000 Subject: [PATCH] Fix program name in version strings When running swaymsg -v, the version returned is actually the version of swaymsg itself, yet the message displayed was "sway version ". This can create confusion if users update sway and swaymsg but don't restart sway, then use swaymsg to check the version. This patch changes the wording to be "swaymsg version " instead, and likewise for swaybar. To get the version of a running sway instance, users should run swaymsg -t get_version. --- swaybar/main.c | 2 +- swaymsg/main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/swaybar/main.c b/swaybar/main.c index d2c579db..db204f4a 100644 --- a/swaybar/main.c +++ b/swaybar/main.c @@ -62,7 +62,7 @@ int main(int argc, char **argv) { bar_id = strdup(optarg); break; case 'v': - fprintf(stdout, "sway version " SWAY_VERSION "\n"); + fprintf(stdout, "swaybar version " SWAY_VERSION "\n"); exit(EXIT_SUCCESS); break; case 'd': // Debug diff --git a/swaymsg/main.c b/swaymsg/main.c index 3767daf3..4688737c 100644 --- a/swaymsg/main.c +++ b/swaymsg/main.c @@ -345,7 +345,7 @@ int main(int argc, char **argv) { cmdtype = strdup(optarg); break; case 'v': - fprintf(stdout, "sway version " SWAY_VERSION "\n"); + fprintf(stdout, "swaymsg version " SWAY_VERSION "\n"); exit(EXIT_SUCCESS); break; default: