Added hyprctl setcursor
This commit is contained in:
parent
f64f94ca56
commit
9b39a0c2e0
3 changed files with 67 additions and 0 deletions
|
|
@ -34,6 +34,7 @@ commands:
|
|||
splash
|
||||
hyprpaper
|
||||
reload
|
||||
setcursor
|
||||
|
||||
flags:
|
||||
-j -> output in JSON
|
||||
|
|
@ -183,6 +184,17 @@ void hyprpaperRequest(int argc, char** argv) {
|
|||
requestHyprpaper(rq);
|
||||
}
|
||||
|
||||
void setcursorRequest(int argc, char** argv) {
|
||||
if (argc < 4) {
|
||||
std::cout << "setcursor requires 2 params";
|
||||
return;
|
||||
}
|
||||
|
||||
std::string rq = "setcursor " + std::string(argv[2]) + " " + std::string(argv[3]);
|
||||
|
||||
request(rq);
|
||||
}
|
||||
|
||||
void batchRequest(std::string arg) {
|
||||
std::string rq = "[[BATCH]]" + arg.substr(arg.find_first_of(" ") + 1);
|
||||
|
||||
|
|
@ -252,6 +264,7 @@ int main(int argc, char** argv) {
|
|||
else if (fullRequest.contains("/splash")) request(fullRequest);
|
||||
else if (fullRequest.contains("/devices")) request(fullRequest);
|
||||
else if (fullRequest.contains("/reload")) request(fullRequest);
|
||||
else if (fullRequest.contains("/setcursor")) setcursorRequest(argc, argv);
|
||||
else if (fullRequest.contains("/dispatch")) dispatchRequest(argc, argv);
|
||||
else if (fullRequest.contains("/keyword")) keywordRequest(argc, argv);
|
||||
else if (fullRequest.contains("/hyprpaper")) hyprpaperRequest(argc, argv);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue