mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
Add option to rewrite sway/window title
Rewrites window title according to config option "rewrite". "rewrite" is an object where keys are regular expressions and values are rewrite rules if the expression matches. Rules may contain references to captures of the expression. Regex and replacement follow ECMA-script rules. If no regex matches, the title is left unchanged. example: "sway/window": { "rewrite": { "(.*) - Mozilla Firefox": " $1", "(.*) - zsh": " $1", } }
This commit is contained in:
@ -22,6 +22,7 @@ class Window : public ALabel, public sigc::trackable {
|
||||
std::tuple<std::size_t, int, std::string, std::string> getFocusedNode(const Json::Value& nodes,
|
||||
std::string& output);
|
||||
void getTree();
|
||||
std::string rewriteTitle(const std::string& title);
|
||||
|
||||
const Bar& bar_;
|
||||
std::string window_;
|
||||
|
Reference in New Issue
Block a user