Merge pull request #4127 from iostapyshyn/master
niri/workspaces: Add empty icon
This commit is contained in:
@ -70,6 +70,7 @@ Additional to workspace name matching, the following *format-icons* can be set.
|
|||||||
- *default*: Will be shown, when no string matches are found.
|
- *default*: Will be shown, when no string matches are found.
|
||||||
- *focused*: Will be shown, when workspace is focused.
|
- *focused*: Will be shown, when workspace is focused.
|
||||||
- *active*: Will be shown, when workspace is active on its output.
|
- *active*: Will be shown, when workspace is active on its output.
|
||||||
|
- *empty*: Will be shown, when workspace is empty.
|
||||||
|
|
||||||
# EXAMPLES
|
# EXAMPLES
|
||||||
|
|
||||||
|
@ -166,6 +166,8 @@ std::string Workspaces::getIcon(const std::string &value, const Json::Value &ws)
|
|||||||
const auto &icons = config_["format-icons"];
|
const auto &icons = config_["format-icons"];
|
||||||
if (!icons) return value;
|
if (!icons) return value;
|
||||||
|
|
||||||
|
if (ws["active_window_id"].isNull() && icons["empty"]) return icons["empty"].asString();
|
||||||
|
|
||||||
if (ws["is_focused"].asBool() && icons["focused"]) return icons["focused"].asString();
|
if (ws["is_focused"].asBool() && icons["focused"]) return icons["focused"].asString();
|
||||||
|
|
||||||
if (ws["is_active"].asBool() && icons["active"]) return icons["active"].asString();
|
if (ws["is_active"].asBool() && icons["active"]) return icons["active"].asString();
|
||||||
|
Reference in New Issue
Block a user