Premature optimization that tried to cache monitors but the cache did
not take into account the parameter values.
The call `get_monitors(..., ..., false, true);` would get all connected
and unconncected monitors a subsequent call
`get_monitors(..., ..., true, false);` would get back the same list of
monitors even though it requested only connected monitors.
Additionally `get_monitors` is never called periodically so the
optimization really didn't help much.
* `layout-icon-*` list that maps layouts to icons.
* `indicator-icon-*` list that maps indicators to off and on icons
* `label-indicator-off`
* `label-indicator-on` which replaces the now deprecated `label-indicator`
* `label-indicator-[on|off]-*` for each indicator. Overrides `label-indicator-on` and `label-indicator-off`
Fixes#1558Closes#1048
* add icon support for xkeyboard layouts
* removed unneeded #include
* add sperate %icon% token that can be used in <label-layout>
* removed unneeded #include
* added caps lock indicator (was mentioned in wiki, but not actually implememnted) and support for indicator icons
* a few more fixes to make sure existing user configs are not broken
* ready to go
* Added an option to replace xkb indicator names
* Added labels for each indicator state
* Removed print left on accident
* Fixed review comments
* Update src/modules/xkeyboard.cpp
Co-Authored-By: Gilnaa <gilad@naaman.io>
This adds `monitor-exact = true` in the bar section
This also properly does best-match instead of first-match if multiple
matches exists. For example if there are two monitors HDMI2 and HDMI-2
and we try to match HDMI-2 with monitor-exact = false, until now HDMI2
would be matched. Now exact matches are always preferred.
Fixes#1532