mirror of
https://codeberg.org/leana8959/.files.git
synced 2026-02-03 15:39:41 +00:00
fish: rename tmux helper functions
This commit is contained in:
parent
d29efab025
commit
64d001455a
12 changed files with 24 additions and 24 deletions
19
nix/homeModules/common/fish/functions/tmux-home.fish
Normal file
19
nix/homeModules/common/fish/functions/tmux-home.fish
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
function tmux-home \
|
||||
--description "Take me back to ~"
|
||||
|
||||
set session_name home
|
||||
|
||||
if pgrep tmux 2>&1 >/dev/null
|
||||
__tmux-register-session
|
||||
end
|
||||
|
||||
if pgrep tmux 2>&1 >/dev/null; or ! tmux has -t=$session_name 2>/dev/null
|
||||
tmux \
|
||||
new-session -ds home \; \
|
||||
new-window -t home \; \
|
||||
select-window -t "home":1
|
||||
end
|
||||
|
||||
__tmux-attach-or-switch $session_name
|
||||
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue