From 903ba1c9b327e245b58c6e8d0277685e2fdcc745 Mon Sep 17 00:00:00 2001 From: Tony Crisci Date: Wed, 22 Nov 2017 15:33:17 -0500 Subject: [PATCH] rootston: maximize command --- rootston/keyboard.c | 5 +++++ rootston/rootston.ini.example | 1 + 2 files changed, 6 insertions(+) diff --git a/rootston/keyboard.c b/rootston/keyboard.c index f3fc9a859..0b7afcb31 100644 --- a/rootston/keyboard.c +++ b/rootston/keyboard.c @@ -106,6 +106,11 @@ static void keyboard_binding_execute(struct roots_keyboard *keyboard, } else if (pid == 0) { execl("/bin/sh", "/bin/sh", "-c", shell_cmd, (void *)NULL); } + } else if (strcmp(command, "maximize") == 0) { + struct roots_view *focus = roots_seat_get_focus(seat); + if (focus != NULL) { + view_maximize(focus, !focus->maximized); + } } else { wlr_log(L_ERROR, "unknown binding command: %s", command); } diff --git a/rootston/rootston.ini.example b/rootston/rootston.ini.example index 174671002..a2fabb6b7 100644 --- a/rootston/rootston.ini.example +++ b/rootston/rootston.ini.example @@ -44,4 +44,5 @@ meta-key = Logo [bindings] Logo+Shift+e = exit Logo+q = close +Logo+m = maximize Alt+Tab = next_window