From 60503734ac7db2f5c1f52dfbb4ee87697629a830 Mon Sep 17 00:00:00 2001 From: Michael Carlberg Date: Mon, 5 Dec 2016 13:21:28 +0100 Subject: [PATCH] fix(bspwm): Send monitor local focus commands --- src/modules/bspwm.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/modules/bspwm.cpp b/src/modules/bspwm.cpp index 6e1ea8d4..54036ba1 100644 --- a/src/modules/bspwm.cpp +++ b/src/modules/bspwm.cpp @@ -437,6 +437,12 @@ namespace modules { } }; + string modifier; + + if (m_pinworkspaces) { + modifier = ".local"; + } + if (cmd.compare(0, strlen(EVENT_CLICK), EVENT_CLICK) == 0) { cmd.erase(0, strlen(EVENT_CLICK)); @@ -451,9 +457,9 @@ namespace modules { m_log.err("%s: Invalid monitor index in command: %s", name(), cmd); } } else if (cmd.compare(0, strlen(EVENT_SCROLL_UP), EVENT_SCROLL_UP) == 0) { - send_command("desktop -f next", "Sending desktop next command to ipc handler"); + send_command("desktop -f next" + modifier, "Sending desktop next command to ipc handler"); } else if (cmd.compare(0, strlen(EVENT_SCROLL_DOWN), EVENT_SCROLL_DOWN) == 0) { - send_command("desktop -f prev", "Sending desktop prev command to ipc handler"); + send_command("desktop -f prev" + modifier, "Sending desktop prev command to ipc handler"); } return true;