diff --git a/init.el b/init.el index 60b1727..dc1e294 100644 --- a/init.el +++ b/init.el @@ -1300,12 +1300,20 @@ (interactive) (ewm-switch-to-monitor "24B2W1G5"))) - ;;("M-f" . (lambda () - ;; (interactive) - ;; (start-process-shell-command - ;; "wlkbptr-process" - ;; nil - ;; "wl-kbptr -o modes=floating,click -o mode_floating.source=detect")) + ("M-f" . (lambda () + (interactive) + (let ((proc (start-process-shell-command + "wlkbptr-process" + nil + "wl-kbptr-ewm"))) + + ; Absolutely ensures new overlay has focus + (while (not (process-live-p proc)) + (accept-process-output proc 0.1)) + (start-process-shell-command + "wlkbptr-focus-process" + nil + "ydotool mousemove --absolute 0 0 && ydotool click 0xC0")))) ("M-h" . tab-bar-switch-to-prev-tab) ("M-l" . tab-bar-switch-to-next-tab) @@ -1319,6 +1327,7 @@ ("M-j" . windmove-down)) :config (add-to-list 'ewm-intercept-prefixes '("" :fullscreen)) + (add-to-list 'ewm-intercept-prefixes ?\M-f) (add-to-list 'ewm-intercept-prefixes ?\M-d) (add-to-list 'ewm-intercept-prefixes ?\M-w) (add-to-list 'ewm-intercept-prefixes ?\M-o) @@ -1336,6 +1345,7 @@ (advice-add 'delete-window :before-while #'delete-window-override)) (with-eval-after-load 'ewm ;; Autostart + (ewm-autostart-application "ydotoold") (ewm-autostart-application "qpwgraph") (ewm-autostart-application "kdeconnect-indicator") (ewm-autostart-application "udiskie")