i3status-rust icon indicating copy to clipboard operation
i3status-rust copied to clipboard

Block 'keyboard_layout' with driver 'sway' fails with "failed to get current input"

Open conceivably opened this issue 11 months ago • 3 comments

i3status-rs 0.33.2 sway version 1.10-dev-0b08dce0 (Jan 13 2025, branch 'master')

keyboard_layout block configuration:

[[block]]
  block = "keyboard_layout"
  driver = "sway"
  format = " $layout "

Expected behavior: Should show "English (US)" Actual behavior: Shows "failed to get current input"

Please let me know if you need more information :) I'm also happy to try to debug further, though I might need some pointers as to where to start.

Thank you for all your work on this program! :heart:

conceivably avatar Jan 14 '25 11:01 conceivably

Mysteriously started working again (I had restarted sway and the computer before reporting the issue, so it doesn't seem to just be that).

conceivably avatar Jan 15 '25 19:01 conceivably

I just got this myself. Similar versions, except sway is 1.10 not dev.

Is there some log we could look at perhaps somehow? Also, consider reopening, because I don't seem to have permission to.

mightyiam avatar Jan 26 '25 07:01 mightyiam

Reopening this since @mightyiam is encountering the issue, and I also encountered the issue again a couple of days ago without updating or making any changes to my configuration.

conceivably avatar Feb 19 '25 21:02 conceivably

Having the same bug

haxfn avatar Mar 22 '25 08:03 haxfn

swaymsg -t get_inputs | jq '.[0].xkb_active_layout_name'

use a custom block with the command above, change the number 0, to one that works for your setup.

haxfn avatar Apr 10 '25 07:04 haxfn

Have just experienced the same bug. Expected: English Actual: failed to get current input (expanded: In block keyboard_layout: failed to get current input. Cause: unknown variant 'enabled_sticky', expected 'enabled' or 'disabled' at line 1 column 1351)

Is there a workaround without using a custom block?

Edit: sway 1.11, i3status-rust 0.33.2. Edit 30 minutes later: this smart bug has got to be kidding me. It's gone.

flatmoll avatar Jun 10 '25 20:06 flatmoll

You can try https://github.com/greshake/i3status-rust/pull/2167

bim9262 avatar Jun 10 '25 22:06 bim9262

@bim9262 Can we expect new release with this bug fix soon? Really annoying to install xorg packages for such small thing

Crandel avatar Jun 15 '25 21:06 Crandel