aboutsummaryrefslogtreecommitdiff
path: root/rootston
diff options
context:
space:
mode:
authorVersus Void <versusvoid@gmail.com>2017-10-12 19:15:58 +0000
committerVersus Void <versusvoid@gmail.com>2017-10-12 22:21:35 +0000
commitdb3368ba439e95b99b6d5ef461fb2d073b5fb12c (patch)
tree644328f52685b9e1de2079cfa9b9e9ae507bc34f /rootston
parent2272f3d47cdcb5ffa42dcd20ad87253f78a2e9d0 (diff)
New binding to switch windows
Diffstat (limited to 'rootston')
-rw-r--r--rootston/keyboard.c7
-rw-r--r--rootston/rootston.ini.example1
2 files changed, 8 insertions, 0 deletions
diff --git a/rootston/keyboard.c b/rootston/keyboard.c
index 6f4334af..aee6b098 100644
--- a/rootston/keyboard.c
+++ b/rootston/keyboard.c
@@ -32,6 +32,13 @@ static void keyboard_binding_execute(struct roots_keyboard *keyboard,
if (keyboard->input->last_active_view != NULL) {
view_close(keyboard->input->last_active_view);
}
+ } else if (strcmp(command, "next_window") == 0) {
+ if (server->desktop->views->length > 0) {
+ struct roots_view *view = server->desktop->views->items[0];
+ set_view_focus(keyboard->input, server->desktop, view);
+ wlr_seat_keyboard_notify_enter(keyboard->input->wl_seat,
+ view->wlr_surface);
+ }
} else if (strncmp(exec_prefix, command, strlen(exec_prefix)) == 0) {
const char *shell_cmd = command + strlen(exec_prefix);
pid_t pid = fork();
diff --git a/rootston/rootston.ini.example b/rootston/rootston.ini.example
index 460efa13..4774108a 100644
--- a/rootston/rootston.ini.example
+++ b/rootston/rootston.ini.example
@@ -38,3 +38,4 @@ meta-key = Logo
[bindings]
Logo+Shift+e = exit # Stop the compositor
Logo+q = close # Close the current view
+Alt+Tab = next_window # Cycle through windows