From 52701a81d82cd89525ed883cb046f11f384c8d6c Mon Sep 17 00:00:00 2001 From: Omar Zeidan Date: Mon, 1 Jan 2018 21:42:21 +0100 Subject: More elegant solution for handling new move-to-workspace keybinds --- src/include/all-keybindings.h | 18 +++++++++--------- src/include/prefs.h | 10 +++++----- 2 files changed, 14 insertions(+), 14 deletions(-) (limited to 'src/include') diff --git a/src/include/all-keybindings.h b/src/include/all-keybindings.h index 924a8e66..2cba3df2 100644 --- a/src/include/all-keybindings.h +++ b/src/include/all-keybindings.h @@ -111,6 +111,15 @@ keybind (switch-to-workspace-up, handle_switch_to_workspace, keybind (switch-to-workspace-down, handle_switch_to_workspace, META_MOTION_DOWN, 0) +keybind (move-to-workspace-left, handle_move_to_workspace, + META_MOTION_LEFT, BINDING_PER_WINDOW) +keybind (move-to-workspace-right, handle_move_to_workspace, + META_MOTION_RIGHT, BINDING_PER_WINDOW) +keybind (move-to-workspace-up, handle_move_to_workspace, + META_MOTION_UP, BINDING_PER_WINDOW) +keybind (move-to-workspace-down, handle_move_to_workspace, + META_MOTION_DOWN, BINDING_PER_WINDOW) + /***********************************/ /* The ones which have inverses. These can't be bound to any keystroke @@ -234,15 +243,6 @@ keybind (move-to-workspace-12, handle_move_to_workspace, 11, BINDING_PER_WINDOW) * workspace.h, of course. */ -keybind (move-to-workspace-left, handle_move_to_workspace, - META_MOTION_LEFT, BINDING_PER_WINDOW) -keybind (move-to-workspace-right, handle_move_to_workspace, - META_MOTION_RIGHT, BINDING_PER_WINDOW) -keybind (move-to-workspace-up, handle_move_to_workspace, - META_MOTION_UP, BINDING_PER_WINDOW) -keybind (move-to-workspace-down, handle_move_to_workspace, - META_MOTION_DOWN, BINDING_PER_WINDOW) - keybind (raise-or-lower, handle_raise_or_lower, 0, BINDING_PER_WINDOW) keybind (raise, handle_raise, 0, BINDING_PER_WINDOW) keybind (lower, handle_lower, 0, BINDING_PER_WINDOW) diff --git a/src/include/prefs.h b/src/include/prefs.h index 2baf24bd..712d0651 100644 --- a/src/include/prefs.h +++ b/src/include/prefs.h @@ -171,6 +171,10 @@ typedef enum _MetaKeyBindingAction META_KEYBINDING_ACTION_WORKSPACE_RIGHT, META_KEYBINDING_ACTION_WORKSPACE_UP, META_KEYBINDING_ACTION_WORKSPACE_DOWN, + META_KEYBINDING_ACTION_WORKSPACE_MOVE_LEFT, + META_KEYBINDING_ACTION_WORKSPACE_MOVE_RIGHT, + META_KEYBINDING_ACTION_WORKSPACE_MOVE_UP, + META_KEYBINDING_ACTION_WORKSPACE_MOVE_DOWN, META_KEYBINDING_ACTION_SWITCH_GROUP, META_KEYBINDING_ACTION_SWITCH_GROUP_BACKWARD, META_KEYBINDING_ACTION_SWITCH_WINDOWS, @@ -197,11 +201,7 @@ typedef enum _MetaKeyBindingAction META_KEYBINDING_ACTION_COMMAND_9, META_KEYBINDING_ACTION_COMMAND_10, META_KEYBINDING_ACTION_COMMAND_11, - META_KEYBINDING_ACTION_COMMAND_12, - META_KEYBINDING_ACTION_WORKSPACE_MOVE_LEFT = 94, - META_KEYBINDING_ACTION_WORKSPACE_MOVE_RIGHT = 95, - META_KEYBINDING_ACTION_WORKSPACE_MOVE_UP = 96, - META_KEYBINDING_ACTION_WORKSPACE_MOVE_DOWN = 97 + META_KEYBINDING_ACTION_COMMAND_12 } MetaKeyBindingAction; typedef struct -- cgit v1.2.1