mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 22:59:15 +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]
|
set session_dir $argv[2]
|
||||||
|
|
||||||
if pgrep tmux 2>&1 >/dev/null; or ! tmux has -t=$session_name 2>/dev/null
|
if pgrep tmux 2>&1 >/dev/null; or ! tmux has -t=$session_name 2>/dev/null
|
||||||
tmux \
|
# Note:
|
||||||
new-session -ds $session_name -c $session_dir \; \
|
# Maybe it can be interesting to read from an envvar of array, where each element is a call back
|
||||||
send-keys -t $session_name $EDITOR ENTER \; \
|
tmux new-session -ds $session_name -c $session_dir
|
||||||
new-window -t $session_name -c $session_dir \; \
|
|
||||||
select-window -t $session_name:1
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue