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