mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
fish,tmux: don't create more than one window in sessionizer
This commit is contained in:
parent
088b13fb4d
commit
a30ab2e61e
1 changed files with 3 additions and 5 deletions
|
|
@ -5,11 +5,9 @@ function __tmux-maybe-create \
|
|||
set session_dir $argv[2]
|
||||
|
||||
if pgrep tmux 2>&1 >/dev/null; or ! tmux has -t=$session_name 2>/dev/null
|
||||
tmux \
|
||||
new-session -ds $session_name -c $session_dir \; \
|
||||
send-keys -t $session_name $EDITOR ENTER \; \
|
||||
new-window -t $session_name -c $session_dir \; \
|
||||
select-window -t $session_name:1
|
||||
# Note:
|
||||
# Maybe it can be interesting to read from an envvar of array, where each element is a call back
|
||||
tmux new-session -ds $session_name -c $session_dir
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue