aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 593de6b..56f75cd 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -46,6 +46,7 @@ enum action_state {
DEACTIVATE,
SET_FLOAT,
SET_SPLIT,
+ SET_NORMAL,
GETOUTPUTS,
};
@@ -57,6 +58,7 @@ static struct action {
{ DEACTIVATE, "DEACTIVATE" },
{ GETOUTPUTS, "GETOUTPUTS" },
{ SET_FLOAT, "FLOAT" },
+ { SET_NORMAL, "NORMAL" },
};
static int
@@ -83,7 +85,7 @@ help(char **argv)
{
fprintf(stderr, "Usage: %s [-a action] [-p app_id] [-o output_name] [-l]\n",
argv[0]);
- fprintf(stderr, "\t-a -- action activate|deactivate|float|max|getoutputs\n");
+ fprintf(stderr, "\t-a -- action activate|deactivate|float|normal|getoutputs\n");
fprintf(stderr, "\t-p -- app_id application_id\n");
fprintf(stderr, "\t-o -- output_name one of the outputs from getoutputs action\n");
fprintf(stderr, "\t-l -- continuously listen for window state events\n");
@@ -182,6 +184,14 @@ int main(int argc, char *argv[])
fprintf(stderr, "Floating application '%s'\n", app_id);
client->SetAppFloat(std::string(app_id), 40, 300);
break;
+ case SET_NORMAL:
+ if (!app_id) {
+ fprintf(stderr, "Normal/maximized require an app_id\n");
+ help(argv);
+ }
+ fprintf(stderr, "Maximizing application '%s'\n", app_id);
+ client->SetAppNormal(std::string(app_id));
+ break;
case GETOUTPUTS:
read_outputs(client);
break;