Add previous/next workspace to available actions (#1614)

This commit is contained in:
Leo 2023-04-05 04:02:44 +09:00 committed by GitHub
parent 530a66ea2d
commit f7e8225775
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 1 deletions

View File

@ -9,7 +9,9 @@
<value nick="custom-command" value="5" />
<value nick="window-overview" value="6" />
<value nick="window-overview-all" value="7" />
<value nick="switch-to-workspace-last" value="8" />
<value nick="switch-to-workspace-previous" value="8" />
<value nick="switch-to-workspace-next" value="9" />
<value nick="switch-to-workspace-last" value="10" />
</enum>
<enum id="GalaWindowOverviewType">
<value nick='grid' value='0'/>

View File

@ -25,6 +25,8 @@ namespace Gala {
CUSTOM_COMMAND,
WINDOW_OVERVIEW,
WINDOW_OVERVIEW_ALL,
SWITCH_TO_WORKSPACE_PREVIOUS,
SWITCH_TO_WORKSPACE_NEXT,
SWITCH_TO_WORKSPACE_LAST,
START_MOVE_CURRENT,
START_RESIZE_CURRENT,

View File

@ -879,6 +879,12 @@ namespace Gala {
else
current.stick ();
break;
case ActionType.SWITCH_TO_WORKSPACE_PREVIOUS:
switch_to_next_workspace (Meta.MotionDirection.LEFT);
break;
case ActionType.SWITCH_TO_WORKSPACE_NEXT:
switch_to_next_workspace (Meta.MotionDirection.RIGHT);
break;
case ActionType.MOVE_CURRENT_WORKSPACE_LEFT:
move_window (current, Meta.MotionDirection.LEFT);
break;