Created
May 16, 2020 08:21
-
-
Save yoheioka/ee20a61fd01aa55fc6dd1c5a8f543b04 to your computer and use it in GitHub Desktop.
Hacking the Caps Lock Key Part 2 monitors.lua
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local hotkey = require 'hs.hotkey' | |
local window = require 'hs.window' | |
local geometry = require 'hs.geometry' | |
local mouse = require 'hs.mouse' | |
local screen = require 'hs.screen' | |
local position = import('utils/position') | |
local monitors = import('utils/monitors') | |
local function init_module() | |
for id, monitor in pairs(monitors.configured_monitors) do | |
hotkey.bind({ "cmd", "ctrl" }, "right", function() | |
local win = window.focusedWindow() | |
win:moveOneScreenEast() | |
end) | |
hotkey.bind({ "cmd", "ctrl" }, "left", function() | |
local win = window.focusedWindow() | |
win:moveOneScreenWest() | |
end) | |
end | |
end | |
return { | |
init = init_module | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment