Skip to content

Commit

Permalink
Fix program name in version strings
Browse files Browse the repository at this point in the history
When running swaymsg -v, the version returned is actually the version of
swaymsg itself, yet the message displayed was "sway version <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 <version>"
instead, and likewise for swaybar.

To get the version of a running sway instance, users should run swaymsg
-t get_version.
  • Loading branch information
RyanDwyer committed Oct 10, 2018
1 parent 2bd561d commit fa89595
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion swaybar/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion swaymsg/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit fa89595

Please sign in to comment.