Add control to hammerspoon hotkey, bind webapp
This commit is contained in:
@@ -9,7 +9,7 @@ log.i('initializing')
|
|||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
-- General ---------------------------------------------------------------------
|
-- General ---------------------------------------------------------------------
|
||||||
|
|
||||||
local hyper = {'cmd', 'shift'}
|
local hyper = {'cmd', 'ctrl', 'shift'}
|
||||||
|
|
||||||
local hotkey = require 'hs.hotkey'
|
local hotkey = require 'hs.hotkey'
|
||||||
|
|
||||||
@@ -47,11 +47,6 @@ end tell
|
|||||||
hs.osascript.applescript(chrome)
|
hs.osascript.applescript(chrome)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Open a new iTerm window
|
|
||||||
hotkey.bind(hyper, 'c', newTerm)
|
|
||||||
-- Open a new Chrome window
|
|
||||||
hotkey.bind(hyper, 'g', newBrowser)
|
|
||||||
|
|
||||||
-- Open a url (or prompt for one) and open as a chrome web app
|
-- Open a url (or prompt for one) and open as a chrome web app
|
||||||
function webApp(app)
|
function webApp(app)
|
||||||
local web = [[
|
local web = [[
|
||||||
@@ -60,6 +55,14 @@ do shell script "~/bin/webapp APP"
|
|||||||
hs.osascript.applescript(string.gsub(web, "APP", app))
|
hs.osascript.applescript(string.gsub(web, "APP", app))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Open a new iTerm window
|
||||||
|
hotkey.bind(hyper, 'c', newTerm)
|
||||||
|
-- Open a new Chrome window
|
||||||
|
hotkey.bind(hyper, 'g', newBrowser)
|
||||||
|
-- Open a webapp
|
||||||
|
hotkey.bind(hyper, 'w', function () webApp("") end)
|
||||||
|
|
||||||
|
|
||||||
local screen = require 'hs.screen'
|
local screen = require 'hs.screen'
|
||||||
local window = require 'hs.window'
|
local window = require 'hs.window'
|
||||||
local geom = require 'hs.geometry'
|
local geom = require 'hs.geometry'
|
||||||
|
|||||||
7
.vimrc
7
.vimrc
@@ -40,16 +40,15 @@ if exists('+mouse')
|
|||||||
else
|
else
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" look for tags file along path
|
||||||
|
set tags=tags;/
|
||||||
|
|
||||||
" F5 to trim trailing whitespace
|
" F5 to trim trailing whitespace
|
||||||
map <silent> <F5> :let _s=@/ <Bar> :%s/\s\+$//e <Bar> :let @/=_s <Bar> :nohl <Bar> :unlet _s <CR>
|
map <silent> <F5> :let _s=@/ <Bar> :%s/\s\+$//e <Bar> :let @/=_s <Bar> :nohl <Bar> :unlet _s <CR>
|
||||||
|
|
||||||
" NERDTree binding
|
" NERDTree binding
|
||||||
map <C-n> :NERDTreeToggle<CR>
|
map <C-n> :NERDTreeToggle<CR>
|
||||||
|
|
||||||
" easytags prefers local tag files
|
|
||||||
set tags=./tags,../tags,../../tags,../../../tags
|
|
||||||
let g:easytags_dynamic_files = 1
|
|
||||||
|
|
||||||
" FZF
|
" FZF
|
||||||
set rtp+=/usr/local/opt/fzf
|
set rtp+=/usr/local/opt/fzf
|
||||||
nmap <C-p> :Files<CR>
|
nmap <C-p> :Files<CR>
|
||||||
|
|||||||
Reference in New Issue
Block a user