mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
add(tmux): tmux config
This commit is contained in:
parent
1c7e98e0c2
commit
c0bcbda34b
4 changed files with 39 additions and 4 deletions
16
.config/fish/functions/tmux-sessionizer.fish
Normal file
16
.config/fish/functions/tmux-sessionizer.fish
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
# idea stolen from the one and only primeagen
|
||||
# aiming to create one session per directory
|
||||
|
||||
function tmux-sessionizer
|
||||
set -f session (string escape -- $PWD)
|
||||
|
||||
tmux start-server
|
||||
|
||||
if not tmux has-session -t $session > /dev/null 2>&1
|
||||
tmux new-session -d -s $session 'nvim'
|
||||
tmux new-window -t $session:1 'fish'
|
||||
end
|
||||
|
||||
tmux select-window -t $session:0
|
||||
tmux attach-session -t $session
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue