[PR #1004] [CLOSED] feat(keyboard): implement labels with icons #1087

Closed
opened 2026-05-22 21:55:32 +01:00 by JakeStanger · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/JakeStanger/ironbar/pull/1004
Author: @tobias47n9e
Created: 5/25/2025
Status: Closed

Base: masterHead: feat/keyboard-indicator-labels


📝 Commits (1)

  • 0c4b05c feat(keyboard): implement labels with icons

📊 Changes

1 file changed (+65 additions, -1 deletions)

View changed files

📝 src/modules/keyboard.rs (+65 -1)

📄 Description

I would like to build a purely text-based layout in the bar and was unable to configure the keyboard indicators to just use a format string similar to some of the other widgets that I have tried. I put a patch together, but it makes the code and config a bit repetitive (see caps-lock config below).

Would a patch like this be acceptable? I could put in some more time to clean it up. Or would it be better to split the keyboard indicators into 3 widgets (caps-lock, num-lock and layout)?

sway_screenshot

sway_screenshot_2

[[end]]
type = "keyboard"
show_caps = false
show_caps_icon = true
show_caps_format = true
show_layout = false
caps_format = "<span color='#0091e5'>CPS LCK\n[</span>{caps_icon}<span color='#0091e5'>]</span>"

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/JakeStanger/ironbar/pull/1004 **Author:** [@tobias47n9e](https://github.com/tobias47n9e) **Created:** 5/25/2025 **Status:** ❌ Closed **Base:** `master` ← **Head:** `feat/keyboard-indicator-labels` --- ### 📝 Commits (1) - [`0c4b05c`](https://github.com/JakeStanger/ironbar/commit/0c4b05c5c93476a675623669c9c58120d52d5979) feat(keyboard): implement labels with icons ### 📊 Changes **1 file changed** (+65 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/modules/keyboard.rs` (+65 -1) </details> ### 📄 Description I would like to build a purely text-based layout in the bar and was unable to configure the keyboard indicators to just use a `format` string similar to some of the other widgets that I have tried. I put a patch together, but it makes the code and config a bit repetitive (see caps-lock config below). Would a patch like this be acceptable? I could put in some more time to clean it up. Or would it be better to split the keyboard indicators into 3 widgets (caps-lock, num-lock and layout)? ![sway_screenshot](https://github.com/user-attachments/assets/9a4454aa-0fed-4cc1-b0c1-c80117a5440f) ![sway_screenshot_2](https://github.com/user-attachments/assets/cc7ad4be-f9c1-4f07-8155-6891e8797d20) ```toml [[end]] type = "keyboard" show_caps = false show_caps_icon = true show_caps_format = true show_layout = false caps_format = "<span color='#0091e5'>CPS LCK\n[</span>{caps_icon}<span color='#0091e5'>]</span>" ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
JakeStanger 2026-05-22 21:55:32 +01:00
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#1087
No description provided.