Open cyberhuman opened 5 years ago
This one seems to be a bit trickier than it sounds.
Based on a quick look at the protocol definition the "focused"-attribute isn't part of the xdg-output protocol. I will investigate if there's a way to determine indirectly, which one of the monitors is currently active.
A suitable workaround here would be for example a python-wrapper which would get the index (or the name when I get that ticket out of the way) with swaymsg and give it to dmenu-wl as an argument.
Thanks! Yes, I'm currently using a shell wrapper as a work around, but it would be nice to have this functionality out of the box.
FTR to get the index of the currently focused output, I use:
swaymsg -t get_outputs | jq -r 'map(.focused) | index(true)'
To get the name, the command would be:
swaymsg -t get_outputs | jq -r '.[map(.focused) | index(true)].name'
Pass a NULL wl_output when creating the layer surface. Please don't use Sway-specific solutions.
Thanks for the hint, I had completely missed that paragraph of the documentation.
The sway-specific solutions here are wrappers living outside dmenu in sway's configuration file, so I don't see a problem in using them.
Anyways, I'll try out the NULL output, if it works those wrappers are no longer needed.
@nyyManni Did it work to pass a NULL wl_output
?
It does work, but theres currently no closing the program without another tty
Hi! I've been looking for a replacement for dmenu to run under sway, and found your project. But there are a few annoying issues in my setup.
When I invoke
dmenu-wl_run
instead ofdmenu
, it now appears on the first monitor, not on the focused monitor. I think it should appear on the focused output instead.e.g.
I press Alt+F2, and menu appears on DP-1.
Thanks for your work!