diff --git a/clone_and_link.sh b/clone_and_link.sh index 99fa98e..b267790 100755 --- a/clone_and_link.sh +++ b/clone_and_link.sh @@ -16,6 +16,7 @@ if [[ $1 == "shared" ]]; then mkdir -p $HOME/.config rm -rf $HOME/.config/nvim ln -Tsfv $PWD/nvim $HOME/.config/nvim + touch $HOME/.config/nvim/.shared_config else ln -Tsfv $PWD/zsh $HOME/.zsh ln -Tsfv ~/.zsh/.zshrc $HOME/.zshrc diff --git a/nvim/.shared_config b/nvim/.shared_config new file mode 100644 index 0000000..e69de29 diff --git a/nvim/init.vim b/nvim/init.vim index d455075..8ad7538 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -1,6 +1,13 @@ set nocompatible filetype off +if ((!filereadable(stdpath('config') . "/.shared_config")) || (exists('$SUDO_USER') && $SUDO_USER == 'fabian')) + let shared_config = 0 +else + let shared_config = 1 + echo "Using shared config." +endif + " Plugins " Note: on most systems, this will make the plugins reside in \ " ~/.local/share/nvim/plugged/ @@ -196,9 +203,11 @@ nmap t :call TextWrapToggle() "augroup END "Copying +if (!shared_config) lua << EOF vim.g.clipboard = 'osc52' EOF +endif set clipboard=unnamedplus,unnamed " Copy/Paste " Airline