river icon indicating copy to clipboard operation
river copied to clipboard

river-status: add keyboard_layout event

Open MaxVerevkin opened this issue 2 years ago • 6 comments

I'm new to zig and server-side wayland, so please let me know if if there are better ways to do certain things.

sway was used as a reference.

  • Simple test client: https://github.com/MaxVerevkin/river-kbd-layout-watcher
  • Status bar integration: https://github.com/MaxVerevkin/i3status-rust/tree/river-kbd

MaxVerevkin avatar Jan 01 '23 20:01 MaxVerevkin

Test client: https://github.com/MaxVerevkin/river-kbd-layout-watcher

MaxVerevkin avatar Jan 01 '23 20:01 MaxVerevkin

Hmm, I guess the event should also contain some kind of input identifier?

MaxVerevkin avatar Jan 02 '23 03:01 MaxVerevkin

Should this event be sent when keyboard is created / destroyed?

MaxVerevkin avatar Jan 02 '23 04:01 MaxVerevkin

An alternative to this can be a separate protocol extension that exposes input information similar to how wl_output/xdg_output describes outputs. Are there any such extensions already (I couldn't find any)? Any opinions on this?

Edit: I suppose this is covered by #71

MaxVerevkin avatar Jan 02 '23 12:01 MaxVerevkin

Edit: I suppose this is covered by https://github.com/riverwm/river/issues/71

I don't think so. My idea was to limit that protocol to devices handled by libinput, because unifying multiple API surfaces into a single protocol seems a bit unreasonable.

Leon-Plickat avatar Jan 02 '23 22:01 Leon-Plickat

Right now the event is sent on binding, ~~on keyboard creation and~~ when layout changes. I think it's better so send it when keyboard is destroyed too. Should I add keyboard_destroyed/removed event or just send keyboard_layout_clear?

MaxVerevkin avatar Jun 11 '23 09:06 MaxVerevkin

I don't think I'm going to accept this feature as part of a river-specific protocol. Other compositors have the exact same issue and it would be better for this to be solved in a compositor-agnostic way if possible.

See for example https://github.com/labwc/labwc/issues/1317

Alternatively, with my plans for a complete window management protocol this information may end up being exposed to the window manager process by river which could then relay it to status bars and the like.

Sorry to keep you hanging on this for so long without a clear decision one way or the other.

ifreund avatar Mar 22 '24 11:03 ifreund

Other compositors have the exact same issue and it would be better for this to be solved in a compositor-agnostic way if possible.

I absolutely agree.

In the mean time, for anyone interested, I will continue maintaining this branch, until a better solution is designed.

MaxVerevkin avatar Mar 22 '24 13:03 MaxVerevkin