From 846e89fcfb81a3cfc4f12aeed4e37434ecf8414d Mon Sep 17 00:00:00 2001 From: Isabell Pflug Date: Sat, 28 May 2022 21:46:30 +0200 Subject: [PATCH] :sparkles: added the config files .zshrc, .vimrc in home-directory and the bash script home_backup.sh in scripts --- home-directory/.vimrc | 43 ++++++++++++++++++++++++++++++++++++++++++ home-directory/.zshrc | 25 ++++++++++++++++++++++++ scripts/home_backup.sh | 14 ++++++++++++++ 3 files changed, 82 insertions(+) create mode 100644 home-directory/.vimrc create mode 100644 home-directory/.zshrc create mode 100755 scripts/home_backup.sh diff --git a/home-directory/.vimrc b/home-directory/.vimrc new file mode 100644 index 0000000..8b139cc --- /dev/null +++ b/home-directory/.vimrc @@ -0,0 +1,43 @@ +" automatically update plugin manager (vim-plug) +let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim' +if empty(glob(data_dir . '/autoload/plug.vim')) + silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' + autocmd VimEnter * PlugInstall --sync | source $MYVIMRC +endif + +" Disable compatibility with vi which can cause unexpected issues. +set nocompatible + +" Enable type file detection. Vim will be able to try to detect the type of file in use. +filetype on + +" Enable plugins and load plugin for the detected file type. +filetype plugin on + +" Load an indent file for the detected file type. +filetype indent on +filetype plugin indent on + +" Turn syntax highlighting on. +syntax on +syntax enable + +" Add numbers to each line on the left-hand side. +set number + +" Highlight cursor line underneath the cursor horizontally. +" set cursorline + +" define plugins to use (vim-plug) +"call plug#begin() + +"Plug 'lervag/vimtex' + +"call plug#end() + +" config for vimtex +" Or with a generic interface: +"let g:vimtex_view_general_viewer = 'okular' +"let g:vimtex_view_general_options = '--unique file:@pdf\#src:@line@tex' + +"let g:vimtex_compiler_method = 'lualatex' diff --git a/home-directory/.zshrc b/home-directory/.zshrc new file mode 100644 index 0000000..ae84e17 --- /dev/null +++ b/home-directory/.zshrc @@ -0,0 +1,25 @@ +source $HOME/.antigen/antigen.zsh + +# Load the oh-my-zsh's library. +antigen use oh-my-zsh + +# Bundles from the default repo (robbyrussell's oh-my-zsh). +antigen bundle git +antigen bundle pip +antigen bundle docker-compose +antigen bundle command-not-found +antigen bundle copybuffer +antigen bundle history +antigen bundle emoji + +# Syntax highlighting bundle. +antigen bundle zsh-users/zsh-syntax-highlighting + +# Extra zsh completions +antigen bundle zsh-users/zsh-completions + +# Load the theme. +antigen theme candy + +# Tell antigen that you're done +antigen apply diff --git a/scripts/home_backup.sh b/scripts/home_backup.sh new file mode 100755 index 0000000..280021a --- /dev/null +++ b/scripts/home_backup.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# variables +BACKUP_PATH="/media/isabell/Elements\ SE/isabell_tuxedo/" +# EXCLUDED_DIRS={} + +# backup execution +if [[ -f $BACKUP_PATH ]] && echo "Starting rsync backup of home directory to $BACKUP_PATH"; then + #if [ "$EXCLUDED_DIRS" = "" ]; then + rsync -av --delete $HOME $BACKUP_PATH + #fi +else + echo "Device or location designated for the backup does not exist." +fi