mirror of
https://github.com/kastdeur/dotfiles.git
synced 2024-12-22 09:13:33 +01:00
Possiblity of having special setups for hostnames
For .Bashrc aswell as generic .Profile
This commit is contained in:
parent
0fd6e855bf
commit
37123ca4cd
31 changed files with 3148 additions and 51 deletions
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
[submodule "dotbot"]
|
||||||
|
path = dotbot
|
||||||
|
url = https://github.com/anishathalye/dotbot
|
|
@ -5,6 +5,8 @@
|
||||||
# If not running interactively, don't do anything
|
# If not running interactively, don't do anything
|
||||||
[ -z "$PS1" ] && return
|
[ -z "$PS1" ] && return
|
||||||
|
|
||||||
|
[ ! -z "$DOTFILES" ] && DOTBASH="$DOTFILES/bash"
|
||||||
|
|
||||||
# make less more friendly for non-text input files, see lesspipe(1)
|
# make less more friendly for non-text input files, see lesspipe(1)
|
||||||
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
||||||
|
|
||||||
|
@ -16,12 +18,20 @@ if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
|
||||||
. /etc/bash_completion
|
. /etc/bash_completion
|
||||||
fi
|
fi
|
||||||
|
|
||||||
BASHFOLDER=~/.bash_files
|
# Load main things
|
||||||
if [ -d "$BASHFOLDER" ]; then
|
if [ -d "$DOTBASH/main" ]; then
|
||||||
for f in $BASHFOLDER/*.active;
|
for f in $DOTBASH/main/*; do
|
||||||
do
|
source "$f"
|
||||||
source "$f";
|
|
||||||
done
|
done
|
||||||
else
|
|
||||||
echo "BASHFOLDER (${BASHFOLDER}) Not Found!";
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Try custom bashrc
|
||||||
|
#if [[ $HOSTNAME == 'hg'* && -r "hg.bashrc"]]; then
|
||||||
|
# source "hg.bashrc"
|
||||||
|
#fi
|
||||||
|
|
||||||
|
# Try hostname bashrcs
|
||||||
|
if [ -r "$DOTBASH/$HOSTNAME.bashrc" ]; then
|
||||||
|
source "$DOTBASH/$HOSTNAME.bashrc"
|
||||||
|
fi
|
||||||
|
|
1
bash/main/50-ps
Symbolic link
1
bash/main/50-ps
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../scriptlets/50-ps
|
39
bash/main/aliases
Normal file
39
bash/main/aliases
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
# enable color support of ls and also add handy aliases
|
||||||
|
if [ -x /usr/bin/dircolors ]; then
|
||||||
|
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||||
|
alias ls='ls --color=auto'
|
||||||
|
alias dir='dir --color=auto'
|
||||||
|
alias vdir='vdir --color=auto'
|
||||||
|
|
||||||
|
alias grep='grep --color=auto'
|
||||||
|
alias fgrep='fgrep --color=auto'
|
||||||
|
alias egrep='egrep --color=auto'
|
||||||
|
fi
|
||||||
|
|
||||||
|
# some more ls aliases
|
||||||
|
alias ll='ls -l'
|
||||||
|
alias la='ls -A'
|
||||||
|
alias l='ls -CF'
|
||||||
|
|
||||||
|
# Use vim if possible instead of vi
|
||||||
|
if [[ $(command -v vim) ]]; then
|
||||||
|
alias vi='vim'
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Reload bashrc
|
||||||
|
alias bashreload="source ~/.bashrc"
|
||||||
|
|
||||||
|
# Easy calculator instead of bc
|
||||||
|
alias pc='python -ic "from __future__ import division; from math import *"'
|
||||||
|
|
||||||
|
# Moving around
|
||||||
|
alias ~='cd ~'
|
||||||
|
alias ..='cd ..'
|
||||||
|
|
||||||
|
|
||||||
|
#Aliases for RU
|
||||||
|
alias lilo='ssh lilo'
|
||||||
|
alias MC='cd ~/MC; echo "Welcome to Marie Curie"'
|
||||||
|
alias MCMail='~/MC/www/mailer/mariemailer.psql.pl'
|
||||||
|
alias DocMail='~/MC/www/mailer/docentmailer.pl'
|
||||||
|
|
17
bash/main/colours
Normal file
17
bash/main/colours
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
### Colors to Vars ### {{{
|
||||||
|
## Inspired by http://wiki.archlinux.org/index.php/Color_Bash_Prompt#List_of_colors_for_prompt_and_Bash
|
||||||
|
## Terminal Control Escape Sequences: http://www.termsys.demon.co.uk/vtansi.htm
|
||||||
|
## Consider using some of: https://gist.github.com/bcap/5682077#file-terminal-control-sh
|
||||||
|
## Can unset with `unset -v {,B,U,I,BI,On_,On_I}{Bla,Red,Gre,Yel,Blu,Pur,Cya,Whi} RCol`
|
||||||
|
RCol='\[\e[0m\]' # Text Reset
|
||||||
|
|
||||||
|
# Regular Bold Underline High Intensity BoldHigh Intensity Background High Intensity Backgrounds
|
||||||
|
Bla='\[\e[0;30m\]'; BBla='\[\e[1;30m\]'; UBla='\[\e[4;30m\]'; IBla='\[\e[0;90m\]'; BIBla='\[\e[1;90m\]'; On_Bla='\e[40m'; On_IBla='\[\e[0;100m\]';
|
||||||
|
Red='\[\e[0;31m\]'; BRed='\[\e[1;31m\]'; URed='\[\e[4;31m\]'; IRed='\[\e[0;91m\]'; BIRed='\[\e[1;91m\]'; On_Red='\e[41m'; On_IRed='\[\e[0;101m\]';
|
||||||
|
Gre='\[\e[0;32m\]'; BGre='\[\e[1;32m\]'; UGre='\[\e[4;32m\]'; IGre='\[\e[0;92m\]'; BIGre='\[\e[1;92m\]'; On_Gre='\e[42m'; On_IGre='\[\e[0;102m\]';
|
||||||
|
Yel='\[\e[0;33m\]'; BYel='\[\e[1;33m\]'; UYel='\[\e[4;33m\]'; IYel='\[\e[0;93m\]'; BIYel='\[\e[1;93m\]'; On_Yel='\e[43m'; On_IYel='\[\e[0;103m\]';
|
||||||
|
Blu='\[\e[0;34m\]'; BBlu='\[\e[1;34m\]'; UBlu='\[\e[4;34m\]'; IBlu='\[\e[0;94m\]'; BIBlu='\[\e[1;94m\]'; On_Blu='\e[44m'; On_IBlu='\[\e[0;104m\]';
|
||||||
|
Pur='\[\e[0;35m\]'; BPur='\[\e[1;35m\]'; UPur='\[\e[4;35m\]'; IPur='\[\e[0;95m\]'; BIPur='\[\e[1;95m\]'; On_Pur='\e[45m'; On_IPur='\[\e[0;105m\]';
|
||||||
|
Cya='\[\e[0;36m\]'; BCya='\[\e[1;36m\]'; UCya='\[\e[4;36m\]'; ICya='\[\e[0;96m\]'; BICya='\[\e[1;96m\]'; On_Cya='\e[46m'; On_ICya='\[\e[0;106m\]';
|
||||||
|
Whi='\[\e[0;37m\]'; BWhi='\[\e[1;37m\]'; UWhi='\[\e[4;37m\]'; IWhi='\[\e[0;97m\]'; BIWhi='\[\e[1;97m\]'; On_Whi='\e[47m'; On_IWhi='\[\e[0;107m\]';
|
||||||
|
### End Color Vars ### }}}
|
17
bash/main/history
Normal file
17
bash/main/history
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
# don't put duplicate lines or lines starting with space in the history.
|
||||||
|
# See bash(1) for more options
|
||||||
|
HISTCONTROL=ignoreboth
|
||||||
|
# append to the history file, don't overwrite it
|
||||||
|
shopt -s histappend
|
||||||
|
|
||||||
|
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
||||||
|
HISTSIZE=10000
|
||||||
|
HISTFILESIZE=20000
|
||||||
|
|
||||||
|
# check the window size after each command and, if necessary,
|
||||||
|
# update the values of LINES and COLUMNS.
|
||||||
|
shopt -s checkwinsize
|
||||||
|
|
||||||
|
# If set, the pattern "**" used in a pathname expansion context will
|
||||||
|
# match all files and zero or more directories and subdirectories.
|
||||||
|
#shopt -s globstar
|
4
bash/scriptlets/00-marietje
Normal file
4
bash/scriptlets/00-marietje
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
# Get Marietje and shizzle
|
||||||
|
if [ -f /vol/impuls/marcur/bashrc ]; then
|
||||||
|
. /vol/impuls/marcur/bashrc
|
||||||
|
fi
|
242
bash/scriptlets/50-ps
Normal file
242
bash/scriptlets/50-ps
Normal file
|
@ -0,0 +1,242 @@
|
||||||
|
# .bash_files
|
||||||
|
# /PS
|
||||||
|
|
||||||
|
# uncomment for a colored prompt, if the terminal has the capability; turned
|
||||||
|
# off by default to not distract the user: the focus in a terminal window
|
||||||
|
# should be on the output of commands, not on the prompt
|
||||||
|
force_color_prompt=yes
|
||||||
|
|
||||||
|
if [ -n "$force_color_prompt" ]; then
|
||||||
|
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
||||||
|
# We have color support; assume it's compliant with Ecma-48
|
||||||
|
# (ISO/IEC-6429). (Lack of such support is extremely rare, and
|
||||||
|
# a case would tend to support setf rather than setaf.)
|
||||||
|
color_prompt=yes
|
||||||
|
else
|
||||||
|
color_prompt=
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Old PS1
|
||||||
|
#if [ "$color_prompt" = yes ]; then
|
||||||
|
# PS1='${debian_chroot:+($debian_chroot)}\[\033[00;32m\]\u@\H\[\033[00m\] \[\033[0;33;40m\](\t)\[\033[00m\] \[\033[01;34m\]\[$(ls |wc -l)\]@\W\[\033[00m\]:\$ '
|
||||||
|
#else
|
||||||
|
# PS1='${debian_chroot:+($debian_chroot)}\u@\H (\t) \[$(ls | wc -l)\]@\W:\$ '
|
||||||
|
#fi
|
||||||
|
|
||||||
|
|
||||||
|
function color() {
|
||||||
|
if [ -n "$force_color_prompt" ] ; then
|
||||||
|
if [ -n "$color_prompt" ] ; then
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
export PROMPT_COMMAND=__prompt_command
|
||||||
|
|
||||||
|
function __prompt_command() {
|
||||||
|
local RETVAL=$?
|
||||||
|
if [ ! $RETVAL -ne 0 ]; then
|
||||||
|
RETVAL=0
|
||||||
|
fi
|
||||||
|
|
||||||
|
PS1="${debian_chroot:+($debian_chroot)}"
|
||||||
|
|
||||||
|
#Return Value
|
||||||
|
if [ -n $RETVAL ]; then
|
||||||
|
PS1+="$(retval ${RETVAL})"
|
||||||
|
fi
|
||||||
|
### Add Git Status ###
|
||||||
|
if [[ $(command -v git) ]]; then
|
||||||
|
PS1+="$(git_status) "
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
#user@hostname
|
||||||
|
if color ; then
|
||||||
|
PS1+="${Gre}\u${RCol}"
|
||||||
|
else
|
||||||
|
PS1+="\u"
|
||||||
|
fi
|
||||||
|
|
||||||
|
PS1+="@"
|
||||||
|
|
||||||
|
if color ; then
|
||||||
|
if [[ $HOSTNAME == 'lilo'* ]]; then
|
||||||
|
PS1+="${BWhi}\H${RCol}"
|
||||||
|
elif [[ $HOSTNAME == 'hg'* ]]; then
|
||||||
|
PS1+="${BRed}\H${RCol}"
|
||||||
|
else
|
||||||
|
PS1+="${Blu}${On_Whi}\H${RCol}"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
PS1+="\H"
|
||||||
|
fi
|
||||||
|
|
||||||
|
#time w/ seconds
|
||||||
|
if color ; then
|
||||||
|
PS1+="${Yel}${On_Bla}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
PS1+="(\t)"
|
||||||
|
|
||||||
|
if color ; then
|
||||||
|
PS1+="${RCol}"
|
||||||
|
fi
|
||||||
|
PS1+=" "
|
||||||
|
#dir count, pwd
|
||||||
|
if color ; then
|
||||||
|
PS1+="${BBlu}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
PS1+="\[$(ls |wc -l)\]@\W"
|
||||||
|
|
||||||
|
if color ; then
|
||||||
|
PS1+="${RCol}"
|
||||||
|
fi
|
||||||
|
PS1+=" "
|
||||||
|
#UID
|
||||||
|
PS1+=':\$ '
|
||||||
|
}
|
||||||
|
|
||||||
|
function retval() {
|
||||||
|
### Determine Return Value
|
||||||
|
local PS1
|
||||||
|
if [ -z "$color_prompt" ]; then
|
||||||
|
PS1="[$1] "
|
||||||
|
else
|
||||||
|
if [ ! $1 == 0 ]; then
|
||||||
|
PS1="${Red}×${RCol}"
|
||||||
|
else
|
||||||
|
PS1="${Gre}+${RCol}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "${PS1} "
|
||||||
|
}
|
||||||
|
|
||||||
|
function git_status() {
|
||||||
|
### Determine Git Status
|
||||||
|
local PS1
|
||||||
|
local GStat="$(git status --porcelain -b 2>/dev/null | tr '\n' ':')"
|
||||||
|
|
||||||
|
if [ "$GStat" ]; then
|
||||||
|
### Fetch Time Check ### {{{
|
||||||
|
local LAST=$(stat -c %Y $(git rev-parse --git-dir 2>/dev/null)/FETCH_HEAD 2>/dev/null)
|
||||||
|
if [ "${LAST}" ]; then
|
||||||
|
local TIME=$(echo $(date +"%s") - ${LAST} | bc)
|
||||||
|
## Check if more than 60 minutes since last
|
||||||
|
if [ "${TIME}" -gt "3600" ]; then
|
||||||
|
git fetch 2>/dev/null
|
||||||
|
PS1+=' +'
|
||||||
|
## Refresh var
|
||||||
|
local GStat="$(git status --porcelain -b 2>/dev/null | tr '\n' ':')"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
### End Fetch Check ### }}}
|
||||||
|
|
||||||
|
### Test For Changes ### {{{
|
||||||
|
## Change this to test for 'ahead' or 'behind'!
|
||||||
|
local GChanges="$(echo ${GStat} | tr ':' '\n' | grep -v "^$" | grep -v "^\#\#" | wc -l | tr -d ' ')"
|
||||||
|
if [ "$GChanges" == "0" ]; then
|
||||||
|
local GitCol=$Gre
|
||||||
|
else
|
||||||
|
local GitCol=$Red
|
||||||
|
fi
|
||||||
|
### End Test Changes ### }}}
|
||||||
|
|
||||||
|
### Find Branch ### {{{
|
||||||
|
local GBra="$(echo ${GStat} | tr ':' '\n' | grep "^##" | cut -c4- | grep -o "^[a-zA-Z]\{1,\}[^\.]")"
|
||||||
|
if [ "$GBra" ]; then
|
||||||
|
if [ "$GBra" == "master" ]; then
|
||||||
|
local GBra="M" # Because why waste space
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
local GBra="ERROR" # It could happen supposedly?
|
||||||
|
fi
|
||||||
|
### End Branch ### }}}
|
||||||
|
|
||||||
|
PS1+=" ${GitCol}[$GBra]${RCol}" # Add result to prompt
|
||||||
|
|
||||||
|
### Find Commit Status ### {{{
|
||||||
|
## Test Modified and Untracked for "0"
|
||||||
|
# # local GDel="$(echo ${GStat} | tr ':' '\n' | grep -c "^[ MARC]D")"
|
||||||
|
|
||||||
|
local GAhe="$(echo ${GStat} | tr ':' '\n' | grep "^##" | grep -o "ahead [0-9]\{1,\}" | grep -o "[0-9]\{1,\}")"
|
||||||
|
if [ "$GAhe" ]; then
|
||||||
|
PS1+="${Gre}↑${RCol}${GAhe}" # Ahead
|
||||||
|
fi
|
||||||
|
|
||||||
|
## Needs a `git fetch`
|
||||||
|
local GBeh="$(echo ${GStat} | tr ':' '\n' | grep "^##" | grep -o "behind [0-9]\{1,\}" | grep -o "[0-9]\{1,\}")"
|
||||||
|
if [ "$GBeh" ]; then
|
||||||
|
PS1+="${Red}↓${RCol}${GBeh}" # Behind
|
||||||
|
fi
|
||||||
|
|
||||||
|
local GMod="$(echo ${GStat} | tr ':' '\n' | grep -c "^[ MARC]M")"
|
||||||
|
if [ "$GMod" -gt "0" ]; then
|
||||||
|
PS1+="${Pur}≠${RCol}${GMod}" # Modified
|
||||||
|
fi
|
||||||
|
|
||||||
|
local GUnt="$(echo ${GStat} | tr ':' '\n' | grep -c "^\?")"
|
||||||
|
if [ "$GUnt" -gt "0" ]; then
|
||||||
|
PS1+="${Yel}?${RCol}${GUnt}" # Untracked
|
||||||
|
fi
|
||||||
|
### End Commit Status ### }}}
|
||||||
|
|
||||||
|
echo "${PS1}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Git
|
||||||
|
# get current branch in git repo
|
||||||
|
function parse_git_branch() {
|
||||||
|
BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`
|
||||||
|
if [ ! "${BRANCH}" == "" ]; then
|
||||||
|
STAT=`parse_git_dirty`
|
||||||
|
echo "[${BRANCH}${STAT}]"
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# get current status of git repo
|
||||||
|
function parse_git_dirty {
|
||||||
|
status=`git status 2>&1 | tee`
|
||||||
|
dirty=`echo -n "${status}" 2> /dev/null | grep "modified:" &> /dev/null; echo "$?"`
|
||||||
|
untracked=`echo -n "${status}" 2> /dev/null | grep "Untracked files" &> /dev/null; echo "$?"`
|
||||||
|
ahead=`echo -n "${status}" 2> /dev/null | grep "Your branch is ahead of" &> /dev/null; echo "$?"`
|
||||||
|
newfile=`echo -n "${status}" 2> /dev/null | grep "new file:" &> /dev/null; echo "$?"`
|
||||||
|
renamed=`echo -n "${status}" 2> /dev/null | grep "renamed:" &> /dev/null; echo "$?"`
|
||||||
|
deleted=`echo -n "${status}" 2> /dev/null | grep "deleted:" &> /dev/null; echo "$?"`
|
||||||
|
bits=''
|
||||||
|
if [ "${renamed}" == "0" ]; then
|
||||||
|
bits=">${bits}"
|
||||||
|
fi
|
||||||
|
if [ "${ahead}" == "0" ]; then
|
||||||
|
bits="*${bits}"
|
||||||
|
fi
|
||||||
|
if [ "${newfile}" == "0" ]; then
|
||||||
|
bits="+${bits}"
|
||||||
|
fi
|
||||||
|
if [ "${untracked}" == "0" ]; then
|
||||||
|
bits="?${bits}"
|
||||||
|
fi
|
||||||
|
if [ "${deleted}" == "0" ]; then
|
||||||
|
bits="x${bits}"
|
||||||
|
fi
|
||||||
|
if [ "${dirty}" == "0" ]; then
|
||||||
|
bits="!${bits}"
|
||||||
|
fi
|
||||||
|
if [ ! "${bits}" == "" ]; then
|
||||||
|
echo " ${bits}"
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
}
|
8
bash/scriptlets/70_wttr
Normal file
8
bash/scriptlets/70_wttr
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
#This file should be cronned from: wttr.in/<place>
|
||||||
|
#For example:
|
||||||
|
#27 */2 * * * curl -s wttr.in/Voorthuizen | sed -n 3,7p > .wttr 2>&1
|
||||||
|
WTTR=~/.wttr
|
||||||
|
if [ -f $WTTR ]; then
|
||||||
|
cat $WTTR
|
||||||
|
alias wttr='cat $WTTR'
|
||||||
|
fi
|
6
bash/scriptlets/alias-ru
Normal file
6
bash/scriptlets/alias-ru
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
#Aliases for RU
|
||||||
|
alias lilo='ssh lilo'
|
||||||
|
alias MC='cd ~/MC; echo "Welcome to Marie Curie"'
|
||||||
|
alias MCMail='~/MC/www/mailer/mariemailer.psql.pl'
|
||||||
|
alias DocMail='~/MC/www/mailer/docentmailer.pl'
|
||||||
|
|
3
bash/scriptlets/fortune
Normal file
3
bash/scriptlets/fortune
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
if [[ $(command -v fortune) ]]; then
|
||||||
|
fortune -so
|
||||||
|
fi
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit f7b5d451634841505d2b84b4beb2bfb465425bc8
|
|
33
bin/countdown
Executable file
33
bin/countdown
Executable file
|
@ -0,0 +1,33 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
m=${1}
|
||||||
|
|
||||||
|
Floor () {
|
||||||
|
DIVIDEND=${1}
|
||||||
|
DIVISOR=${2}
|
||||||
|
RESULT=$(( ( ${DIVIDEND} - ( ${DIVIDEND} % ${DIVISOR}) )/${DIVISOR} ))
|
||||||
|
echo ${RESULT}
|
||||||
|
}
|
||||||
|
|
||||||
|
Timecount(){
|
||||||
|
s=${1}
|
||||||
|
HOUR=$( Floor ${s} 60/60 )
|
||||||
|
s=$((${s}-(60*60*${HOUR})))
|
||||||
|
MIN=$( Floor ${s} 60 )
|
||||||
|
SEC=$((${s}-60*${MIN}))
|
||||||
|
while [ $HOUR -ge 0 ]; do
|
||||||
|
while [ $MIN -ge 0 ]; do
|
||||||
|
while [ $SEC -ge 0 ]; do
|
||||||
|
printf "%02d:%02d:%02d\033[0K\r" $HOUR $MIN $SEC
|
||||||
|
SEC=$((SEC-1))
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
SEC=59
|
||||||
|
MIN=$((MIN-1))
|
||||||
|
done
|
||||||
|
MIN=59
|
||||||
|
HOUR=$((HOUR-1))
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
Timecount $m
|
1
dotbot
Submodule
1
dotbot
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 28959a3f31d8632975de4e18d0a0e47476b5a413
|
1
envs/cfitsio.active
Normal file
1
envs/cfitsio.active
Normal file
|
@ -0,0 +1 @@
|
||||||
|
export CFITSIO=/home/edeboone/Documents/Stage/bin/cfitsio
|
5
envs/gaia.active
Normal file
5
envs/gaia.active
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# Starlink
|
||||||
|
|
||||||
|
export STARLINK_DIR=/vol/optcoma/star-namaka
|
||||||
|
|
||||||
|
[ -r $STARLINK_DIR/etc/profile ] && . $STARLINK_DIR/etc/profile
|
8
envs/healpix.active
Normal file
8
envs/healpix.active
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# modifications by HEALPixAutoConf 3.31
|
||||||
|
|
||||||
|
# Version 3.20
|
||||||
|
export HEALPIX_CONFIG=/home/edeboone/Documents/Stage/bin/Healpix_3.20/confdir/3_20_Linux/config
|
||||||
|
|
||||||
|
# Version 3.31
|
||||||
|
#export HEALPIX_CONFIG=/home/edeboone/Documents/Stage/bin/Healpix_3.31/confdir/3_31_Linux/config
|
||||||
|
[ -r $HEALPIX_CONFIG ] && . $HEALPIX_CONFIG
|
15
envs/marie.active
Normal file
15
envs/marie.active
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
MC=/vol/impuls/marcur
|
||||||
|
PATH=$MC/common/bin:$PATH
|
||||||
|
|
||||||
|
if [[ -d $HOME/public/bin ]]; then
|
||||||
|
PATH=$HOME/public/bin:$PATH
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -d $HOME/bin ]]; then
|
||||||
|
PATH=$HOME/bin:$PATH
|
||||||
|
fi
|
||||||
|
|
||||||
|
MANPATH=$MC/lilo/share/man:$MANPATH
|
||||||
|
## export it all
|
||||||
|
export PATH
|
||||||
|
export MANPATH
|
6
git/gitconfig
Normal file
6
git/gitconfig
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
[diff "pdf"]
|
||||||
|
textconv = pdf2txt
|
||||||
|
[user]
|
||||||
|
name = Eric Teunis de Boone
|
||||||
|
[push]
|
||||||
|
default = matching
|
14
install
Executable file
14
install
Executable file
|
@ -0,0 +1,14 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
CONFIG="install.conf.yaml"
|
||||||
|
DOTBOT_DIR="dotbot"
|
||||||
|
|
||||||
|
DOTBOT_BIN="bin/dotbot"
|
||||||
|
BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
|
||||||
|
cd "${BASEDIR}"
|
||||||
|
git submodule update --init --recursive "${DOTBOT_DIR}"
|
||||||
|
|
||||||
|
"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASEDIR}" -c "${CONFIG}" "${@}"
|
16
install.conf.yaml
Normal file
16
install.conf.yaml
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
- defaults:
|
||||||
|
link:
|
||||||
|
create: true
|
||||||
|
relink: true
|
||||||
|
|
||||||
|
- clean: ['~']
|
||||||
|
|
||||||
|
- link:
|
||||||
|
~/.bashrc: bash/bashrc
|
||||||
|
~/.profile: profiles/main
|
||||||
|
~/.gitconfig: git/gitconfig
|
||||||
|
~/.tmux.conf: tmux/tmux.conf
|
||||||
|
~/.vimrc: vim/vimrc
|
||||||
|
|
||||||
|
- shell:
|
||||||
|
- git submodules update # after linking ~/.gitconfig
|
34
install.sh
34
install.sh
|
@ -1,34 +0,0 @@
|
||||||
|
|
||||||
BASE="$HOME/.dotfiles"
|
|
||||||
BAKSUFFIX=".old"
|
|
||||||
|
|
||||||
symlink()
|
|
||||||
{
|
|
||||||
local COMMAND='ln -s '
|
|
||||||
[ $# -lt 2 ] && return 1
|
|
||||||
|
|
||||||
[ $# -gt 2 ] && [ "$3" = "-c" -o "$3" = "--copy" ] $COMMAND = 'echo "cp -r" '
|
|
||||||
|
|
||||||
if [ ! -h $2 ]; then
|
|
||||||
echo "MOVING mv \"$2\" \"$2$BAKSUFFIX\" "
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
$COMMAND "$1" "$2"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# bash
|
|
||||||
symlink "${BASE}/bashrc" ~/.bashrc
|
|
||||||
symlink "${BASE}/bash_files/" ~/.bash_files
|
|
||||||
|
|
||||||
# vim
|
|
||||||
symlink "${BASE}/vimrc" ~/.vimrc
|
|
||||||
symlink "${BASE}/vim/" ~/.vim
|
|
||||||
|
|
||||||
# tmux
|
|
||||||
symlink "${BASE}/tmux.conf" ~/.tmux.conf
|
|
||||||
|
|
||||||
# ssh
|
|
||||||
symlink "${BASE}/ssh/" ~/.ssh
|
|
||||||
|
|
25
profile
Normal file
25
profile
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
# Define DOTFILES for easy access
|
||||||
|
DOTFILES="$HOME/.dotfiles"
|
||||||
|
|
||||||
|
# Add DOTFILES/bin/ to PATH
|
||||||
|
DOTBIN="$HOME/.bin"
|
||||||
|
if [ -d "$DOTBIN" ]; then
|
||||||
|
export PATH="$PATH:$DOTBIN"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Always try to use vi(m) if possible
|
||||||
|
export EDITOR="vi"
|
||||||
|
|
||||||
|
|
||||||
|
# Source Envs
|
||||||
|
DOTENVS="$HOME/.envs"
|
||||||
|
if [ -d "DOTENVS" ]; then
|
||||||
|
source "$DOTENVS/*.active"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Source Bashrc if BASH
|
||||||
|
if [ "$BASH" ] && [ -f ~/.bashrc ]; then
|
||||||
|
source ~/.bashrc
|
||||||
|
fi
|
24
profiles/main
Normal file
24
profiles/main
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
DOTFILES="$HOME/.dotfiles"
|
||||||
|
#Add DOTFILES/bin/ to PATH
|
||||||
|
DOTBIN="$HOME/.bin"
|
||||||
|
if [ -d "$DOTBIN" ]; then
|
||||||
|
export PATH="$PATH:$DOTBIN"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Always try to use vi(m) if possible
|
||||||
|
export EDITOR="vi"
|
||||||
|
|
||||||
|
|
||||||
|
# Source Envs
|
||||||
|
DOTENVS="$HOME/.envs"
|
||||||
|
if [ -d "DOTENVS" ]; then
|
||||||
|
source "$DOTENVS/*.active"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Source Bashrc if BASH
|
||||||
|
if [ "$BASH" ] && [ -f ~/.bashrc ]; then
|
||||||
|
source ~/.bashrc
|
||||||
|
fi
|
|
@ -1,8 +0,0 @@
|
||||||
deboone.nl,77.164.84.209 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBM3EGmy4OmHna1Uc4rgGKwN5V3Q+HoRBLy/tupM00+jJXc5lHwSvQl/aT+tQpl7XUGiXngh7bk3Oe4sZh7HWCbY=
|
|
||||||
lilo.science.ru.nl,131.174.30.57 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC9awcChQ7EDElJ/hwef2QRDsfvnFouo8WiJD+K3Vy4anfk9a4kQ3Ak8LleN3PS/IP7QAeLP2RzvKSXLk7GnREYNFNgFWWOUek2TEfJBiaBYTfbzfB9YY35jtJu0WOdecPOhMHQi1GpG8dOb2luRSjQyGBNRpKI7pXcUFtiEhW0AuQGhUuQSlEEzTLS8b/SxgvmMljyGHoMAVvicifKRf8/bcTUzN/ugT+dn0Lcc4B4WnHzsPW5CmqVmgiK/9fmUvkwijECqXRJQ97fdqb7kCq/Ej/0DJ60FPnrlATVR0X2HLUHRkiPHiitIWGx/aSDu/qAWdgwu+aze4nag8RDSZdX
|
|
||||||
marcur1 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEMpLrg7O3s1kMZmSyhie7ja6OPSqJTUtTsfRQsdUslFd8vlB9dvdMAY0LYHXCJR0/j42OY7UYCOmBjdHOnbxLA=
|
|
||||||
maclean.seaforth.nl,145.131.8.37 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBMPosqtPxx9vN1zY2vAt9zDf6O3NEGvZ253P+gs3ulZWje5bcGycQ/5CS5XW9PRQSHxFZyFYHLnZzqeAhYXAVwQ=
|
|
||||||
lilo3,131.174.30.32 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDdncNiGQyqKv0BnWYe2aRk7VqXjp4hJ0ZF7ofojx3/NH9g/09MwjbE/s490xNHV469FKW0AD+BtyymY5EJzdzZPhsfAkxWvIj15Ac6D/egyn/y23rSIFhIvRtgSOgn9NaALGj/SIs+BvFSrlaQGS+V1k3TlnSTM8s6kttIVH8DsMkjNYmD7dP3NFb2TTqeyvZY7GQZLifPu+jfqRParWQUrsBvkRtMjYDHF9RbQ5ohoc+Fxhu1qvUXbp9lUvI82xH9vT9KQ3Ose9rFfiMs0h99h6y1JTD3qkewpNrlNSrMAGOI2tE5a0X+ySTypisTHPhKUZQZWezFewhUMKCmrkEL
|
|
||||||
login.nikhef.nl,192.16.185.143 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAohtNecO6fqWD/7B08FyJi3nH4+IV638UAezsPkoPV4Ao8Vwo6X22M4MxmbpGJXIHMWiwdb++zVpaCC5nThPaUMZLAIgEj4RLDke5E1n5ZCTMYwyw1e6pMeCKCZAdfK6IAd7t1nklvr7iLelKkOH4bJgpTKFCW2+BZQ9MR5v4IAZuDK70KK7Y/h4G+oIDwrI0P+g9qkauV2f6+K3gFBundpb6doOQclI9s2dFGYrG29dxE8pcDU7xucrCDzYUVDnJ+SRPtcqle3wlgMNqJ4PPvmuADZmcglbGuuxgWc2Vn6hqaQWGG9LkIRCUd8OtLwjZ23rWJZUyzzwnSf9Ap+iziw==
|
|
||||||
seaforth.nl ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBMPosqtPxx9vN1zY2vAt9zDf6O3NEGvZ253P+gs3ulZWje5bcGycQ/5CS5XW9PRQSHxFZyFYHLnZzqeAhYXAVwQ=
|
|
||||||
walter.marie-curie.nl,131.174.31.27 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEMpLrg7O3s1kMZmSyhie7ja6OPSqJTUtTsfRQsdUslFd8vlB9dvdMAY0LYHXCJR0/j42OY7UYCOmBjdHOnbxLA=
|
|
1
ssh/ssh
1
ssh/ssh
|
@ -1 +0,0 @@
|
||||||
/home/edeboone/.dotfiles/ssh
|
|
1
startx
Normal file
1
startx
Normal file
|
@ -0,0 +1 @@
|
||||||
|
exec gnome
|
2639
vim/viminfo
Normal file
2639
vim/viminfo
Normal file
File diff suppressed because it is too large
Load diff
3
xinitrc
Normal file
3
xinitrc
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
exec unity
|
||||||
|
#exec xterm
|
||||||
|
#exec /usr/bin/gnome-session --session=unity
|
Loading…
Reference in a new issue