From 8db95ade2689cbfe306678a28b2cc5cf2565ee09 Mon Sep 17 00:00:00 2001 From: Kacper Marzecki Date: Wed, 19 Mar 2025 23:00:31 +0100 Subject: [PATCH] better cross-platform td & hammerspoon config td poopup --- scripts/hammerspoon_config | 11 +++++++++++ scripts/tmux-td | 4 ++-- scripts/tmux-td-zsh | 22 ++++++++++++++++++++++ 3 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 scripts/hammerspoon_config 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 <