mirror of
https://github.com/polybar/polybar.git
synced 2026-03-01 05:19:54 +00:00
committed by
Patrick Ziegler
parent
ae7686d24b
commit
59a581a39e
@ -61,11 +61,16 @@ namespace modules {
|
||||
m_icons = std::make_shared<iconset>();
|
||||
m_icons->add(DEFAULT_WS_ICON, std::make_shared<label>(m_conf.get(name(), DEFAULT_WS_ICON, ""s)));
|
||||
|
||||
int i = 0;
|
||||
for (const auto& workspace : m_conf.get_list<string>(name(), "ws-icon", {})) {
|
||||
auto vec = string_util::tokenize(workspace, ';');
|
||||
if (vec.size() == 2) {
|
||||
m_icons->add(vec[0], std::make_shared<label>(vec[1]));
|
||||
} else {
|
||||
m_log.err("%s: Ignoring ws-icon-%d because it has %s semicolons", name(), i, vec.size() > 2? "too many" : "too few");
|
||||
}
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user