diff options
| author | Vaxry <vaxry@vaxry.net> | 2025-02-18 00:33:27 +0000 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2025-02-18 00:33:36 +0000 |
| commit | e59623d1d564089543cddb496fbed30fbd6ab247 (patch) | |
| tree | a4ba30f7d7a957d6e38ae6edf032051bc2b20e85 /src/debug/HyprCtl.cpp | |
| parent | d01f9943e1d401b09fc53be3c161279ab4f2c5ba (diff) | |
hyprctl: don't return empty str if there are no global shortcuts
fixes #6043
Diffstat (limited to 'src/debug/HyprCtl.cpp')
| -rw-r--r-- | src/debug/HyprCtl.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp index a155474d..174eb932 100644 --- a/src/debug/HyprCtl.cpp +++ b/src/debug/HyprCtl.cpp @@ -811,8 +811,11 @@ static std::string globalShortcutsRequest(eHyprCtlOutputFormat format, std::stri std::string ret = ""; const auto SHORTCUTS = PROTO::globalShortcuts->getAllShortcuts(); if (format == eHyprCtlOutputFormat::FORMAT_NORMAL) { - for (auto const& sh : SHORTCUTS) + for (auto const& sh : SHORTCUTS) { ret += std::format("{}:{} -> {}\n", sh.appid, sh.id, sh.description); + } + if (ret.empty()) + ret = "none"; } else { ret += "["; for (auto const& sh : SHORTCUTS) { |
