Remove fish vi-mode. Refactor dependency installation
This commit is contained in:
parent
5b30acf596
commit
00c1b647ea
@ -26,9 +26,6 @@ alias dce="docker-compose exec"
|
|||||||
alias drh="docker run -it --rm -v (pwd):/usr/(pwd) -w /usr/(pwd)"
|
alias drh="docker run -it --rm -v (pwd):/usr/(pwd) -w /usr/(pwd)"
|
||||||
|
|
||||||
|
|
||||||
fish_vi_key_bindings
|
|
||||||
|
|
||||||
|
|
||||||
# Include local config if present
|
# Include local config if present
|
||||||
|
|
||||||
if test -r $DOTFILES/fish/local.fish
|
if test -r $DOTFILES/fish/local.fish
|
||||||
|
37
install.sh
37
install.sh
@ -1,13 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
function install_dependencies() {
|
|
||||||
sudo -n apt-get update
|
|
||||||
sudo -n DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
|
||||||
fish \
|
|
||||||
neovim \
|
|
||||||
tmux
|
|
||||||
}
|
|
||||||
|
|
||||||
function setup_ssh() {
|
function setup_ssh() {
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
touch ~/.ssh/config
|
touch ~/.ssh/config
|
||||||
@ -29,12 +21,19 @@ EOF
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setup_tmux() {
|
function setup_tmux() {
|
||||||
|
sudo -n apt-get update
|
||||||
|
sudo -n DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||||
|
tmux
|
||||||
cat << EOF > ~/.tmux.conf
|
cat << EOF > ~/.tmux.conf
|
||||||
source ${HOME}/dotfiles/tmux/tmux.conf
|
source ${HOME}/dotfiles/tmux/tmux.conf
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
function setup_fish() {
|
function setup_fish() {
|
||||||
|
sudo -n apt-get update
|
||||||
|
sudo -n DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||||
|
fish
|
||||||
|
|
||||||
USER=`whoami`
|
USER=`whoami`
|
||||||
sudo -n chsh $USER -s $(which fish)
|
sudo -n chsh $USER -s $(which fish)
|
||||||
# Force fish shell for devcontainers
|
# Force fish shell for devcontainers
|
||||||
@ -47,29 +46,33 @@ function setup_fish() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setup_nvim() {
|
function setup_nvim() {
|
||||||
|
sudo -n apt-get update
|
||||||
|
sudo -n DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||||
|
neovim
|
||||||
mkdir -p ~/.config/nvim/
|
mkdir -p ~/.config/nvim/
|
||||||
ln -s ~/dotfiles/init.vim ~/.config/nvim/init.vim
|
ln -s ~/dotfiles/init.vim ~/.config/nvim/init.vim
|
||||||
}
|
}
|
||||||
|
|
||||||
function main() {
|
function main() {
|
||||||
|
|
||||||
if [[ ${REMOTE_CONTAINERS} || ${DEVCONTAINER} ]]; then
|
|
||||||
|
|
||||||
echo "INSTALLING IN DEVCONTAINER"
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
install_dependencies
|
|
||||||
|
|
||||||
|
|
||||||
echo "sv_SE.UTF-8 UTF-8" | sudo tee -a /etc/locale.gen
|
echo "sv_SE.UTF-8 UTF-8" | sudo tee -a /etc/locale.gen
|
||||||
sudo locale-gen
|
sudo locale-gen
|
||||||
|
|
||||||
setup_fish
|
setup_fish
|
||||||
setup_ssh
|
setup_ssh
|
||||||
setup_git
|
setup_git
|
||||||
|
|
||||||
|
if [[ ${REMOTE_CONTAINERS} || ${DEVCONTAINER} ]]; then
|
||||||
|
|
||||||
|
echo "INSTALLING IN DEVCONTAINER"
|
||||||
|
|
||||||
|
echo "set -X EDITOR code" >> ~/.config/fish/local.fish
|
||||||
|
|
||||||
|
else
|
||||||
setup_tmux
|
setup_tmux
|
||||||
setup_nvim
|
setup_nvim
|
||||||
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
main $@
|
main $@
|
||||||
|
Loading…
x
Reference in New Issue
Block a user