Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keyboard_layout: Add format argument #593

Merged
merged 1 commit into from
Apr 22, 2020
Merged

keyboard_layout: Add format argument #593

merged 1 commit into from
Apr 22, 2020

Conversation

thiagokokada
Copy link
Contributor

@thiagokokada thiagokokada commented Apr 12, 2020

This PR add format argument to keyboard_layout block. For now, it only supports {layout} placeholder.

The reason for this addition is that I want to add an icon to my keyboard block, something like this:

[[block]]
block = "keyboard_layout"
driver = "localebus"
interval = 5
format = "ο„œ {layout}"

I could have also added an icon to the keyboard block, however I prefer this approach since it is more flexible, and allow in the future support for more information in keyboard_layout block (like keyboard variants).

This is my first code in Rust so if there is any issues, please report it and I will try to fix it πŸ‘ .

@thiagokokada thiagokokada changed the title Add format argument to keyboard_layout block keyboard_layout: Add format argument Apr 12, 2020
@ammgws ammgws merged commit 035fd4d into greshake:master Apr 22, 2020
@ammgws
Copy link
Collaborator

ammgws commented Apr 22, 2020

Works for me and could possibly be expanded in the future.

Thanks!

@thiagokokada thiagokokada deleted the add-format-support-to-keyboard-layout branch April 22, 2020 12:43
@atheriel
Copy link
Collaborator

This should be added to the documentation as well.

@atheriel atheriel added configuration Changes to or issues with configuration files enhancement labels Apr 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
configuration Changes to or issues with configuration files enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants