(settings)
| 83 | |
| 84 | let signals, actions, nameMap, actionIdMap, keycomboMap; |
| 85 | export function setupActions(settings) { |
| 86 | signals = new Utils.Signals(); |
| 87 | actions = []; |
| 88 | nameMap = {}; // mutter keybinding action name -> action |
| 89 | actionIdMap = {}; // actionID -> action |
| 90 | keycomboMap = {}; // keycombo -> action |
| 91 | |
| 92 | /* Initialize keybindings */ |
| 93 | registerAction('live-alt-tab', LiveAltTab.liveAltTab, { settings }); |
| 94 | registerAction('live-alt-tab-backward', LiveAltTab.liveAltTab, |
| 95 | { settings, mutterFlags: Meta.KeyBindingFlags.IS_REVERSED }); |
| 96 | |
| 97 | registerAction('live-alt-tab-scratch', LiveAltTab.liveAltTabScratch, { settings }); |
| 98 | registerAction('live-alt-tab-scratch-backward', LiveAltTab.liveAltTabScratch, |
| 99 | { settings, mutterFlags: Meta.KeyBindingFlags.IS_REVERSED }); |
| 100 | |
| 101 | registerAction('move-monitor-right', () => { |
| 102 | Tiling.spaces.switchMonitor(Meta.DisplayDirection.RIGHT, true); |
| 103 | }, { settings }); |
| 104 | registerAction('move-monitor-left', () => { |
| 105 | Tiling.spaces.switchMonitor(Meta.DisplayDirection.LEFT, true); |
| 106 | }, { settings }); |
| 107 | registerAction('move-monitor-above', () => { |
| 108 | Tiling.spaces.switchMonitor(Meta.DisplayDirection.UP, true); |
| 109 | }, { settings }); |
| 110 | registerAction('move-monitor-below', () => { |
| 111 | Tiling.spaces.switchMonitor(Meta.DisplayDirection.DOWN, true); |
| 112 | }, { settings }); |
| 113 | |
| 114 | registerAction('switch-monitor-right', () => { |
| 115 | Tiling.spaces.switchMonitor(Meta.DisplayDirection.RIGHT, false); |
| 116 | }, { settings }); |
| 117 | registerAction('switch-monitor-left', () => { |
| 118 | Tiling.spaces.switchMonitor(Meta.DisplayDirection.LEFT, false); |
| 119 | }, { settings }); |
| 120 | registerAction('switch-monitor-above', () => { |
| 121 | Tiling.spaces.switchMonitor(Meta.DisplayDirection.UP, false); |
| 122 | }, { settings }); |
| 123 | registerAction('switch-monitor-below', () => { |
| 124 | Tiling.spaces.switchMonitor(Meta.DisplayDirection.DOWN, false); |
| 125 | }, { settings }); |
| 126 | |
| 127 | registerAction('move-space-monitor-right', () => { |
| 128 | Tiling.spaces.moveToMonitor(Meta.DisplayDirection.RIGHT, Meta.DisplayDirection.LEFT); |
| 129 | }, { settings }); |
| 130 | registerAction('move-space-monitor-left', () => { |
| 131 | Tiling.spaces.moveToMonitor(Meta.DisplayDirection.LEFT, Meta.DisplayDirection.RIGHT); |
| 132 | }, { settings }); |
| 133 | registerAction('move-space-monitor-above', () => { |
| 134 | Tiling.spaces.moveToMonitor(Meta.DisplayDirection.UP, Meta.DisplayDirection.DOWN); |
| 135 | }, { settings }); |
| 136 | registerAction('move-space-monitor-below', () => { |
| 137 | Tiling.spaces.moveToMonitor(Meta.DisplayDirection.DOWN, Meta.DisplayDirection.UP); |
| 138 | }, { settings }); |
| 139 | |
| 140 | registerAction('swap-monitor-right', () => { |
| 141 | Tiling.spaces.swapMonitor(Meta.DisplayDirection.RIGHT, Meta.DisplayDirection.LEFT); |
| 142 | }, { settings }); |
no test coverage detected