Codebase list kali-defaults / e2cecae
Divert /etc/skel/.bashrc to provide a colorized prompt by default. Raphaël Hertzog 11 years ago
6 changed file(s) with 135 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
0 # ~/.bashrc: executed by bash(1) for non-login shells.
1 # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
2 # for examples
3
4 # If not running interactively, don't do anything
5 case $- in
6 *i*) ;;
7 *) return;;
8 esac
9
10 # don't put duplicate lines or lines starting with space in the history.
11 # See bash(1) for more options
12 HISTCONTROL=ignoreboth
13
14 # append to the history file, don't overwrite it
15 shopt -s histappend
16
17 # for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
18 HISTSIZE=1000
19 HISTFILESIZE=2000
20
21 # check the window size after each command and, if necessary,
22 # update the values of LINES and COLUMNS.
23 shopt -s checkwinsize
24
25 # If set, the pattern "**" used in a pathname expansion context will
26 # match all files and zero or more directories and subdirectories.
27 #shopt -s globstar
28
29 # make less more friendly for non-text input files, see lesspipe(1)
30 #[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
31
32 # set variable identifying the chroot you work in (used in the prompt below)
33 if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
34 debian_chroot=$(cat /etc/debian_chroot)
35 fi
36
37 # set a fancy prompt (non-color, unless we know we "want" color)
38 case "$TERM" in
39 xterm-color) color_prompt=yes;;
40 esac
41
42 # uncomment for a colored prompt, if the terminal has the capability; turned
43 # off by default to not distract the user: the focus in a terminal window
44 # should be on the output of commands, not on the prompt
45 force_color_prompt=yes
46
47 if [ -n "$force_color_prompt" ]; then
48 if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
49 # We have color support; assume it's compliant with Ecma-48
50 # (ISO/IEC-6429). (Lack of such support is extremely rare, and such
51 # a case would tend to support setf rather than setaf.)
52 color_prompt=yes
53 else
54 color_prompt=
55 fi
56 fi
57
58 if [ "$color_prompt" = yes ]; then
59 PS1='${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
60 else
61 PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
62 fi
63 unset color_prompt force_color_prompt
64
65 # If this is an xterm set the title to user@host:dir
66 case "$TERM" in
67 xterm*|rxvt*)
68 PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
69 ;;
70 *)
71 ;;
72 esac
73
74 # enable color support of ls and also add handy aliases
75 if [ -x /usr/bin/dircolors ]; then
76 test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
77 alias ls='ls --color=auto'
78 #alias dir='dir --color=auto'
79 #alias vdir='vdir --color=auto'
80
81 #alias grep='grep --color=auto'
82 #alias fgrep='fgrep --color=auto'
83 #alias egrep='egrep --color=auto'
84 fi
85
86 # some more ls aliases
87 #alias ll='ls -l'
88 #alias la='ls -A'
89 #alias l='ls -CF'
90
91 # Alias definitions.
92 # You may want to put all your additions into a separate file like
93 # ~/.bash_aliases, instead of adding them here directly.
94 # See /usr/share/doc/bash-doc/examples in the bash-doc package.
95
96 if [ -f ~/.bash_aliases ]; then
97 . ~/.bash_aliases
98 fi
99
100 # enable programmable completion features (you don't need to enable
101 # this, if it's already enabled in /etc/bash.bashrc and /etc/profile
102 # sources /etc/bash.bashrc).
103 if ! shopt -oq posix; then
104 if [ -f /usr/share/bash-completion/bash_completion ]; then
105 . /usr/share/bash-completion/bash_completion
106 elif [ -f /etc/bash_completion ]; then
107 . /etc/bash_completion
108 fi
109 fi
0 kali-defaults (0.8) kali; urgency=low
1
2 * Divert /etc/skel/.bashrc to provide a colorized prompt by default.
3
4 -- Raphaël Hertzog <[email protected]> Thu, 28 Feb 2013 17:05:46 +0100
5
06 kali-defaults (0.7) kali; urgency=low
17
28 * Extend kali's dconf defaults to setup two launchers in the GNOME Panel.
00 kali-tweaks.gschema.override usr/share/glib-2.0/schemas/
11 52kali_noautomount etc/X11/Xsession.d/
2 .bashrc usr/share/kali-defaults
23 browser/kali.js etc/iceweasel/pref/
34 browser/bookmarks.html usr/share/kali-defaults
45 browser/localstore.rdf usr/share/kali-defaults
22 set -e
33
44 if [ "$1" = "configure" ]; then
5 for file in /etc/iceweasel/profile/localstore.rdf /etc/iceweasel/profile/bookmarks.html
5 for file in /etc/iceweasel/profile/localstore.rdf /etc/iceweasel/profile/bookmarks.html \
6 /etc/skel/.bashrc
67 do
78 orig_file="/usr/share/kali-defaults/$(basename $file)"
89 if [ ! -e $file ] && [ -e $orig_file ]; then
2020
2121 case "$1" in
2222 remove)
23 for file in /etc/iceweasel/profile/localstore.rdf /etc/iceweasel/profile/bookmarks.html
23 for file in /etc/iceweasel/profile/localstore.rdf \
24 /etc/iceweasel/profile/bookmarks.html \
25 /etc/skel/.bashrc
2426 do
2527 rm -f $file
2628 dpkg-divert --rename --package kali-defaults \
1313 # the debian-policy package
1414
1515 setup_diversions() {
16 for file in /etc/iceweasel/profile/localstore.rdf /etc/iceweasel/profile/bookmarks.html
16 for file in "$@"
1717 do
1818 dpkg-divert --rename --package kali-defaults \
1919 --divert $file.original \
2121 done
2222 }
2323
24 TO_DIVERT="
25 /etc/iceweasel/profile/localstore.rdf
26 /etc/iceweasel/profile/bookmarks.html
27 /etc/skel/.bashrc
28 "
29
2430 case "$1" in
2531 install)
26 setup_diversions
32 setup_diversions $TO_DIVERT
2733 ;;
2834
2935 upgrade)
3036 if dpkg --compare-versions "$2" lt 0.5; then
31 setup_diversions
37 setup_diversions /etc/iceweasel/profile/localstore.rdf \
38 /etc/iceweasel/profile/bookmarks.html
39 fi
40 if dpkg --compare-versions "$2" lt 0.8; then
41 setup_diversions /etc/skel/.bashrc
3242 fi
3343 ;;
3444