diff --git a/fish/config.fish b/fish/config.fish index b3725ec..444d307 100644 --- a/fish/config.fish +++ b/fish/config.fish @@ -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 diff --git a/install.sh b/install.sh index d6fec48..2a156d5 100755 --- a/install.sh +++ b/install.sh @@ -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 $@