[bin] Add two new launchers for k8s and zoxide

This commit is contained in:
Sebastian Schulze 2023-03-10 11:22:19 +01:00
parent 04bff3ca89
commit d5cafd3fd7
No known key found for this signature in database
GPG Key ID: F6BA63C6A7D3044E
3 changed files with 23 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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;