Migrate to chezmoi
Move config files from config to chezmoi Add script to auto install packages with DNF and Cargo
This commit is contained in:
parent
110e0882c6
commit
224c7ed45c
1654 changed files with 470035 additions and 51 deletions
20
chezmoi/dot_config/tmux/plugins/tmux-fzf/executable_main.sh
Normal file
20
chezmoi/dot_config/tmux/plugins/tmux-fzf/executable_main.sh
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
[[ -z "$TMUX_FZF_ORDER" ]] && TMUX_FZF_ORDER="copy-mode|session|window|pane|command|keybinding|clipboard|process"
|
||||
source "$CURRENT_DIR/scripts/.envs"
|
||||
|
||||
# remove copy-mode from options if we aren't in copy-mode
|
||||
if [[ "$TMUX_FZF_ORDER" == *"copy-mode"* ]] && [ "$(tmux display-message -p '#{pane_in_mode}')" -eq 0 ]; then
|
||||
TMUX_FZF_ORDER="$(echo $TMUX_FZF_ORDER | sed -E 's/\|?copy-mode\|?//')"
|
||||
fi
|
||||
|
||||
items_origin="$(echo $TMUX_FZF_ORDER | tr '|' '\n')"
|
||||
if [[ -z "$TMUX_FZF_MENU" ]]; then
|
||||
item=$(printf "%s\n[cancel]" "$items_origin" | eval "$TMUX_FZF_BIN $TMUX_FZF_OPTIONS")
|
||||
else
|
||||
item=$(printf "menu\n%s\n[cancel]" "$items_origin" | eval "$TMUX_FZF_BIN $TMUX_FZF_OPTIONS")
|
||||
fi
|
||||
[[ "$item" == "[cancel]" || -z "$item" ]] && exit
|
||||
item=$(echo "$CURRENT_DIR/scripts/$item" | sed -E 's/$/.sh/')
|
||||
tmux run-shell -b "$item"
|
||||
Loading…
Add table
Add a link
Reference in a new issue