mirror of
https://github.com/gosticks/PaperWM.git
synced 2026-10-04 19:46:53 +00:00
Use preview_navigate to switch workspace as default
This commit is contained in:
@@ -82,6 +82,12 @@ function enable() {
|
||||
Meta.keybindings_set_custom_handler("switch-applications",
|
||||
dynamic_function_ref("liveAltTab"));
|
||||
|
||||
Meta.keybindings_set_custom_handler("switch-to-workspace-up",
|
||||
dynamic_function_ref("preview_navigate"));
|
||||
|
||||
Meta.keybindings_set_custom_handler("switch-to-workspace-down",
|
||||
dynamic_function_ref("preview_navigate"));
|
||||
|
||||
// Action name => mutter-keybinding-action-id
|
||||
window.paperActionIds = {};
|
||||
|
||||
|
||||
@@ -674,7 +674,17 @@ PreviewedWindowNavigator = new Lang.Class({
|
||||
},
|
||||
|
||||
_initialSelection: function(backward, actionName) {
|
||||
this._doAction(window.paperActionIds[actionName]);
|
||||
let actionId = window.paperActionIds[actionName];
|
||||
if(actionId === undefined) {
|
||||
try {
|
||||
// Check for built-in actions
|
||||
actionId = Meta.prefs_get_keybinding_action(actionName);
|
||||
} catch(e) {
|
||||
debug("Couldn't resolve action name");
|
||||
}
|
||||
}
|
||||
|
||||
this._doAction(actionId);
|
||||
},
|
||||
|
||||
_getWindowList: function() {
|
||||
|
||||
Reference in New Issue
Block a user