summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBossCode45 <human.cyborg42@gmail.com>2023-02-13 17:40:27 +1300
committerBossCode45 <human.cyborg42@gmail.com>2023-02-13 17:40:27 +1300
commit4a67d9e1118d22c2b726c0c2edda669c408403a5 (patch)
tree3341bfbe61b80abb8d87c373161fa88fa84acd20
parent59c5fa867eb94699e155520f77f69c7841e1418e (diff)
downloadYATwm-4a67d9e1118d22c2b726c0c2edda669c408403a5.tar.gz
YATwm-4a67d9e1118d22c2b726c0c2edda669c408403a5.zip
Added --version
-rw-r--r--main.cpp13
1 files changed, 13 insertions, 0 deletions
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);