hammerspoon adjustments
This commit is contained in:
parent
8db95ade26
commit
f0695e2160
11
hammerspoon/init.lua
Normal file
11
hammerspoon/init.lua
Normal file
@ -0,0 +1,11 @@
|
||||
hs.hotkey.bind({ "cmd" }, "\\", function()
|
||||
hs.application.launchOrFocus("Terminal")
|
||||
hs.timer.doAfter(0.1, function()
|
||||
hs.osascript.applescript([[
|
||||
tell application "Terminal"
|
||||
do script "tmux" in front window
|
||||
do script "tmux-td" in front window
|
||||
end tell
|
||||
]])
|
||||
end)
|
||||
end)
|
||||
@ -16,13 +16,14 @@ end tell
|
||||
if frontApp is "Terminal" then
|
||||
tell application "Terminal"
|
||||
activate
|
||||
delay 0.1
|
||||
delay 0.3
|
||||
tell application "System Events"
|
||||
keystroke "x" using control down -- Send Ctrl + x (tmux prefix)
|
||||
delay 0.1
|
||||
delay 0.3
|
||||
keystroke ":kill-session"
|
||||
delay 0.3
|
||||
key code 36 -- Press Enter to execute :detach
|
||||
delay 0.2
|
||||
delay 0.3
|
||||
keystroke "exit"
|
||||
key code 36 -- Press Enter to execute exit
|
||||
end tell
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user