swaywm / sway

i3-compatible Wayland compositor
https://swaywm.org
MIT License
14.55k stars 1.11k forks source link

No way to get current bindmode with swaymsg #3941

Open A-Cloud-Ninja opened 5 years ago

A-Cloud-Ninja commented 5 years ago

Currently with swaymsg (unless i'm blind) there is no way of getting the current bindmode without waiting for events

swaymsg -rt get_binding_modes only returns an array of the configured bindmodes.

emersion commented 5 years ago

Does i3 have a way to do this?

A-Cloud-Ninja commented 5 years ago

I'm actually not sure to be honest. I would hinge my bets and say, no, which is why this is more of a feature request than anything in the long run.

emersion commented 5 years ago

Original i3 issue: https://github.com/i3/i3/issues/2711

Would be nice to explain your use-case there.

A-Cloud-Ninja commented 5 years ago

See bars being built like this

They have a bindmode plugin, which currently show nothing in the bindmode until you cue a bindmode event.

It's a quality of life change, not needed but would be nice to have.

emersion commented 5 years ago

But initially there's no binmode right?

A-Cloud-Ninja commented 5 years ago

At initialization of sway, sure, but if the bar restarts while you're in a bindmode, it can't get that to display properly