From b135bd6cd4c27a9fd94dfa084e75188463c2eb3b Mon Sep 17 00:00:00 2001 From: Brenno Lemos Date: Sun, 22 Oct 2023 19:11:03 -0300 Subject: workspacerules: Add new optional "default command" for auto-launching apps on new workspaces (#3559) --- src/helpers/VarList.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/helpers/VarList.hpp') diff --git a/src/helpers/VarList.hpp b/src/helpers/VarList.hpp index 60e9a551..8f33f166 100644 --- a/src/helpers/VarList.hpp +++ b/src/helpers/VarList.hpp @@ -1,4 +1,5 @@ #pragma once +#include #include #include #include "../macros.hpp" @@ -20,6 +21,15 @@ class CVarList { std::string join(const std::string& joiner, size_t from = 0, size_t to = 0) const; + void map(std::function func) { + for (auto& s : m_vArgs) + func(s); + } + + void append(const std::string arg) { + m_vArgs.emplace_back(arg); + } + std::string operator[](const size_t& idx) const { if (idx >= m_vArgs.size()) return ""; -- cgit v1.2.3