diff options
author | WebFreak001 <gh@webfreak.org> | 2020-06-12 23:04:51 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-06-13 07:21:25 +0200 |
commit | fb6a408d2b6c925790d70ccfcf583398ea2add2b (patch) | |
tree | 94b6e5d2b3f8f0e77b31c6b252e8b9d4bf80720d | |
parent | 3f0258081f97f43195a70d424d578e00532e847b (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
-rw-r--r-- | src/main.cpp | 4 |
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); } } |