diff options
Diffstat (limited to 'configs/bashrc_home')
-rw-r--r-- | configs/bashrc_home | 139 |
1 files changed, 139 insertions, 0 deletions
diff --git a/configs/bashrc_home b/configs/bashrc_home new file mode 100644 index 0000000..ebc957c --- /dev/null +++ b/configs/bashrc_home @@ -0,0 +1,139 @@ +# ~/.bashrc: executed by bash(1) for non-login shells. +# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) +# for examples + +# If not running interactively, don't do anything +[ -z "$PS1" ] && return + +# don't put duplicate lines in the history. See bash(1) for more options +# don't overwrite GNU Midnight Commander's setting of `ignorespace'. +HISTCONTROL=$HISTCONTROL${HISTCONTROL+:}ignoredups +# ... or force ignoredups and ignorespace +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) + +# check the window size after each command and, if necessary, +# update the values of LINES and COLUMNS. +shopt -s checkwinsize + +# make less more friendly for non-text input files, see lesspipe(1) +#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" + +# set variable identifying the chroot you work in (used in the prompt below) +if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then + debian_chroot=$(cat /etc/debian_chroot) +fi + +# set a fancy prompt (non-color, unless we know we "want" color) +case "$TERM" in + xterm-color) color_prompt=yes;; +esac + +# 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 such + # a case would tend to support setf rather than setaf.) + color_prompt=yes + else + color_prompt= + fi +fi + +if [ "$color_prompt" = yes ]; then + PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' +else + PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' +fi +unset color_prompt force_color_prompt + +# If this is an xterm set the title to user@host:dir +case "$TERM" in +xterm*|rxvt*) + PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" + ;; +*) + ;; +esac + +alias ssh-htwk='ssh -C -X kain.imn.htwk-leipzig.de -l tuhlig' +alias sshfs-htwk='sshfs -C tuhlig@kain.imn.htwk-leipzig.de:/home/tuhlig' +alias ssh-wwws='ssh -C -X wwws.htwk-leipzig.de -l tuhlig' +alias ssh-petra='ssh -C upjetra.no-ip.org -L 5900:127.0.0.1:5900 -l toni' +alias ssh-petra-root='ssh -C upjetra.no-ip.org -L 5900:127.0.0.1:5900 -l root' +alias ssh-ddwrt='ssh -v -C -D 6666 ddwrt.local -l root' +alias ssh-imn='ssh -v -C portal.imn.htwk-leipzig.de -l dev0' +alias ssh-fimn='ssh -v -C fimndev.gruni23hh.net -l dev0' +# 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 grep='grep --color=auto' +fi + +# some more ls aliases +alias ll='ls -l' +alias la='ls -A' +alias l='ls -CF' + +# Alias definitions. +# You may want to put all your additions into a separate file like +# ~/.bash_aliases, instead of adding them here directly. +# See /usr/share/doc/bash-doc/examples in the bash-doc package. + +if [ -f ~/.bash_aliases ]; then + . ~/.bash_aliases +fi + +# enable programmable completion features (you don't need to enable +# this, if it's already enabled in /etc/bash.bashrc and /etc/profile +# sources /etc/bash.bashrc). +if [ -f /etc/bash_completion ] && ! shopt -oq posix; then + . /etc/bash_completion +fi + +export PATH="${PATH}:$HOME/bin" +DEBEMAIL="matzeton@googlemail.com" +DEBFULLNAME="Toni Uhlig" +export DEBEMAIL DEBFULLNAME +export CLICOLOR=TRUE + +alias vpn-htwk="sudo -- /usr/sbin/vpnc /etc/vpnc/htwk.conf" +alias vpn-end="sudo -- /usr/bin/killall -u root vpnc" +alias s2r="/usr/bin/xtrlock & /usr/sbin/s2ram --force" +alias android_adb="sudo /usr/sbin/android_adb.sh" +alias backup="rdiff-backup ~/Dokumente admin@obelix::/home/backup/pdp7" +export XIDLE_FILE=/tmp/disable_xidle +alias disable_xidle="touch ${XIDLE_FILE}" +alias enable_xidle="rm -f ${XIDLE_FILE}" +alias mktun="sudo openvpn --mktun --dev tap0 --user root" +alias star_wars="telnet towel.blinkenlights.nl" +alias irssi-agora='irssi-tor.sh cfyfz6afpgfeirst.onion 6667 segfault' +alias irssi-hackint='irssi-tor.sh 5ogdsfyoqk47ompu.onion 6697 segfault' +alias irssi-killyourirc='irssi-tor.sh e4bqnvfdasnx4plk.onion 6667 segfault' +alias irssi-onion='irssi-tor.sh cgl7owaxduu2eupi.onion 6667 segfault' +alias irssi-netsec='irssi-tor.sh netseclgxigdsvpj.onion 6697 segfault' +alias git-shortver="git log -n 1 | head -n 1 | sed -e 's/^commit //' | head -c" +alias chrome-telegram="/usr/lib/chromium/chromium --profile-directory=Default --app-id=clhhggbfdinjmjhajaheehoeibfljjno" +alias chrome-signal="/usr/lib/chromium/chromium --profile-directory=Default --app-id=bikioccmkafdpakkkcpdbppfkghcmihk" + +export _JAVA_AWT_WM_NONREPARENTING=1 + +if [ "x$TERM" = "xlinux" ]; then + tty | grep -qE 'tty1$' + if [ $? -eq 0 ] && [ $(id -u) -ne 0 ]; then + trap - SIGINT SIGTERM + startx -- vt7 + logout + fi +fi + |