aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWebFreak001 <gh@webfreak.org>2020-06-12 23:04:51 +0200
committerdec05eba <dec05eba@protonmail.com>2020-06-13 07:21:25 +0200
commitfb6a408d2b6c925790d70ccfcf583398ea2add2b (patch)
tree94b6e5d2b3f8f0e77b31c6b252e8b9d4bf80720d /src
parent3f0258081f97f43195a70d424d578e00532e847b (diff)
trim "window:" from start of window ID
Allows to simply copy-paste the output of `xdotool getmouselocation` when double clicking the window ID without needing to manually remove it from the start. Yes I'm lazy
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 95e5394..dab2156 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -447,6 +447,10 @@ CMainApplication::CMainApplication( int argc, char *argv[] )
fprintf(stderr, "Invalid flag: %s\n", argv[i]);
usage();
} else {
+ if (strncmp(argv[i], "window:", 7) == 0) {
+ printf("window");
+ argv[i] += 7; // "window:".length
+ }
src_window_id = strtol(argv[i], nullptr, 0);
}
}