summaryrefslogtreecommitdiff
path: root/src/debug/HyprCtl.cpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2024-11-18 23:53:38 +0000
committerVaxry <vaxry@vaxry.net>2024-11-18 23:53:38 +0000
commit47a1650c4810ad3cb3e9f125cb0addf18aa7395c (patch)
treefb95e7a329dd2fe25e585cc9f71ef2face932508 /src/debug/HyprCtl.cpp
parent936dfedbadbae761cd307ba7509467b55ac5e1ae (diff)
miscfunctions: move configStringToInt to std::expected
Diffstat (limited to 'src/debug/HyprCtl.cpp')
-rw-r--r--src/debug/HyprCtl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp
index 1b94296f..4d3c2be4 100644
--- a/src/debug/HyprCtl.cpp
+++ b/src/debug/HyprCtl.cpp
@@ -1286,7 +1286,7 @@ std::string dispatchSeterror(eHyprCtlOutputFormat format, std::string request) {
return "ok";
}
- const CColor COLOR = configStringToInt(vars[1]);
+ const CColor COLOR = configStringToInt(vars[1]).value_or(0);
for (size_t i = 2; i < vars.size(); ++i)
errorMessage += vars[i] + ' ';
@@ -1539,7 +1539,7 @@ std::string dispatchNotify(eHyprCtlOutputFormat format, std::string request) {
time = std::stoi(TIME);
} catch (std::exception& e) { return "invalid arg 2"; }
- CColor color = configStringToInt(vars[3]);
+ CColor color = configStringToInt(vars[3]).value_or(0);
size_t msgidx = 4;
float fontsize = 13.f;