From 2cfa5d2408cd3e213aa0c87076ce9ada0dc08e20 Mon Sep 17 00:00:00 2001 From: Aaron Tulino <13600347+aaronjamt@users.noreply.github.com> Date: Fri, 21 Feb 2025 07:20:11 -0700 Subject: hyprctl: Add IPC support for Hyprsunset (#9315) * Add IPC support for Hyprsunset * clang-format * Add documentation --- hyprctl/main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'hyprctl/main.cpp') diff --git a/hyprctl/main.cpp b/hyprctl/main.cpp index ac88f1da..517773d3 100644 --- a/hyprctl/main.cpp +++ b/hyprctl/main.cpp @@ -282,6 +282,10 @@ int requestHyprpaper(std::string arg) { return requestIPC(".hyprpaper.sock", arg); } +int requestHyprsunset(std::string arg) { + return requestIPC(".hyprsunset.sock", arg); +} + void batchRequest(std::string arg, bool json) { std::string commands = arg.substr(arg.find_first_of(' ') + 1); @@ -386,6 +390,8 @@ int main(int argc, char** argv) { if (cmd == "hyprpaper") { std::println("{}", HYPRPAPER_HELP); + } else if (cmd == "hyprsunset") { + std::println("{}", HYPRSUNSET_HELP); } else if (cmd == "notify") { std::println("{}", NOTIFY_HELP); } else if (cmd == "output") { @@ -467,6 +473,8 @@ int main(int argc, char** argv) { batchRequest(fullRequest, json); else if (fullRequest.contains("/hyprpaper")) exitStatus = requestHyprpaper(fullRequest); + else if (fullRequest.contains("/hyprsunset")) + exitStatus = requestHyprsunset(fullRequest); else if (fullRequest.contains("/switchxkblayout")) exitStatus = request(fullRequest, 2); else if (fullRequest.contains("/seterror")) -- cgit v1.2.3