diff --git a/man/waybar-sway-workspaces.5.scd b/man/waybar-sway-workspaces.5.scd index 39c8daed..fe38d238 100644 --- a/man/waybar-sway-workspaces.5.scd +++ b/man/waybar-sway-workspaces.5.scd @@ -76,15 +76,15 @@ Additional to workspace name matching, the following *format-icons* can be set. - *urgent*: Will be shown, when workspace is flagged as urgent - *focused*: Will be shown, when workspace is focused -# PERSISTANT WORKSPACES +# PERSISTENT WORKSPACES -Each entry of *persistant_workspace* names a workspace that should always be shown. +Each entry of *persistent_workspace* names a workspace that should always be shown. Associated with that value is a list of outputs indicating *where* the workspace should be shown, an empty list denoting all outputs. ``` "sway/workspaces": { - "persistant_workspaces": { + "persistent_workspaces": { "3": [], // Always show a workspace with name '3', on all outputs if it does not exists "4": ["eDP-1"], // Always show a workspace with name '4', on output 'eDP-1' if it does not exists "5": ["eDP-1", "DP-2"] // Always show a workspace with name '5', on outputs 'eDP-1' and 'DP-2' if it does not exists @@ -120,4 +120,4 @@ n.b.: the list of outputs can be obtained from command line using *swaymsg -t ge - *#workspaces button.visible* - *#workspaces button.focused* - *#workspaces button.urgent* -- *#workspaces button.persistant* +- *#workspaces button.persistent* diff --git a/src/modules/sway/workspaces.cpp b/src/modules/sway/workspaces.cpp index 27d30a94..23cf0cea 100644 --- a/src/modules/sway/workspaces.cpp +++ b/src/modules/sway/workspaces.cpp @@ -49,9 +49,9 @@ void Workspaces::onCmd(const struct Ipc::ipc_response &res) { : true; }); - // adding persistant workspaces (as per the config file) - if (config_["persistant_workspaces"].isObject()) { - const Json::Value & p_workspaces = config_["persistant_workspaces"]; + // adding persistent workspaces (as per the config file) + if (config_["persistent_workspaces"].isObject()) { + const Json::Value & p_workspaces = config_["persistent_workspaces"]; const std::vector p_workspaces_names = p_workspaces.getMemberNames(); for (const std::string &p_w_name : p_workspaces_names) { @@ -151,9 +151,9 @@ auto Workspaces::update() -> void { button.get_style_context()->remove_class("urgent"); } if ((*it)["target_output"].isString()) { - button.get_style_context()->add_class("persistant"); + button.get_style_context()->add_class("persistent"); } else { - button.get_style_context()->remove_class("persistant"); + button.get_style_context()->remove_class("persistent"); } if (needReorder) { box_.reorder_child(button, it - workspaces_.begin());