From fb6a408d2b6c925790d70ccfcf583398ea2add2b Mon Sep 17 00:00:00 2001 From: WebFreak001 Date: Fri, 12 Jun 2020 23:04:51 +0200 Subject: 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 --- src/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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); } } -- cgit v1.2.3