From c510990195155df947ca727b7a7a880edae220e4 Mon Sep 17 00:00:00 2001 From: Pavel Lutskov Date: Fri, 31 Jul 2020 17:21:06 +0200 Subject: [PATCH] initial commit --- .bashrc_template | 12 ++++++++++++ .gitopts | 5 +++++ .inputrc | 3 +++ .screenrc | 5 +++++ install.sh | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 72 insertions(+) create mode 100644 .bashrc_template create mode 100644 .gitopts create mode 100644 .inputrc create mode 100644 .screenrc create mode 100755 install.sh diff --git a/.bashrc_template b/.bashrc_template new file mode 100644 index 0000000..483383e --- /dev/null +++ b/.bashrc_template @@ -0,0 +1,12 @@ +# +# ~/.bashrc +# + +# If not running interactively, don't do anything +[[ $- != *i* ]] && return +PS1='\[$(tput bold)$(tput setaf 2)\]\u@\h\[$(tput sgr0)\]:' +PS1+='\[$(tput bold)$(tput setaf 4)\]\W\[$(tput sgr0)\]$ ' +. /usr/share/bash-completion/bash_completion + +alias ls='ls --color=auto' +alias xo='xdg-open' diff --git a/.gitopts b/.gitopts new file mode 100644 index 0000000..7bf83f8 --- /dev/null +++ b/.gitopts @@ -0,0 +1,5 @@ +[alias] + gl = log --oneline --decorate --graph --all + co = checkout +[pull] + ff = only diff --git a/.inputrc b/.inputrc new file mode 100644 index 0000000..f8f2f7e --- /dev/null +++ b/.inputrc @@ -0,0 +1,3 @@ +"\C-":menu-complete +"\e[Z":menu-complete-backward +set colored-stats on diff --git a/.screenrc b/.screenrc new file mode 100644 index 0000000..c47b2e0 --- /dev/null +++ b/.screenrc @@ -0,0 +1,5 @@ +term screen-256color +hardstatus alwayslastline +hardstatus string '%w' +startup_message off +vbell off diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..7a9b4c0 --- /dev/null +++ b/install.sh @@ -0,0 +1,47 @@ +#!/usr/bin/env bash +repo="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd )" + +read -p " +Would you like to use template from this repository as your .bashrc? +WARNING: if you do, the existing ~/.bashrc will be deleted! +[y/n]: " response + +if [[ $response == [y,Y]* ]] +then + cp "$repo/.bashrc_template" "$HOME/.bashrc" + echo 'Installed .bashrc' +else + echo 'Not installing .bashrc' +fi + +read -p " +Would you like to include git options from this repo into ~/.gitconfig? +[y/n]: " response + +if [[ $response == [y,Y]* ]] +then + echo "[Include] + path=$repo/.gitopts +" >> "$HOME/.gitconfig" + echo "Included git options into ~/.gitconfig" +else + echo "Not including git options into ~/.gitconfig" +fi + +for another_rc in \ + .inputrc \ + .screenrc +do + read -p " +Would you like to use the $another_rc from this repo? +WARNING: if you do, the existing ~/$another_rc will be deleted! +[y/n]: " response + + if [[ $response == [y,Y]* ]] + then + ln -sf "$repo/$another_rc" "$HOME/$another_rc" + echo "Installed $another_rc" + else + echo "Not installing $another_rc" + fi +done