first commit
This commit is contained in:
9
scripts/nvim-fzf.sh
Executable file
9
scripts/nvim-fzf.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
fd --hidden --exclude .git | fzf-tmux -p --preview 'fzf-preview.sh {}' --multi \
|
||||
--color=fg:-1,fg+:#d0d0d0,bg:-1,bg+:#262626 \
|
||||
--color=hl:#5f87af,hl+:#5fd7ff,info:#afaf87,marker:#87ff00 \
|
||||
--color=prompt:#d7005f,spinner:#af5fff,pointer:#af5fff,header:#87afaf \
|
||||
--color=border:#262626,label:#aeaeae,query:#d9d9d9 \
|
||||
--border="rounded" \
|
||||
--border-label="" --preview-window="border-rounded" --prompt="> " \
|
||||
--info="inline" --marker=">" --pointer="◆" --separator="─" --scrollbar="│" \
|
||||
| xargs nvim
|
||||
7
scripts/popuptmux.sh
Executable file
7
scripts/popuptmux.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
width=${2:-80%}
|
||||
height=${2:-80%}
|
||||
if [ "$(tmux display-message -p -F "#{session_name}")" = "popup" ];then
|
||||
tmux detach-client
|
||||
else
|
||||
tmux popup -d '#{pane_current_path}' -xC -yC -w$width -h$height -K -E -R "tmux attach -t popup || tmux new -s popup"
|
||||
fi
|
||||
2
scripts/rename-pane.sh
Executable file
2
scripts/rename-pane.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
name=$1
|
||||
tmux select-pane -T $name
|
||||
25
scripts/tmux-sessionizer.sh
Executable file
25
scripts/tmux-sessionizer.sh
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [[ $# -eq 1 ]]; then
|
||||
selected=$1
|
||||
else
|
||||
selected=$(find ~/ /localdisk -mindepth 1 -maxdepth 1 -type d | fzf)
|
||||
fi
|
||||
|
||||
if [[ -z $selected ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
selected_name=$(basename "$selected" | tr . _)
|
||||
tmux_running=$(pgrep tmux)
|
||||
|
||||
if [[ -z $TMUX ]] && [[ -z $tmux_running ]]; then
|
||||
tmux new-session -s $selected_name -c $selected
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if ! tmux has-session -t=$selected_name 2> /dev/null; then
|
||||
tmux new-session -ds $selected_name -c $selected
|
||||
fi
|
||||
|
||||
tmux switch-client -t $selected_name
|
||||
Reference in New Issue
Block a user