Option to hide non-visible special workspaces
parent
c0d3b6f0ab
commit
f3896c00c4
|
@ -127,6 +127,7 @@ class Workspaces : public AModule, public EventHandler {
|
||||||
auto allOutputs() const -> bool { return m_allOutputs; }
|
auto allOutputs() const -> bool { return m_allOutputs; }
|
||||||
auto showSpecial() const -> bool { return m_showSpecial; }
|
auto showSpecial() const -> bool { return m_showSpecial; }
|
||||||
auto activeOnly() const -> bool { return m_activeOnly; }
|
auto activeOnly() const -> bool { return m_activeOnly; }
|
||||||
|
auto specialVisibleOnly() const -> bool { return m_specialVisibleOnly; }
|
||||||
auto moveToMonitor() const -> bool { return m_moveToMonitor; }
|
auto moveToMonitor() const -> bool { return m_moveToMonitor; }
|
||||||
|
|
||||||
auto getBarOutput() const -> std::string { return m_bar.output->name; }
|
auto getBarOutput() const -> std::string { return m_bar.output->name; }
|
||||||
|
@ -184,6 +185,7 @@ class Workspaces : public AModule, public EventHandler {
|
||||||
bool m_allOutputs = false;
|
bool m_allOutputs = false;
|
||||||
bool m_showSpecial = false;
|
bool m_showSpecial = false;
|
||||||
bool m_activeOnly = false;
|
bool m_activeOnly = false;
|
||||||
|
bool m_specialVisibleOnly = false;
|
||||||
bool m_moveToMonitor = false;
|
bool m_moveToMonitor = false;
|
||||||
Json::Value m_persistentWorkspaceConfig;
|
Json::Value m_persistentWorkspaceConfig;
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,11 @@ Addressed by *hyprland/workspaces*
|
||||||
default: false ++
|
default: false ++
|
||||||
If set to true, special workspaces will be shown.
|
If set to true, special workspaces will be shown.
|
||||||
|
|
||||||
|
*special-visible-only*: ++
|
||||||
|
typeof: bool ++
|
||||||
|
default: false ++
|
||||||
|
If this and show-special are to true, special workspaces will be shown only if visible.
|
||||||
|
|
||||||
*all-outputs*: ++
|
*all-outputs*: ++
|
||||||
typeof: bool ++
|
typeof: bool ++
|
||||||
default: false ++
|
default: false ++
|
||||||
|
|
|
@ -78,6 +78,11 @@ auto Workspaces::parseConfig(const Json::Value &config) -> void {
|
||||||
m_showSpecial = configShowSpecial.asBool();
|
m_showSpecial = configShowSpecial.asBool();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto configSpecialVisibleOnly = config_["special-visible-only"];
|
||||||
|
if (configShowSpecial.isBool()) {
|
||||||
|
m_specialVisibleOnly = configShowSpecial.asBool();
|
||||||
|
}
|
||||||
|
|
||||||
auto configActiveOnly = config_["active-only"];
|
auto configActiveOnly = config_["active-only"];
|
||||||
if (configActiveOnly.isBool()) {
|
if (configActiveOnly.isBool()) {
|
||||||
m_activeOnly = configActiveOnly.asBool();
|
m_activeOnly = configActiveOnly.asBool();
|
||||||
|
@ -886,6 +891,13 @@ void Workspace::update(const std::string &format, const std::string &icon) {
|
||||||
m_button.hide();
|
m_button.hide();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (this->isSpecial() && \
|
||||||
|
this->m_workspaceManager.specialVisibleOnly() && \
|
||||||
|
!this->isVisible()) {
|
||||||
|
m_button.hide();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
m_button.show();
|
m_button.show();
|
||||||
|
|
||||||
auto styleContext = m_button.get_style_context();
|
auto styleContext = m_button.get_style_context();
|
||||||
|
|
Loading…
Reference in New Issue