Add tmux fuzzy session attach
This commit is contained in:
parent
287ede88a8
commit
ac93ce1b91
2 changed files with 14 additions and 0 deletions
13
bin/tmux-fzf
Executable file
13
bin/tmux-fzf
Executable file
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/sh
|
||||||
|
case $1 in
|
||||||
|
ssh) ssh_host=$2
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ -n "$ssh_host" ]
|
||||||
|
then
|
||||||
|
target="$(ssh $ssh_host tmux ls | cut -d : -f 1 | fzf)"
|
||||||
|
[ -n "$target" ] && ssh $ssh_host -t tmux a -t "$target"
|
||||||
|
else
|
||||||
|
target="$(tmux ls | cut -d : -f 1 | fzf)"
|
||||||
|
[ -n "$target" ] && tmux a -t "$target"
|
||||||
|
fi
|
|
@ -20,6 +20,7 @@ alias setclip='xclip -selection c'
|
||||||
alias tmux='tmux -2'
|
alias tmux='tmux -2'
|
||||||
alias w='watch -t -d -n 1'
|
alias w='watch -t -d -n 1'
|
||||||
alias wmu='wake-me-up'
|
alias wmu='wake-me-up'
|
||||||
|
alias tmfa='tmux-fzf'
|
||||||
|
|
||||||
bat_theme() {
|
bat_theme() {
|
||||||
if [ -e $HOME/.dark ]
|
if [ -e $HOME/.dark ]
|
||||||
|
|
Loading…
Reference in a new issue