diff options
author | Spencer Williams <spnw@plexwave.org> | 2023-07-27 18:57:43 -0400 |
---|---|---|
committer | Spencer Williams <spnw@plexwave.org> | 2023-07-27 18:57:43 -0400 |
commit | 31193ae219dbc8295f8340dacc71be263b35cb8c (patch) | |
tree | dd0ef031583644f0c47bd1a97eda07285c802c95 | |
parent | d9c21e6fcdfc804998bedd7aa1afdf39792079b4 (diff) |
Add version flag
-rw-r--r-- | mpc-bar.m | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -8,6 +8,7 @@ #include <stdlib.h> #include <string.h> +#define VERSION "0.1" #define TITLE_MAX_LENGTH 96 #define SLEEP_INTERVAL 0.2 @@ -450,8 +451,14 @@ cleanup: @end int main(int argc, char *argv[]) { + if (argc > 1 && strcmp(argv[1], "-v") == 0) { + puts("MPC Bar "VERSION); + return 0; + } + [NSApplication sharedApplication]; [MPDController new]; [NSApp run]; + return 0; } |