Use single quotes instead of double quotes

This commit is contained in:
2017-08-05 15:58:54 +01:00
parent 4f6bb59952
commit 7927738951
2 changed files with 33 additions and 33 deletions

View File

@@ -1,7 +1,7 @@
-- luacheck: read_globals hs -- luacheck: read_globals hs
-- Reload config hotkey -- Reload config hotkey
hs.hotkey.bind({"cmd", "alt", "ctrl"}, "R", hs.reload) hs.hotkey.bind({'cmd', 'alt', 'ctrl'}, 'R', hs.reload)
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
-- Set Hammerspoon options -- Set Hammerspoon options
@@ -35,4 +35,4 @@ spoon.HeadphoneAutoPause:start()
-- the end -- the end
hs.alert.show("Hammerspoon loaded") hs.alert.show('Hammerspoon loaded')

View File

@@ -24,7 +24,7 @@ function wm:init ()
-- --
-- show interactive grid menu -- show interactive grid menu
bind({"cmd", "ctrl"}, "2", bind({'cmd', 'ctrl'}, '2',
function() function()
self.grid.setGrid(self.gridSizes.interactive) self.grid.setGrid(self.gridSizes.interactive)
self.grid.show( self.grid.show(
@@ -36,61 +36,61 @@ function wm:init ()
) )
-- left half -- left half
bind({"cmd", "ctrl"}, "J", self.adjustWindow(0, 0, 15, 20)) bind({'cmd', 'ctrl'}, 'J', self.adjustWindow(0, 0, 15, 20))
-- right half -- right half
bind({"cmd", "ctrl"}, "L", self.adjustWindow(15, 0, 15, 20)) bind({'cmd', 'ctrl'}, 'L', self.adjustWindow(15, 0, 15, 20))
-- top half -- top half
bind({"cmd", "ctrl"}, "I", self.adjustWindow(0, 0, 30, 10)) bind({'cmd', 'ctrl'}, 'I', self.adjustWindow(0, 0, 30, 10))
-- bottom half -- bottom half
bind({"cmd", "ctrl"}, "K", self.adjustWindow(0, 10, 30, 10)) bind({'cmd', 'ctrl'}, 'K', self.adjustWindow(0, 10, 30, 10))
-- left narrow -- left narrow
bind({"ctrl", "alt"}, "U", self.adjustWindow(0, 0, 12, 20)) bind({'ctrl', 'alt'}, 'U', self.adjustWindow(0, 0, 12, 20))
-- right narrow -- right narrow
bind({"ctrl", "alt"}, "O", self.adjustWindow(18, 0, 12, 20)) bind({'ctrl', 'alt'}, 'O', self.adjustWindow(18, 0, 12, 20))
-- left wide -- left wide
bind({"cmd", "ctrl"}, "U", self.adjustWindow(0, 0, 18, 20)) bind({'cmd', 'ctrl'}, 'U', self.adjustWindow(0, 0, 18, 20))
-- right wide -- right wide
bind({"cmd", "ctrl"}, "O", self.adjustWindow(12, 0, 18, 20)) bind({'cmd', 'ctrl'}, 'O', self.adjustWindow(12, 0, 18, 20))
-- left fat -- left fat
bind({"ctrl", "alt"}, "J", self.adjustWindow(0, 0, 21, 20)) bind({'cmd', 'ctrl', 'alt'}, 'J', self.adjustWindow(0, 0, 21, 20))
-- right wide -- right wide
bind({"ctrl", "alt"}, "L", self.adjustWindow(9, 0, 21, 20)) bind({'cmd', 'ctrl', 'alt'}, 'L', self.adjustWindow(9, 0, 21, 20))
-- top fat -- top fat
bind({"ctrl", "alt"}, "I", self.adjustWindow(0, 0, 30, 14)) bind({'cmd', 'ctrl', 'alt'}, 'I', self.adjustWindow(0, 0, 30, 14))
-- bottom wide -- bottom wide
bind({"ctrl", "alt"}, "K", self.adjustWindow(0, 6, 30, 14)) bind({'cmd', 'ctrl', 'alt'}, 'K', self.adjustWindow(0, 6, 30, 14))
-- top left quarter -- top left quarter
bind({"cmd", "ctrl", "shift"}, "J", self.adjustWindow(0, 0, 15, 10)) bind({'cmd', 'ctrl', 'shift'}, 'J', self.adjustWindow(0, 0, 15, 10))
-- top right quarter -- top right quarter
bind({"cmd", "ctrl", "shift"}, "I", self.adjustWindow(15, 0, 15, 10)) bind({'cmd', 'ctrl', 'shift'}, 'I', self.adjustWindow(15, 0, 15, 10))
-- bottom right quarter -- bottom right quarter
bind({"cmd", "ctrl", "shift"}, "L", self.adjustWindow(15, 10, 15, 10)) bind({'cmd', 'ctrl', 'shift'}, 'L', self.adjustWindow(15, 10, 15, 10))
-- bottom left quarter -- bottom left quarter
bind({"cmd", "ctrl", "shift"}, "K", self.adjustWindow(0, 10, 15, 10)) bind({'cmd', 'ctrl', 'shift'}, 'K', self.adjustWindow(0, 10, 15, 10))
-- center super narrow -- center super narrow
bind({"cmd", "ctrl", "alt"}, "\\", self.adjustWindow(10, 0, 10, 20)) bind({'cmd', 'ctrl', 'alt'}, '\\', self.adjustWindow(10, 0, 10, 20))
-- center narrow small -- center narrow small
bind({"ctrl", "alt"}, "\\", self.adjustWindow(9, 0, 12, 20)) bind({'ctrl', 'alt'}, '\\', self.adjustWindow(9, 0, 12, 20))
-- center narrow -- center narrow
bind({"cmd", "ctrl"}, "\\", self.adjustWindow(7, 0, 16, 20)) bind({'cmd', 'ctrl'}, '\\', self.adjustWindow(7, 0, 16, 20))
-- center medium small -- center medium small
bind({"ctrl", "alt"}, "'", self.adjustWindow(6, 0, 18, 20)) bind({'ctrl', 'alt'}, '\'', self.adjustWindow(6, 0, 18, 20))
-- center medium -- center medium
bind({"cmd", "ctrl"}, "'", self.adjustWindow(5, 0, 20, 20)) bind({'cmd', 'ctrl'}, '\'', self.adjustWindow(5, 0, 20, 20))
-- center wide small -- center wide small
bind({"ctrl", "alt"}, ";", self.adjustWindow(4, 0, 22, 20)) bind({'ctrl', 'alt'}, ';', self.adjustWindow(4, 0, 22, 20))
-- center wide -- center wide
bind({"cmd", "ctrl"}, ";", self.adjustWindow(3, 0, 24, 20)) bind({'cmd', 'ctrl'}, ';', self.adjustWindow(3, 0, 24, 20))
-- maximized -- maximized
bind({"cmd", "ctrl"}, "H", self.grid.maximizeWindow) bind({'cmd', 'ctrl'}, 'H', self.grid.maximizeWindow)
-- --
@@ -98,7 +98,7 @@ function wm:init ()
-- --
-- move to screen to the left -- move to screen to the left
bind({"cmd", "ctrl"}, ",", bind({'cmd', 'ctrl'}, ',',
function() function()
local win = hs.window.focusedWindow() local win = hs.window.focusedWindow()
win:moveOneScreenWest() win:moveOneScreenWest()
@@ -107,7 +107,7 @@ function wm:init ()
) )
-- move to screen to the right -- move to screen to the right
bind({"cmd", "ctrl"}, ".", bind({'cmd', 'ctrl'}, '.',
function() function()
local win = hs.window.focusedWindow() local win = hs.window.focusedWindow()
win:moveOneScreenEast() win:moveOneScreenEast()
@@ -116,7 +116,7 @@ function wm:init ()
) )
-- move to screen above -- move to screen above
bind({"cmd", "ctrl"}, "P", bind({'cmd', 'ctrl'}, 'P',
function() function()
local win = hs.window.focusedWindow() local win = hs.window.focusedWindow()
win:moveOneScreenNorth() win:moveOneScreenNorth()
@@ -125,7 +125,7 @@ function wm:init ()
) )
-- move to screen bellow -- move to screen bellow
bind({"cmd", "ctrl"}, "N", bind({'cmd', 'ctrl'}, 'N',
function() function()
local win = hs.window.focusedWindow() local win = hs.window.focusedWindow()
win:moveOneScreenSouth() win:moveOneScreenSouth()
@@ -140,9 +140,9 @@ end
-- --
wm.adjustWindow = function (x, y, w, h) wm.adjustWindow = function (x, y, w, h)
return function() return function ()
wm.grid.adjustWindow( wm.grid.adjustWindow(
function(cell) function (cell)
cell.x = x cell.x = x
cell.y = y cell.y = y
cell.w = w cell.w = w