Commit 0521f069 authored by Jørn Åne's avatar Jørn Åne Committed by Jørn Åne

Initial files and make-script.

parents
prefix=~
dotfiles:
install: dotfiles
install -m 0644 tcshrc $(prefix)/.tcshrc
install -m 0644 bash_profile $(prefix)/.bash_profile
install -m 0644 bashrc $(prefix)/.bashrc
install -m 0644 zshenv $(prefix)/.zshenv
# The best dotfiles, it's true!
## Installation
Run as the user you intend to install the dotfiles for:
make install
# .bash_profile
[[ -r ~/.bashrc ]] && . ~/.bashrc
[[ -r ~/.profile ]] && . ~/.profile
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
alias ll='ls -ahl'
alias ..=' cd ..'
alias ...=' cd ../..'
alias ....=' cd ../../..'
alias .....=' cd ../../../..'
alias ......=' cd ../../../../..'
alias .......=' cd ../../../../../..'
alias ........=' cd ../../../../../../..'
alias .........=' cd ../../../../../../../..'
# Disable systemctl's auto-paging feature:
export SYSTEMD_PAGER=
c_reset='\[\e[0m\]'
c_user='\[\e[0;1m\]'
c_host='\[\e[0m\]'
c_upath='\[\e[0;44;37;1m\]'
c_rpath='\[\e[0;41;37;1m\]'
c_root='\[\e[0;1;31m\]'
if [ "$PS1" ]; then
if [ "$UID" == "0" ]
then
c_path="${c_rpath}"
b_prompt='# '
else
c_path="${c_upath}"
b_prompt='$ '
fi
fi
PS1="\n${c_reset}${c_user}\u${c_reset}@${c_host}\h${c_reset}:${c_path}\w${c_reset}\n${b_prompt}"
# .tcshrc
if ( -f .cshrc ) source .cshrc
alias ll ls -ahl
alias .. cd ..
alias ... cd ../..
alias .... cd ../../..
alias ..... cd ../../../..
alias ...... cd ../../../../..
alias ....... cd ../../../../../..
alias ........ cd ../../../../../../..
alias ......... cd ../../../../../../../..
setenv PAGER less
setenv EDITOR vim
setenv VISUAL less
# bind keypad keys for console, vt100, vt102, xterm
bindkey "\e[1~" beginning-of-line # Home
bindkey "\e[2~" overwrite-mode # Ins
bindkey "\e[3~" delete-char # Delete
bindkey "\e[4~" end-of-line # End
bindkey "\e[5C" forward-word
bindkey "\e[5D" backward-word
bindkey "\e[1;5C" forward-word
bindkey "\e[1;5D" backward-word
# for rxvt
bindkey "\e[7~" beginning-of-line # Home rxvt
bindkey "\e[8~" end-of-line # End rxvt
# for non RH/Debian xterm, can't hurt for RH/DEbian xterm
bindkey "\eOH" beginning-of-line
bindkey "\eOF" end-of-line
# for freebsd console
bindkey "\e[H" beginning-of-line
bindkey "\e[F" end-of-line
if ($?prompt) then
if (-x /usr/bin/id && `/usr/bin/id -u` == 0) then
set c_path="37;41"
set b_prompt='# '
else
set c_path="37;44"
set b_prompt='%% '
endif
set prompt="\n%B%n%b@%m:%B%{\033[${c_path}m%}%~%b\n${b_prompt}"
endif
# .zshenv
alias ll='ls -ahl'
alias ..=' cd ..'
alias ...=' cd ../..'
alias ....=' cd ../../..'
alias .....=' cd ../../../..'
alias ......=' cd ../../../../..'
alias .......=' cd ../../../../../..'
alias ........=' cd ../../../../../../..'
alias .........=' cd ../../../../../../../..'
export PAGER=less
export EDITOR=vim
export VISUAL=vim
# Disable systemctl's auto-paging feature:
export SYSTEMD_PAGER=
# bind keypad keys for console, vt100, vt102, xterm
bindkey "\e[1~" beginning-of-line # Home
#bindkey "\e[2~" overwrite-mode # Ins
bindkey "\e[3~" delete-char # Delete
bindkey "\e[4~" end-of-line # End
bindkey "\e[5~" up-line-or-search # Pgup
bindkey "\e[6~" down-line-or-search # Pgdown
bindkey "\e[5C" forward-word
bindkey "\e[5D" backward-word
bindkey "\e[1;5C" forward-word
bindkey "\e[1;5D" backward-word
# for rxvt
bindkey "\e[7~" beginning-of-line # Home rxvt
bindkey "\e[8~" end-of-line # End rxvt
# for non RH/Debian xterm, can't hurt for RH/DEbian xterm
bindkey "\eOH" beginning-of-line
bindkey "\eOF" end-of-line
# for freebsd console
bindkey "\e[H" beginning-of-line
bindkey "\e[F" end-of-line
[[ "$UID" = "0" ]] && prompt_color=red || prompt_color=blue
PROMPT="
%B%n%b@%M:%B%K{$prompt_color}%~%k%b
%# "
HISTFILE=~/.zsh_history
SAVEHIST=65535
autoload -Uz compinit
compinit
zstyle ':completion:*' menu select
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment