[NVIM] Disable OSC52 on shared systems
This commit is contained in:
@@ -16,6 +16,7 @@ if [[ $1 == "shared" ]]; then
|
|||||||
mkdir -p $HOME/.config
|
mkdir -p $HOME/.config
|
||||||
rm -rf $HOME/.config/nvim
|
rm -rf $HOME/.config/nvim
|
||||||
ln -Tsfv $PWD/nvim $HOME/.config/nvim
|
ln -Tsfv $PWD/nvim $HOME/.config/nvim
|
||||||
|
touch $HOME/.config/nvim/.shared_config
|
||||||
else
|
else
|
||||||
ln -Tsfv $PWD/zsh $HOME/.zsh
|
ln -Tsfv $PWD/zsh $HOME/.zsh
|
||||||
ln -Tsfv ~/.zsh/.zshrc $HOME/.zshrc
|
ln -Tsfv ~/.zsh/.zshrc $HOME/.zshrc
|
||||||
|
|||||||
0
nvim/.shared_config
Normal file
0
nvim/.shared_config
Normal file
@@ -1,6 +1,13 @@
|
|||||||
set nocompatible
|
set nocompatible
|
||||||
filetype off
|
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
|
" Plugins
|
||||||
" Note: on most systems, this will make the plugins reside in \
|
" Note: on most systems, this will make the plugins reside in \
|
||||||
" ~/.local/share/nvim/plugged/
|
" ~/.local/share/nvim/plugged/
|
||||||
@@ -196,9 +203,11 @@ nmap <Leader>t :call TextWrapToggle()<CR>
|
|||||||
"augroup END
|
"augroup END
|
||||||
|
|
||||||
"Copying
|
"Copying
|
||||||
|
if (!shared_config)
|
||||||
lua << EOF
|
lua << EOF
|
||||||
vim.g.clipboard = 'osc52'
|
vim.g.clipboard = 'osc52'
|
||||||
EOF
|
EOF
|
||||||
|
endif
|
||||||
set clipboard=unnamedplus,unnamed " Copy/Paste
|
set clipboard=unnamedplus,unnamed " Copy/Paste
|
||||||
|
|
||||||
" Airline
|
" Airline
|
||||||
|
|||||||
Reference in New Issue
Block a user