diff --git a/examples/keybindings.js b/examples/keybindings.js index db05f95..18f291c 100644 --- a/examples/keybindings.js +++ b/examples/keybindings.js @@ -78,11 +78,11 @@ function windowMarks() { } -function swapNeighbours() { +function swapNeighbours(binding = "y") { var Tiling = Extension.imports.tiling; var Meta = imports.gi.Meta; - Keybindings.bindkey("y", "swap-neighbours", (mw) => { + Keybindings.bindkey(binding, "swap-neighbours", (mw) => { let space = Tiling.spaces.spaceOfWindow(mw) let i = space.indexOf(mw); if (space[i+1]) { @@ -91,11 +91,11 @@ function swapNeighbours() { }, {activeInNavigator: true}) } -function cycleMonitor() { +function cycleMonitor(binding = "d") { var Tiling = Extension.imports.tiling; var Main = imports.ui.main; - Keybindings.bindkey("d", "cycle-monitor", () => { + Keybindings.bindkey(binding, "cycle-monitor", () => { let curMonitor = Tiling.spaces.selectedSpace.monitor let monitors = Main.layoutManager.monitors; let nextMonitorI = (curMonitor.index + 1) % monitors.length; @@ -108,7 +108,7 @@ function cycleMonitor() { } -function showNavigator() { +function showNavigator(binding = "j") { Keybindings.bindkey("j", "show-minimap", () => null, { opensMinimap: true }) }