Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bspwm] [Dual monitor] cannot get terminal focus in another monitor #356

Open
K1ngst0m opened this issue May 13, 2022 · 4 comments
Open

Comments

@K1ngst0m
Copy link

when wm get focused on A monitor's window, I want to toggle the popup terminal by tdrop in B monitor:

tdrop -a -w 1100 -h 550 -x 800 -y 520 kitty

but it will not automatically get focused on the popup terminal, but when focusing on the B monitor's window, its popup terminal will get focused successfully.
and I already disabled mouse hover focus by

bspc config pointer_follows_focus false

output

@noctuid
Copy link
Owner

noctuid commented May 13, 2022

Do I understand correctly?

  • You have a tdrop command you want to show a dropdown always on the left monitor
  • You want to be able to use the dropdown on the right monitor, but it does not focus

This sounds like an issue with bspwm or your configuration not with tdrop.

bspc config pointer_follows_focus false

That's the wrong option to set. I think you want to use bspc config focus_follows_pointer false instead (not sure what it is by default). Let me know if that fixes it.

Tdrop runs xdotool's windowactivate command. If it doesn't work with focus_follows_pointer disabled, there is nothing more tdrop can do. You can also try this but it probably won't help:

tdrop -a -w 1100 -h 550 -x 800 -y 520 --post-map-hook 'xdotool windowfocus $wid' kitty

@K1ngst0m
Copy link
Author

thanks for your help.

This sounds like an issue with bspwm or your configuration not with tdrop.

bspc config pointer_follows_focus false

sorry I pasted the wrong command😅, I have bspc config focus_follows_pointer false in my bspwm config file.

If it doesn't work with focus_follows_pointer disabled, there is nothing more tdrop can do.

so I wonder why it won't work on the dual monitors? I used the tilda before, and it works well when doing the "focused" job, Are there any suggestions that I can fix this even by editing the tdrop source code? I really enjoy one terminal only in the system that I can focus on one configuration.

@noctuid
Copy link
Owner

noctuid commented May 13, 2022

so I wonder why it won't work on the dual monitors? I used the tilda before, and it works well when doing the "focused" job, Are there any suggestions that I can fix this even by editing the tdrop source code? I really enjoy one terminal only in the system that I can focus on one configuration.

I'm not sure how bspwm handles monitor focus. It sounds like it doesn't let you focus a window on another monitor. You can try these:

  1. Try the alternate command I posted before and let me know what happens
  2. Alternately, you can instead try changing tdrop line 457 to use windowfocus instead of windowactivate
  3. If you are okay with the dropdown always being shown on the focused monitor, adding the -m flag should work

@K1ngst0m
Copy link
Author

tdrop -a -w 1100 -h 550 -x 800 -y 520 --post-map-hook 'xdotool windowfocus $wid' kitty

unfortunately, the result just worked the same as my first try.

when wm get focused on A monitor's window, I want to toggle the popup terminal by tdrop in B monitor:

I find out that the "focused" problem also happened when only my cursor moved to another monitor. and once tdrop receives the '-m' option, the problem is just gone. but "moving with focusing window's monitor" is not what I want, too. so currently it's a tradeoff.

thanks for the help really, and I will figure out how bspwm handles focus later and attempt to fix this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants