fix(workspaces/sway): handle workspaces with quotes
This commit is contained in:
@@ -23,7 +23,7 @@ class Workspaces : public AModule, public sigc::trackable {
|
||||
auto update() -> void override;
|
||||
|
||||
private:
|
||||
static constexpr std::string_view workspace_switch_cmd_ = "workspace {} \"{}\"";
|
||||
static constexpr std::string_view workspace_switch_cmd_ = "workspace {} {}";
|
||||
static constexpr std::string_view persistent_workspace_switch_cmd_ =
|
||||
R"(workspace {} "{}"; move workspace to output "{}"; workspace {} "{}")";
|
||||
|
||||
|
||||
@@ -369,7 +369,7 @@ Gtk::Button &Workspaces::addButton(const Json::Value &node) {
|
||||
node["name"].asString(), node["target_output"].asString(),
|
||||
"--no-auto-back-and-forth", node["name"].asString()));
|
||||
} else {
|
||||
ipc_.sendCmd(IPC_COMMAND, fmt::format("workspace {} \"{}\"",
|
||||
ipc_.sendCmd(IPC_COMMAND, fmt::format(workspace_switch_cmd_,
|
||||
config_["disable-auto-back-and-forth"].asBool()
|
||||
? "--no-auto-back-and-forth"
|
||||
: "",
|
||||
|
||||
Reference in New Issue
Block a user