mirror of
https://github.com/ThePrimeagen/harpoon.git
synced 2025-07-13 09:30:25 +00:00
15 lines
323 B
Bash
Executable File
15 lines
323 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Make sure tmux is running
|
|
tmux_running=$(pgrep tmux)
|
|
|
|
if [[ -z $TMUX ]] && [[ -z $tmux_running ]]; then
|
|
echo "tmux needs to be running"
|
|
exit 1
|
|
fi
|
|
|
|
# Switch to a window called nvim in tmux - if it exists
|
|
session_name=$(tmux display-message -p "#S")
|
|
|
|
tmux switch-client -t "$session_name:nvim"
|