commit 31193ae219dbc8295f8340dacc71be263b35cb8c from: Spencer Williams date: Thu Jul 27 22:57:43 2023 UTC Add version flag commit - d9c21e6fcdfc804998bedd7aa1afdf39792079b4 commit + 31193ae219dbc8295f8340dacc71be263b35cb8c blob - 42e26aea5347ab0dab039ee1f11b0897f0b702a1 blob + f319441e41018c9e8e340e6cbd8862ad1e90f217 --- mpc-bar.m +++ mpc-bar.m @@ -8,6 +8,7 @@ #include #include +#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; }