mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 22:59:15 +00:00
ref(nix): ✨ mkOptions ✨
This commit is contained in:
parent
d98d30916b
commit
989d025f56
42 changed files with 80 additions and 78 deletions
21
nix/home/_/fish/functions/tmux_attach.fish
Normal file
21
nix/home/_/fish/functions/tmux_attach.fish
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# abandon if tmux not running
|
||||
set tmux_running (pgrep tmux)
|
||||
if [ -z "$tmux_running" ]
|
||||
return 0
|
||||
end
|
||||
|
||||
set selected (tmux list-sessions -F "#{session_name}" | fzf)
|
||||
if [ -z $selected ]
|
||||
return 0
|
||||
end
|
||||
|
||||
# echo "---attach---" >> /tmp/TMUX_DEBUG
|
||||
# echo (cat /tmp/TMUX_LAST) >> /tmp/TMUX_DEBUG
|
||||
echo (tmux display-message -p '#S') > /tmp/TMUX_LAST
|
||||
# echo (cat /tmp/TMUX_LAST) >> /tmp/TMUX_DEBUG
|
||||
|
||||
if [ -z $TMUX ]
|
||||
tmux attach-session -t $selected
|
||||
else
|
||||
tmux switch-client -t $selected
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue