diff --git a/.config/alacritty/alacritty.yml b/.config/alacritty/alacritty.yml index 6de7dc5..d292ee6 100644 --- a/.config/alacritty/alacritty.yml +++ b/.config/alacritty/alacritty.yml @@ -32,7 +32,7 @@ scrolling: history: 0 shell: - program: zsh + program: /bin/zsh args: - "-c" - "$HOME/.tmux/tmux_attach.sh" diff --git a/clone_and_link_mac.sh b/clone_and_link_mac.sh index 056c65a..488dc80 100755 --- a/clone_and_link_mac.sh +++ b/clone_and_link_mac.sh @@ -11,7 +11,6 @@ gln -Tsv $PWD/zsh $HOME/.zsh gln -Tsv ~/.zsh/.zshrc $HOME/.zshrc gln -Tsv $PWD/tmux $HOME/.tmux gln -Tsv ~/.tmux/.tmux.conf $HOME/.tmux.conf -mkdir -p $HOME/.config/nvim gln -Tsv $PWD/nvim $HOME/.config/nvim gln -Tsv $PWD/.config/alacritty $HOME/.config/alacritty gln -Tsv $PWD/zsh/.p10k.mac.zsh.example $PWD/zsh/.p10k.mac.zsh diff --git a/nvim/init.vim b/nvim/init.vim index 6abf8a6..41bf126 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -276,5 +276,10 @@ autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab if has("macunix") " Required for virtualenvs - let g:python3_host_prog="/usr/local/bin/python3" + let arch=substitute(system('uname -m'), '\n', '', '') + if arch == 'arm64' + let g:python3_host_prog="/opt/homebrew/bin/python3" + else + let g:python3_host_prog="/usr/local/bin/python3" + endif endif diff --git a/setup_mac.sh b/setup_mac.sh index fa7fa49..f1e071d 100755 --- a/setup_mac.sh +++ b/setup_mac.sh @@ -1,4 +1,4 @@ -#! /bin/sh +#! /bin/zsh # # setup_mac.sh # Copyright (C) 2022 fabian @@ -6,7 +6,7 @@ # Distributed under terms of the MIT license. # -brew install neovim tmux alacritty coreutils +brew install neovim tmux alacritty coreutils cmake golang npm pip3 install neovim echo For alacritty to work seemlessly with tmux, we will have to add '/usr/local/bin'\ to the path. This will require your root password. @@ -27,4 +27,6 @@ for filename in vim/.*_mac.example; do cp $filename ${filename:0:-12} done +open fonts/*.ttf + echo "You should now start tmux (and zsh) and nvim for automatic plugin installation." diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index 9f84b62..0f86adf 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -1,4 +1,4 @@ -set-environment -g PATH "/usr/local/bin:/bin:/usr/bin" +set-environment -g PATH "/usr/local/bin:/bin:/usr/bin:/opt/homebrew/bin" set -g default-terminal "alacritty" set -g history-limit 20000 diff --git a/tmux/tmux_attach.sh b/tmux/tmux_attach.sh index 7745b9c..88a9a08 100755 --- a/tmux/tmux_attach.sh +++ b/tmux/tmux_attach.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/zsh # # tmux-attach - attach to first unattached session or # create new session if none are found diff --git a/zsh/.virtual_env_config.zsh_mac.example b/zsh/.virtual_env_config.zsh_mac.example index 3d047d0..8c52612 100644 --- a/zsh/.virtual_env_config.zsh_mac.example +++ b/zsh/.virtual_env_config.zsh_mac.example @@ -1,4 +1,4 @@ export WORKON_HOME=~/python-envs export VIRTUALENVWRAPPER_VIRTUALENV=/usr/local/bin/virtualenv mkdir -p $WORKON_HOME -source /usr/local/bin/virtualenvwrapper.sh +source /opt/homebrew/bin/virtualenvwrapper.sh diff --git a/zsh/.zshrc b/zsh/.zshrc index 64f889a..9b10aaa 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -4,7 +4,7 @@ #if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then #source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" #fi -export PATH="$HOME/.local/bin:$PATH" +export PATH="$HOME/.local/bin:/opt/homebrew/bin:$PATH" [[ -f ~/.zsh/.powerline_config ]] && source ~/.zsh/.powerline_config [[ -f ~/.zsh/.user_config ]] && source ~/.zsh/.user_config