From 6448ba19594f900901e10c63a74c4c730331e0ae Mon Sep 17 00:00:00 2001 From: Marco Thomas Date: Thu, 31 Oct 2019 10:26:11 +0100 Subject: [PATCH] first push --- .gitmodules | 3 +++ config.yaml | 16 ++++++++++++++++ dotdrop | 1 + dotdrop.sh | 37 +++++++++++++++++++++++++++++++++++++ dotfiles/bashrc | 18 ++++++++++++++++++ dotfiles/vimrc | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 122 insertions(+) create mode 100644 .gitmodules create mode 100644 config.yaml create mode 160000 dotdrop create mode 100755 dotdrop.sh create mode 100755 dotfiles/bashrc create mode 100644 dotfiles/vimrc diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..674e4c5 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "dotdrop"] + path = dotdrop + url = https://github.com/deadc0de6/dotdrop.git diff --git a/config.yaml b/config.yaml new file mode 100644 index 0000000..a9f4cdd --- /dev/null +++ b/config.yaml @@ -0,0 +1,16 @@ +config: + backup: true + create: true + dotpath: dotfiles +dotfiles: + f_bashrc: + src: bashrc + dst: ~/.bashrc + f_vimrc: + src: vimrc + dst: ~/.vimrc +profiles: + farellien: + dotfiles: + - f_bashrc + - f_vimrc diff --git a/dotdrop b/dotdrop new file mode 160000 index 0000000..2d64e2e --- /dev/null +++ b/dotdrop @@ -0,0 +1 @@ +Subproject commit 2d64e2ee59281e358253fadb04432a040f9392ee diff --git a/dotdrop.sh b/dotdrop.sh new file mode 100755 index 0000000..8c458a5 --- /dev/null +++ b/dotdrop.sh @@ -0,0 +1,37 @@ +#!/usr/bin/env bash +# author: deadc0de6 (https://github.com/deadc0de6) +# Copyright (c) 2017, deadc0de6 + +# check for readlink/realpath presence +# https://github.com/deadc0de6/dotdrop/issues/6 +rl="readlink -f" + +if ! ${rl} "${0}" >/dev/null 2>&1; then + rl="realpath" + + if ! hash ${rl}; then + echo "\"${rl}\" not found!" && exit 1 + fi +fi + +# setup variables +args=("$@") +cur=$(dirname "$(${rl} "${0}")") +opwd=$(pwd) +cfg="${cur}/config.yaml" +sub="dotdrop" + +# pivot +cd "${cur}" || { echo "Directory \"${cur}\" doesn't exist, aborting." && exit 1; } +# init/update the submodule +if [ "${DOTDROP_AUTOUPDATE-yes}" = yes ] ; then + git submodule update --init --recursive + git submodule update --remote dotdrop +fi +# launch dotdrop +PYTHONPATH=dotdrop python3 -m dotdrop.dotdrop "${args[@]}" +ret="$?" +# pivot back +cd "${opwd}" || { echo "Directory \"${opwd}\" doesn't exist, aborting." && exit 1; } +# exit with dotdrop exit code +exit ${ret} diff --git a/dotfiles/bashrc b/dotfiles/bashrc new file mode 100755 index 0000000..fd5a090 --- /dev/null +++ b/dotfiles/bashrc @@ -0,0 +1,18 @@ +# bashrc from Marc + +export PS1="\[\033[0;37m\][\t] \[\033[0;32m\]\u\[\033[m\]@\h: \[\033[1;34m\]\w\[\033[m\] \n> " + +LS_COLORS=$LS_COLORS:'di=1;32:' +export LS_COLORS + +alias lizenz='cat /home/mfriedl/LIZENZ' +alias dotdrop='/home/mthomas/dotfiles/dotdrop.sh --cfg=/home/mthomas/dotfiles/config.yaml' + +# export {http,ftp,https}_proxy=http://tst-proxy.genua.de:8888 + +# Source global definitions +if [ -f /etc/bashrc ]; then + . /etc/bashrc +fi + + diff --git a/dotfiles/vimrc b/dotfiles/vimrc new file mode 100644 index 0000000..ae60e6d --- /dev/null +++ b/dotfiles/vimrc @@ -0,0 +1,47 @@ +set noswapfile +syntax on + +colorscheme onedark + +filetype indent plugin on + +set tabstop=4 "Number of visual spaces per TAB +set softtabstop=4 "Number of spaces in tab when editing +set shiftwidth=4 "How many columns text is indented +set noexpandtab "Tab ARE NOT spaces +set smartindent "Indent source code + +set incsearch +set ignorecase +set smartcase +set hlsearch +nnoremap :nohlsearch + +cmap Wq wq +cmap Q q +cmap W w +cmap q1 q! + +set list +hi SpecialKey ctermbg=White +set listchars=tab:\ \ ,trail:\ + +set number +:highlight LineNr ctermfg=white + +set mat=5 "blink when matching found +set confirm +set showmode +set showmatch +set colorcolumn=80 + +if has("autocmd") + au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") + \| exe "normal! g'\"" | endif +endif + + +set mouse=a +set mouse=c +au BufNewFile,BufRead *.itex set filetype=tex +