mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-07-31 20:21:54 -07:00
Add activeworkspace
hyprctl command (#2202)
* Add `activeworkspace` hyprctl command * fix format in hyprctl * Make stuff more shared in workspace hyprctl --------- Co-authored-by: vaxerski <43317083+vaxerski@users.noreply.github.com>
This commit is contained in:
@@ -23,6 +23,7 @@ const std::string USAGE = R"#(usage: hyprctl [(opt)flags] [command] [(opt)args]
|
||||
commands:
|
||||
monitors
|
||||
workspaces
|
||||
activeworkspace
|
||||
clients
|
||||
activewindow
|
||||
layers
|
||||
@@ -50,7 +51,9 @@ flags:
|
||||
--batch -> execute a batch of commands, separated by ';'
|
||||
)#";
|
||||
|
||||
void request(std::string arg, int minArgs = 0) {
|
||||
#define PAD
|
||||
|
||||
void request(std::string arg, int minArgs = 0) {
|
||||
const auto SERVERSOCKET = socket(AF_UNIX, SOCK_STREAM, 0);
|
||||
|
||||
const auto ARGS = std::count(arg.begin(), arg.end(), ' ');
|
||||
@@ -327,6 +330,8 @@ int main(int argc, char** argv) {
|
||||
request(fullRequest);
|
||||
else if (fullRequest.contains("/workspaces"))
|
||||
request(fullRequest);
|
||||
else if (fullRequest.contains("/activeworkspace"))
|
||||
request(fullRequest);
|
||||
else if (fullRequest.contains("/activewindow"))
|
||||
request(fullRequest);
|
||||
else if (fullRequest.contains("/layers"))
|
||||
|
Reference in New Issue
Block a user