refactor(i3): Remove wsname-maxlen
This commit is contained in:
parent
0ed173b96e
commit
3a6ca90fcb
@ -71,7 +71,6 @@ namespace modules {
|
|||||||
bool m_indexsort{false};
|
bool m_indexsort{false};
|
||||||
bool m_pinworkspaces{false};
|
bool m_pinworkspaces{false};
|
||||||
bool m_strip_wsnumbers{false};
|
bool m_strip_wsnumbers{false};
|
||||||
size_t m_wsname_maxlen{0};
|
|
||||||
|
|
||||||
unique_ptr<i3_util::connection_t> m_ipc;
|
unique_ptr<i3_util::connection_t> m_ipc;
|
||||||
};
|
};
|
||||||
|
@ -34,7 +34,8 @@ namespace modules {
|
|||||||
GET_CONFIG_VALUE(name(), m_indexsort, "index-sort");
|
GET_CONFIG_VALUE(name(), m_indexsort, "index-sort");
|
||||||
GET_CONFIG_VALUE(name(), m_pinworkspaces, "pin-workspaces");
|
GET_CONFIG_VALUE(name(), m_pinworkspaces, "pin-workspaces");
|
||||||
GET_CONFIG_VALUE(name(), m_strip_wsnumbers, "strip-wsnumbers");
|
GET_CONFIG_VALUE(name(), m_strip_wsnumbers, "strip-wsnumbers");
|
||||||
GET_CONFIG_VALUE(name(), m_wsname_maxlen, "wsname-maxlen");
|
|
||||||
|
m_conf.warn_deprecated(name(), "wsname-maxlen", "%name:min:max%");
|
||||||
|
|
||||||
// Add formats and create components
|
// Add formats and create components
|
||||||
m_formatter->add(DEFAULT_FORMAT, DEFAULT_TAGS, {TAG_LABEL_STATE, TAG_LABEL_MODE});
|
m_formatter->add(DEFAULT_FORMAT, DEFAULT_TAGS, {TAG_LABEL_STATE, TAG_LABEL_MODE});
|
||||||
@ -142,11 +143,6 @@ namespace modules {
|
|||||||
// Trim leading and trailing whitespace
|
// Trim leading and trailing whitespace
|
||||||
ws_name = string_util::trim(ws_name, ' ');
|
ws_name = string_util::trim(ws_name, ' ');
|
||||||
|
|
||||||
// Cap at configured max length
|
|
||||||
if (m_wsname_maxlen > 0 && ws_name.length() > m_wsname_maxlen) {
|
|
||||||
ws_name.erase(m_wsname_maxlen);
|
|
||||||
}
|
|
||||||
|
|
||||||
auto icon = m_icons->get(ws->name, DEFAULT_WS_ICON);
|
auto icon = m_icons->get(ws->name, DEFAULT_WS_ICON);
|
||||||
auto label = m_statelabels.find(ws_state)->second->clone();
|
auto label = m_statelabels.find(ws_state)->second->clone();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user