diff options
Diffstat (limited to '.config')
-rw-r--r-- | .config/X11/clientrc | 27 | ||||
-rw-r--r-- | .config/X11/defaults | 18 | ||||
-rw-r--r-- | .config/X11/login | 9 | ||||
-rw-r--r-- | .config/X11/modmap | 7 | ||||
-rw-r--r-- | .config/X11/serverrc | 6 | ||||
-rw-r--r-- | .config/bash/aliases.sh | 59 | ||||
-rw-r--r-- | .config/bash/login.sh | 9 | ||||
-rw-r--r-- | .config/bash/logout.sh | 9 | ||||
-rw-r--r-- | .config/bash/rc.d/emacs.sh | 8 | ||||
-rw-r--r-- | .config/bash/rc.sh | 80 |
10 files changed, 232 insertions, 0 deletions
diff --git a/.config/X11/clientrc b/.config/X11/clientrc new file mode 100644 index 0000000..d1e1725 --- /dev/null +++ b/.config/X11/clientrc @@ -0,0 +1,27 @@ +#!/bin/sh +# +# ~/.xinitrc +# +# Executed by startx (run your window manager from here) + +if [ -d /etc/X11/xinit/xinitrc.d ]; then + echo ' ==> Running scripts in Entering xinitrc.d/*' + for f in /etc/X11/xinit/xinitrc.d/*; do + echo " -> $f" + [ -x "$f" ] && "$f" & + done + unset f + echo ' -> done' +fi + +usermodmap="$XDG_CONFIG_HOME/X11/modmap" +if [ -f "$usermodmap" ]; then + xmodmap "$usermodmap" +fi + +# exec gnome-session +# exec startkde +# exec startxfce4 +# ...or the Window Manager of your choice +#export WMII_CONFPATH="$XDG_CONFIG_HOME/wmii" +exec wmii diff --git a/.config/X11/defaults b/.config/X11/defaults new file mode 100644 index 0000000..ceabc5c --- /dev/null +++ b/.config/X11/defaults @@ -0,0 +1,18 @@ +URxvt.background: #000000 +URxvt.foreground: #CCCCCC + +URxvt.scrollstyle: plain +URxvt.scrollBar_floating: true + +URxvt.font: xft:Monospace-8 +URxvt.cursorBlink: true +URxvt.termName: xterm-256color +URxvt.pastableTabs: true + +URxvt.scrollTtyOutput: false +URxvt.scrollTtyKeypress: false +URxvt.scrollWithBuffer: true + +URxvt.perl-ext-common: default,matcher +URxvt.urlLauncher: v-www-browser +URxvt.matcher.button: 1 diff --git a/.config/X11/login b/.config/X11/login new file mode 100644 index 0000000..03bad2a --- /dev/null +++ b/.config/X11/login @@ -0,0 +1,9 @@ +#!/bin/sh + +# +# ~/.xsession +# +# Executed by xdm/gdm/kdm at login +# + +/bin/bash --login -i ~/.xinitrc diff --git a/.config/X11/modmap b/.config/X11/modmap new file mode 100644 index 0000000..e4ade24 --- /dev/null +++ b/.config/X11/modmap @@ -0,0 +1,7 @@ +remove lock = Caps_Lock +keysym Caps_Lock = Super_L + +keycode 135 = Super_R + +clear mod4 +add mod4 = Super_L Super_R Hyper_L Hyper_R Menu diff --git a/.config/X11/serverrc b/.config/X11/serverrc new file mode 100644 index 0000000..d6c6ffc --- /dev/null +++ b/.config/X11/serverrc @@ -0,0 +1,6 @@ +#!/bin/bash + +VT=vt07 +#VT=$(tty|sed 's@/dev/tty@vt@') + +exec /usr/bin/X -nolisten tcp "$VT" "$@" diff --git a/.config/bash/aliases.sh b/.config/bash/aliases.sh new file mode 100644 index 0000000..8241b95 --- /dev/null +++ b/.config/bash/aliases.sh @@ -0,0 +1,59 @@ +#!/bin/bash +# The above line probably should never be *used* in this file, but it +# lets text editors know that this is BASH syntax. + +###################################################################### +# Set up colors and settings for ls/dir/vdir # +###################################################################### +if [ -x "`which dircolors`" ]; then + eval "`dircolors -b`" + alias ls='ls -1v --color=auto' + alias dir='dir -v --color=auto' + alias vdir='vdir -v--color=auto' + + for xgrep in ${PATH//:/\/*grep }/*grep; do + if [ -f "$xgrep" ]; then + xgrep=`basename "$xgrep"` + if [ "$xgrep" != pgrep ]; then + alias $xgrep="$xgrep --color=auto" + fi + fi + done +else + alias ls='ls -1v' + alias dir='dir -v' + alias vdir='vdir -v' +fi + +###################################################################### +# Set up the standard aliases for ls # +###################################################################### +alias ll='ls -l' +alias la='ls -a' +alias l='ls -CF' + +###################################################################### +# Some preferences for miscellaneous stuff # +###################################################################### +#alias rm='gvfs-trash' +alias ssh='ssh -XC' +alias sed='sed --follow-symlinks' +alias tree='tree --charset utf8' +alias cd=pushd +alias gitk='gitk --all --date-order' + +###################################################################### +# Remember lat/long for redshift # +###################################################################### +redshift='redshift -l39.9030:85.9979' +alias gtk-redshift="gtk-$redshift" +alias redshift="$redshift" +unset redshift + +###################################################################### +# Some almost-function aliases # +###################################################################### +xterm-title() { echo "];$@"; } # Oh, wait this one *is* a function +alias lock="clear; away -C 'This terminal is locked'" +alias plock="xterm-title Terminal Locked;lock" +mvln() { mv $1 $2; ln -s $2 $1; } diff --git a/.config/bash/login.sh b/.config/bash/login.sh new file mode 100644 index 0000000..1269a03 --- /dev/null +++ b/.config/bash/login.sh @@ -0,0 +1,9 @@ +# ~/.bash_login: executed by bash(1) when login shell starts. + +# I think this is sane default behavior + +# Load user settings +. "$HOME/.profile" + +# Load bash settings (automatic for non-login shells) +. "$HOME/.bashrc" diff --git a/.config/bash/logout.sh b/.config/bash/logout.sh new file mode 100644 index 0000000..a8b88c1 --- /dev/null +++ b/.config/bash/logout.sh @@ -0,0 +1,9 @@ +# ~/.bash_logout: executed by bash(1) when login shell exits. + +# when leaving the console clear the screen to increase privacy + +if [ "$SHLVL" = 1 ]; then + [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q +fi + +make -C "$HOME" diff --git a/.config/bash/rc.d/emacs.sh b/.config/bash/rc.d/emacs.sh new file mode 100644 index 0000000..f484bbb --- /dev/null +++ b/.config/bash/rc.d/emacs.sh @@ -0,0 +1,8 @@ +case "$TERM" in + eterm*) + SELECTED_EDITOR='emacsclient' + EDITOR=$SELECTED_EDITOR + VISUAL=$SELECTED_EDITOR + export SELECTED_EDITOR EDITOR VISUAL + :;; +esac diff --git a/.config/bash/rc.sh b/.config/bash/rc.sh new file mode 100644 index 0000000..ed55f75 --- /dev/null +++ b/.config/bash/rc.sh @@ -0,0 +1,80 @@ +# ~/.bashrc: executed by bash(1) for non-login shells. +# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) +# for examples + +# I include this file for all interactive invocations of bash(1), whether +# they are login shells or not. + +# 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 +export HISTCONTROL=ignoredups +export HISTFILE=${XDG_CACHE_HOME}/bash/history +export HISTTIMEFORMAT='[%Y-%m-%d %H:%M] ' +shopt -s histappend # append to the history file, don't overwrite it + +shopt -s checkwinsize # update the values of LINES and COLUMNS +shopt -s globstar # Let ** recursively scan directories + +# Why is this not on by default? +# "We have a cached value, but it isn't valid anymore. Should we trash it?" +shopt -s checkhash + +# make less more friendly for non-text input files, see lesspipe(1) +[ -x "`which lesspipe 2>/dev/null`" ] && 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 + +make_prompt() { + local RESET='' + local BOLD='' + local GREEN='' + local BLUE='' + if $1; then + RESET="$(tput sgr0)" + BOLD="$(tput bold)" + GREEN="$(tput setaf 2)" + BLUE="$(tput setaf 4)" + fi + local CHROOT='${debian_chroot:+($debian_chroot)}' + echo "${RESET}${BOLD}${CHROOT}${GREEN}"'\u@\h'"${RESET}:${BOLD}${BLUE}"'\w'"${RESET}" +} + +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.) + PS1="$(make_prompt true )"'\n\$ ' +else + PS1="$(make_prompt false)"'\n\$ ' +fi + +# If this is an xterm set the title to user@host:dir +case "$TERM" in + xterm*|rxvt*) + PS1="\[\e]0;$(make_prompt false)\a\]$PS1";; +esac + +unset make_prompt + +# Include modular config files +if [ -d "${XDG_CONFIG_HOME}/rc.d" ]; then + for file in "${XDG_CONFIG_HOME}/rc.d"/*.sh; do + . "$file" + done +fi + +if [ -f ${XDG_CONFIG_HOME}/bash/aliases.sh ]; then + . ${XDG_CONFIG_HOME}/bash/aliases.sh +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 ]; then + . /etc/bash_completion +fi |