Remove fish vi-mode. Refactor dependency installation

This commit is contained in:
Thomas Lovén 2023-11-13 09:54:59 +01:00
parent 5b30acf596
commit 00c1b647ea
2 changed files with 22 additions and 22 deletions

View File

@ -26,9 +26,6 @@ alias dce="docker-compose exec"
alias drh="docker run -it --rm -v (pwd):/usr/(pwd) -w /usr/(pwd)"
fish_vi_key_bindings
# Include local config if present
if test -r $DOTFILES/fish/local.fish

View File

@ -1,13 +1,5 @@
#!/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() {
mkdir -p ~/.ssh
touch ~/.ssh/config
@ -29,12 +21,19 @@ EOF
}
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
source ${HOME}/dotfiles/tmux/tmux.conf
EOF
}
function setup_fish() {
sudo -n apt-get update
sudo -n DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
fish
USER=`whoami`
sudo -n chsh $USER -s $(which fish)
# Force fish shell for devcontainers
@ -47,29 +46,33 @@ function setup_fish() {
}
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/
ln -s ~/dotfiles/init.vim ~/.config/nvim/init.vim
}
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
sudo locale-gen
setup_fish
setup_ssh
setup_git
setup_tmux
setup_nvim
if [[ ${REMOTE_CONTAINERS} || ${DEVCONTAINER} ]]; then
echo "INSTALLING IN DEVCONTAINER"
echo "set -X EDITOR code" >> ~/.config/fish/local.fish
else
setup_tmux
setup_nvim
fi
}
main $@