[GH-ISSUE #575] Language/keyboard layout module #2998

Closed
opened 2026-05-22 23:53:08 +01:00 by JakeStanger · 7 comments
Owner

Originally created by @madfanat on GitHub (May 8, 2024).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/575

Request
It would be great to have a built-in module similar to Waybar’s "sway/language" or "hyprland/language".

Originally created by @madfanat on GitHub (May 8, 2024). Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/575 **Request** It would be great to have a built-in module similar to Waybar’s "sway/language" or "hyprland/language".
Author
Owner

@JakeStanger commented on GitHub (May 9, 2024):

Could you expand on the request please, as I don't have the context on what Waybar's module does, or what you potentially want this one to do differently?

<!-- gh-comment-id:2103003726 --> @JakeStanger commented on GitHub (May 9, 2024): Could you expand on the request please, as I don't have the context on what Waybar's module does, or what you potentially want this one to do differently?
Author
Owner

@madfanat commented on GitHub (May 9, 2024):

Well, shortly, the main feature of both these modules is the display of the current keyboard layout/language (qwerty, dvorak, ENG, RUS, etc whatever you want). Also, it’s nice to have a popup box with these settings.

<!-- gh-comment-id:2103135516 --> @madfanat commented on GitHub (May 9, 2024): Well, shortly, the main feature of both these modules is the display of the current keyboard layout/language (qwerty, dvorak, ENG, RUS, etc whatever you want). Also, it’s nice to have a popup box with these settings.
Author
Owner

@yavko commented on GitHub (May 9, 2024):

Well, shortly, the main feature of both these modules is the display of the current keyboard layout/language (qwerty, dvorak, ENG, RUS, etc whatever you want). Also, it’s nice to have a popup box with these settings.

For hyprland I think the layoutchanged event in hyprland-rs can be used, but I'm not totally sure

<!-- gh-comment-id:2103346631 --> @yavko commented on GitHub (May 9, 2024): > Well, shortly, the main feature of both these modules is the display of the current keyboard layout/language (qwerty, dvorak, ENG, RUS, etc whatever you want). Also, it’s nice to have a popup box with these settings. For hyprland I think the layoutchanged event in hyprland-rs can be used, but I'm not totally sure
Author
Owner

@JakeStanger commented on GitHub (May 9, 2024):

Is there any standardised protocol/service this should be using, or is it down to the compositor to expose over its IPC?

<!-- gh-comment-id:2103369235 --> @JakeStanger commented on GitHub (May 9, 2024): Is there any standardised protocol/service this should be using, or is it down to the compositor to expose over its IPC?
Author
Owner

@yavko commented on GitHub (May 9, 2024):

I'm pretty sure it's compositor specific

<!-- gh-comment-id:2103379855 --> @yavko commented on GitHub (May 9, 2024): I'm pretty sure it's compositor specific
Author
Owner

@bluebyt commented on GitHub (Jun 1, 2024):

I tried to do a script for Ironbar to do that, I can change the current layout with this command:

hyprctl switchxkblayout logitech-craft next

But I cannot get the current layout like explained in this tread:
https://github.com/hyprwm/Hyprland/discussions/2616

<!-- gh-comment-id:2143441654 --> @bluebyt commented on GitHub (Jun 1, 2024): I tried to do a script for Ironbar to do that, I can change the current layout with this command: ``` hyprctl switchxkblayout logitech-craft next ``` But I cannot get the current layout like explained in this tread: https://github.com/hyprwm/Hyprland/discussions/2616
Author
Owner

@quietvoid commented on GitHub (Nov 24, 2024):

I'm using a script module for this in Sway but it doesn't seem possible for the layout to update automatically without having to set a low interval.

Looks something like this

$keyboard_layout = {
    type = "script"
    name = "sway_keyboard"
    class = "sway-keyboard"

    cmd = "swaymsg -t get_inputs | jq -r 'map(select(has(\"xkb_active_layout_name\")))[0].xkb_active_layout_name'"
    mode = "poll"
    interval = 2000
}
<!-- gh-comment-id:2496195946 --> @quietvoid commented on GitHub (Nov 24, 2024): I'm using a `script` module for this in Sway but it doesn't seem possible for the layout to update automatically without having to set a low interval. Looks something like this ``` $keyboard_layout = { type = "script" name = "sway_keyboard" class = "sway-keyboard" cmd = "swaymsg -t get_inputs | jq -r 'map(select(has(\"xkb_active_layout_name\")))[0].xkb_active_layout_name'" mode = "poll" interval = 2000 } ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
JakeStanger/ironbar#2998
No description provided.