mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-05-19 08:30:22 -07:00
hyprctl: don't return empty str if there are no global shortcuts
fixes #6043
This commit is contained in:
parent
d01f9943e1
commit
e59623d1d5
@ -811,8 +811,11 @@ static std::string globalShortcutsRequest(eHyprCtlOutputFormat format, std::stri
|
|||||||
std::string ret = "";
|
std::string ret = "";
|
||||||
const auto SHORTCUTS = PROTO::globalShortcuts->getAllShortcuts();
|
const auto SHORTCUTS = PROTO::globalShortcuts->getAllShortcuts();
|
||||||
if (format == eHyprCtlOutputFormat::FORMAT_NORMAL) {
|
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);
|
ret += std::format("{}:{} -> {}\n", sh.appid, sh.id, sh.description);
|
||||||
|
}
|
||||||
|
if (ret.empty())
|
||||||
|
ret = "none";
|
||||||
} else {
|
} else {
|
||||||
ret += "[";
|
ret += "[";
|
||||||
for (auto const& sh : SHORTCUTS) {
|
for (auto const& sh : SHORTCUTS) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user