mirror of
https://github.com/ThePrimeagen/harpoon
synced 2024-09-16 13:34:03 +02:00
14 lines
323 B
Bash
Executable file
14 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"
|