[bin] Add two new launchers for k8s and zoxide
This commit is contained in:
parent
04bff3ca89
commit
d5cafd3fd7
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
source <(_kubeconfig)
|
||||
CONTEXT=$(kubectl config get-contexts -o name |fzf --preview="echo Current context: $(kubectl config current-context)" --preview-window="bottom")
|
||||
if [ -n "${CONTEXT}" ]; then
|
||||
kubectl config use-context "${CONTEXT}"
|
||||
swaymsg exec foot -- KUBECONFIG="${KUBECONFIG}" fish -C /home/bascht/.nix-profile/bin/kubens
|
||||
fi
|
|
@ -0,0 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
FOLDER=$(zoxide query --list |fzf --preview="tmux ls |grep -i {q}" --preview-window="bottom")
|
||||
|
||||
if [ -n "${FOLDER}" ]; then
|
||||
swaymsg exec -- foot -D "${FOLDER}" "tn"
|
||||
fi
|
|
@ -44,6 +44,14 @@ then
|
|||
FZF_DEFAULT_OPTS="--prompt='🌐'${FZF_DEFAULT_OPTS}"
|
||||
FOOT_OPTIONS="-W 250x40 ${FOOT_OPTIONS}"
|
||||
COMMAND=~/bin/launcher-qutebrowser
|
||||
elif [[ "$1" == "zoxide" ]]
|
||||
then
|
||||
FZF_DEFAULT_OPTS="--prompt=' ' --algo=v1 --bind 'tab:up' ${FZF_DEFAULT_OPTS}"
|
||||
COMMAND=~/bin/launcher-zoxide
|
||||
elif [[ "$1" == "k8s" ]]
|
||||
then
|
||||
FZF_DEFAULT_OPTS="--prompt=' ' --algo=v1 --bind 'tab:up' ${FZF_DEFAULT_OPTS}"
|
||||
COMMAND=~/bin/launcher-k8s
|
||||
else
|
||||
exec foot --app-id launcher --config ~/.config/foot/foot-launcher.ini ~/bin/launcher-run
|
||||
fi;
|
||||
|
|
Loading…
Reference in New Issue