From 21953ddf3d74b8eb0670a1d293175379e786d13c Mon Sep 17 00:00:00 2001 From: Luke Barkess <57995669+Brumus14@users.noreply.github.com> Date: Mon, 18 Aug 2025 16:41:17 +0100 Subject: hyprctl: add getprop (#11394) --- hyprctl/Strings.hpp | 13 +++++++++++++ hyprctl/main.cpp | 2 ++ 2 files changed, 15 insertions(+) (limited to 'hyprctl') diff --git a/hyprctl/Strings.hpp b/hyprctl/Strings.hpp index f738561e..67e4f992 100644 --- a/hyprctl/Strings.hpp +++ b/hyprctl/Strings.hpp @@ -49,6 +49,7 @@ commands: the same format as in colors in config. Will reset when Hyprland's config is reloaded setprop ... → Sets a window property + getprop ... → Gets a window property splash → Get the current splash switchxkblayout ... → Sets the xkb layout index for a keyboard systeminfo → Get system info @@ -159,6 +160,18 @@ lock: flags: See 'hyprctl --help')#"; +const std::string_view GETPROP_HELP = R"#(usage: hyprctl [flags] getprop + +regex: + Regular expression by which a window will be searched + +property: + See https://wiki.hypr.land/Configuring/Using-hyprctl/#setprop for list + of properties + +flags: + See 'hyprctl --help')#"; + const std::string_view SWITCHXKBLAYOUT_HELP = R"#(usage: [flags] switchxkblayout device: diff --git a/hyprctl/main.cpp b/hyprctl/main.cpp index b15d3e21..e15a17f5 100644 --- a/hyprctl/main.cpp +++ b/hyprctl/main.cpp @@ -427,6 +427,8 @@ int main(int argc, char** argv) { std::println("{}", PLUGIN_HELP); } else if (cmd == "setprop") { std::println("{}", SETPROP_HELP); + } else if (cmd == "getprop") { + std::println("{}", GETPROP_HELP); } else if (cmd == "switchxkblayout") { std::println("{}", SWITCHXKBLAYOUT_HELP); } else { -- cgit v1.2.3