From 4a67d9e1118d22c2b726c0c2edda669c408403a5 Mon Sep 17 00:00:00 2001 From: BossCode45 Date: Mon, 13 Feb 2023 17:40:27 +1300 Subject: Added --version --- main.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'main.cpp') diff --git a/main.cpp b/main.cpp index 8751dae..37ae38f 100644 --- a/main.cpp +++ b/main.cpp @@ -32,6 +32,8 @@ #include "ewmh.h" using std::cout; +using std::string; +using std::endl; using std::map; using std::pair; using std::vector; @@ -908,6 +910,17 @@ void untile(int frameID) int main(int argc, char** argv) { + if(argc > 1) + { + if(strcmp(argv[1], "--version") == 0) + { + const char* version = + "YATwm for X\n" + "version 0.0.0"; + cout << version << endl; + return 0; + } + } //Important init stuff mX = mY = 0; dpy = XOpenDisplay(nullptr); -- cgit v1.2.3