refactor(bin): rename dev script to tf and add a zoxide mode
This commit is contained in:
parent
0d497156cc
commit
e5c3f5f230
2 changed files with 10 additions and 3 deletions
|
@ -59,7 +59,7 @@ bind -r "<" swap-window -d -t -1
|
|||
bind -r ">" swap-window -d -t +1
|
||||
|
||||
# Projects
|
||||
bind-key Enter popup -E -h 80% -w 80% "dev"
|
||||
bind-key Enter popup -E -h 80% -w 80% "tf"
|
||||
|
||||
# Switch from Notes/Tasks Session with last session
|
||||
bind-key n run "tmux-notes-switch"
|
||||
|
|
|
@ -6,6 +6,7 @@ ls="eza --header --icons --all --color=always --group-directories-first --hyperl
|
|||
projects_dir="$HOME/dev"
|
||||
projects_command="find $projects_dir -mindepth 2 -maxdepth 2 -type d"
|
||||
fzf_command="fzf --height=100%"
|
||||
zoxide_command="zoxide query -l"
|
||||
|
||||
yaml_config() {
|
||||
local yaml_file="$1"
|
||||
|
@ -70,8 +71,14 @@ launch_docs() {
|
|||
fi
|
||||
}
|
||||
|
||||
selected_dir=$($projects_command | $fzf_command --prompt='Select a directory: ' \
|
||||
--preview "$gfetch {} && $ls {} || $ls {}")
|
||||
selected_dir=$(
|
||||
$projects_command | $fzf_command \
|
||||
--prompt='Select a directory: ' \
|
||||
--bind "ctrl-r:reload($projects_command)+change-preview($gfetch {} && $ls {})" \
|
||||
--bind "ctrl-z:reload($zoxide_command)+change-preview($ls {})" \
|
||||
--header "ctrl-r: repos | ctrl-z: zoxide" \
|
||||
--preview "$gfetch {} && $ls {}"
|
||||
)
|
||||
|
||||
tab_title=$(basename "$selected_dir")
|
||||
|
Loading…
Add table
Reference in a new issue