Block 'keyboard_layout' with driver 'sway' fails with "failed to get current input"
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:
Mysteriously started working again (I had restarted sway and the computer before reporting the issue, so it doesn't seem to just be that).
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.
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.
Having the same bug
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.
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.
You can try https://github.com/greshake/i3status-rust/pull/2167
@bim9262 Can we expect new release with this bug fix soon? Really annoying to install xorg packages for such small thing