mcfly
This commit is contained in:
parent
39bb964dd8
commit
efd9b88838
4 changed files with 144 additions and 125 deletions
|
@ -3,20 +3,26 @@ set -ex
|
||||||
|
|
||||||
PATH="$PATH:$HOME/.local/bin"
|
PATH="$PATH:$HOME/.local/bin"
|
||||||
|
|
||||||
|
if [[ $(whoami) == "root" ]]; then
|
||||||
|
SUDO=""
|
||||||
|
else
|
||||||
|
SUDO="sudo"
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $(command -v ansible) ]]; then
|
if [[ $(command -v ansible) ]]; then
|
||||||
printf "ansible already installed\n"
|
printf "ansible already installed\n"
|
||||||
elif [[ $(uname) == "Linux" ]]; then
|
elif [[ $(uname) == "Linux" ]]; then
|
||||||
if [[ $(command -v pacman) ]]; then
|
if [[ $(command -v pacman) ]]; then
|
||||||
sudo pacman -Sy --noconfirm ansible
|
$SUDO pacman -Sy --noconfirm ansible
|
||||||
elif [[ $(command -v zypper) ]]; then
|
elif [[ $(command -v zypper) ]]; then
|
||||||
sudo zypper install -y ansible
|
$SUDO zypper install -y ansible
|
||||||
sudo ln -sf /usr/bin/python3 /usr/bin/python
|
$SUDO ln -sf /usr/bin/python3 /usr/bin/python
|
||||||
elif [[ $(command -v apt) ]]; then
|
elif [[ $(command -v apt) ]]; then
|
||||||
sudo apt install -y ansible python3-apt python-is-python3
|
$SUDO apt install -y ansible python3-apt python-is-python3
|
||||||
elif [[ $(command -v dnf) ]]; then
|
elif [[ $(command -v dnf) ]]; then
|
||||||
sudo dnf install ansible -y
|
$SUDO dnf install ansible -y
|
||||||
elif [[ $(command -v emerge) ]]; then
|
elif [[ $(command -v emerge) ]]; then
|
||||||
sudo emerge ansible
|
$SUDO emerge ansible
|
||||||
fi
|
fi
|
||||||
elif [[ $(uname) == "Darwin" ]]; then
|
elif [[ $(uname) == "Darwin" ]]; then
|
||||||
if [[ ! $(command -v brew) ]]; then
|
if [[ ! $(command -v brew) ]]; then
|
||||||
|
@ -26,7 +32,7 @@ elif [[ $(uname) == "Darwin" ]]; then
|
||||||
/usr/local/bin/brew install ansible
|
/usr/local/bin/brew install ansible
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ANSIBLE_PYTHON_INTERPRETER="$(which python)"
|
ANSIBLE_PYTHON_INTERPRETER="$(command -v python)"
|
||||||
ansible-galaxy install kewlfft.aur
|
ansible-galaxy install kewlfft.aur
|
||||||
ansible-galaxy collection install community.general
|
ansible-galaxy collection install community.general
|
||||||
ansible-playbook --ask-become-pass -i inventory main.yml
|
ansible-playbook --ask-become-pass -i inventory main.yml
|
||||||
|
|
|
@ -1,15 +1,18 @@
|
||||||
---
|
---
|
||||||
- aur: name=paru
|
- name: Install paru
|
||||||
|
aur: name=paru
|
||||||
become: yes
|
become: yes
|
||||||
become_user: aur_builder
|
become_user: aur_builder
|
||||||
|
|
||||||
- aur: name=neovim-nightly
|
- name: Install neovim-nightly
|
||||||
|
aur: name=neovim-nightly
|
||||||
become: yes
|
become: yes
|
||||||
become_user: aur_builder
|
become_user: aur_builder
|
||||||
when:
|
when:
|
||||||
- nightly_neovim == true
|
- nightly_neovim == true
|
||||||
|
|
||||||
- aur: name=mcfly
|
- name: Install mcfly
|
||||||
|
aur: name=mcfly
|
||||||
become: yes
|
become: yes
|
||||||
become_user: aur_builder
|
become_user: aur_builder
|
||||||
when:
|
when:
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env zsh
|
#!/usr/bin/env zsh
|
||||||
|
if [[ ${MCFLY_USED} != 1 ]]; then
|
||||||
if zmodload zsh/parameter 2>/dev/null && (( ${+options} )); then
|
if zmodload zsh/parameter 2>/dev/null && (( ${+options} )); then
|
||||||
__skim_key_bindings_options="options=(${(j: :)${(kv)options[@]}})"
|
__skim_key_bindings_options="options=(${(j: :)${(kv)options[@]}})"
|
||||||
else
|
else
|
||||||
|
@ -116,3 +117,4 @@ bindkey '^R' skim-history-widget
|
||||||
eval $__skim_key_bindings_options
|
eval $__skim_key_bindings_options
|
||||||
'unset' '__skim_key_bindings_options'
|
'unset' '__skim_key_bindings_options'
|
||||||
}
|
}
|
||||||
|
fi
|
||||||
|
|
|
@ -135,6 +135,14 @@ if [[ -d $HOME/.anyenv ]]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ $(whence -p mcfly 2> /dev/null) ]]; then
|
||||||
|
znap eval mcfly 'mcfly init zsh'
|
||||||
|
export MCFLY_KEY_SCHEME=vim
|
||||||
|
export MCFLY_FUZZY=true
|
||||||
|
export MCFLY_RESULTS=50
|
||||||
|
export MCFLY_USED=1
|
||||||
|
fi
|
||||||
|
|
||||||
path+=($(yarn global bin))
|
path+=($(yarn global bin))
|
||||||
export PATH
|
export PATH
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue