feat(bspwm): Add workspace separator (#942)
Same as the i3 workspace separator
This commit is contained in:
parent
e3c44983ce
commit
a7eb7b3576
@ -118,6 +118,9 @@ label-empty = %index%
|
|||||||
label-empty-foreground = ${colors.foreground-alt}
|
label-empty-foreground = ${colors.foreground-alt}
|
||||||
label-empty-padding = 2
|
label-empty-padding = 2
|
||||||
|
|
||||||
|
; Separator in between workspaces
|
||||||
|
; label-separator = |
|
||||||
|
|
||||||
[module/i3]
|
[module/i3]
|
||||||
type = internal/i3
|
type = internal/i3
|
||||||
format = <label-state> <label-mode>
|
format = <label-state> <label-mode>
|
||||||
|
@ -75,6 +75,11 @@ namespace modules {
|
|||||||
label_t m_monitorlabel;
|
label_t m_monitorlabel;
|
||||||
iconset_t m_icons;
|
iconset_t m_icons;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Separator that is inserted in between workspaces
|
||||||
|
*/
|
||||||
|
label_t m_labelseparator;
|
||||||
|
|
||||||
bool m_click{true};
|
bool m_click{true};
|
||||||
bool m_scroll{true};
|
bool m_scroll{true};
|
||||||
bool m_revscroll{true};
|
bool m_revscroll{true};
|
||||||
|
@ -124,6 +124,8 @@ namespace modules {
|
|||||||
m_modelabels.emplace(mode::NODE_PRIVATE, load_optional_label(m_conf, name(), "label-private"));
|
m_modelabels.emplace(mode::NODE_PRIVATE, load_optional_label(m_conf, name(), "label-private"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_labelseparator = load_optional_label(m_conf, name(), "label-separator", "");
|
||||||
|
|
||||||
m_icons = factory_util::shared<iconset>();
|
m_icons = factory_util::shared<iconset>();
|
||||||
m_icons->add(DEFAULT_ICON, factory_util::shared<label>(m_conf.get(name(), DEFAULT_ICON, ""s)));
|
m_icons->add(DEFAULT_ICON, factory_util::shared<label>(m_conf.get(name(), DEFAULT_ICON, ""s)));
|
||||||
|
|
||||||
@ -400,6 +402,10 @@ namespace modules {
|
|||||||
|
|
||||||
for (auto&& ws : m_monitors[m_index]->workspaces) {
|
for (auto&& ws : m_monitors[m_index]->workspaces) {
|
||||||
if (ws.second.get()) {
|
if (ws.second.get()) {
|
||||||
|
if(workspace_n != 0 && *m_labelseparator) {
|
||||||
|
builder->node(m_labelseparator);
|
||||||
|
}
|
||||||
|
|
||||||
workspace_n++;
|
workspace_n++;
|
||||||
|
|
||||||
if (m_click) {
|
if (m_click) {
|
||||||
|
Loading…
Reference in New Issue
Block a user