diff --git a/scripts/hammerspoon_config b/scripts/hammerspoon_config new file mode 100644 index 0000000..0c34e7c --- /dev/null +++ b/scripts/hammerspoon_config @@ -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) diff --git a/scripts/tmux-td b/scripts/tmux-td index c173bea..11aab21 100755 --- a/scripts/tmux-td +++ b/scripts/tmux-td @@ -2,7 +2,7 @@ # Check if Zsh is available if command -v zsh >/dev/null 2>&1; then - zsh scripts/tmux-td-zsh + zsh ~/git/configs/scripts/tmux-td-zsh else - bash scripts/tmux-td-bash + bash ~/git/configs/scripts/tmux-td-bash fi diff --git a/scripts/tmux-td-zsh b/scripts/tmux-td-zsh index 07ab828..a486818 100755 --- a/scripts/tmux-td-zsh +++ b/scripts/tmux-td-zsh @@ -8,6 +8,28 @@ fi if [[ "$(tmux display-message -p -F "#{session_name}")" == "td-cli" ]]; then tmux detach-client tmux display-popup -C + osascript <