Fix macos setup script for M1

This commit is contained in:
Fabian Ising
2023-06-01 14:32:58 +02:00
parent 29cb35f4f3
commit f18711f073
8 changed files with 15 additions and 9 deletions

View File

@@ -32,7 +32,7 @@ scrolling:
history: 0
shell:
program: zsh
program: /bin/zsh
args:
- "-c"
- "$HOME/.tmux/tmux_attach.sh"

View File

@@ -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

View File

@@ -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

View File

@@ -1,4 +1,4 @@
#! /bin/sh
#! /bin/zsh
#
# setup_mac.sh
# Copyright (C) 2022 fabian <fabian@FordPrefect.home>
@@ -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."

View File

@@ -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

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/zsh
#
# tmux-attach - attach to first unattached session or
# create new session if none are found

View File

@@ -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

View File

@@ -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