1 # check the window size after each command and, if necessary,
2 # update the values of LINES and COLUMNS.
6 export Cyan="\[\e[m\]\[\e[0;36m\]"
7 export Red="\[\e[m\]\[\e[0;31m\]"
8 export LightCyan="\[\e[m\]\[\e[1;36m\]"
9 export LightRed="\[\e[m\]\[\e[1;31m\]"
10 export white="\[\e[0;37m\]"
16 let promptsize=$(echo -n "╒═[ $newPWD ]}╗" | wc -c | tr -d " ")
18 let fillsize=${width}-${promptsize}-1
22 while [ "$fillsize" -gt "0" ]
25 let fillsize=${fillsize}-${promptsize}
28 if [ $helping == $fillsize ]
30 let cutt=3-${fillsize}
31 newPWD="...$(echo -n $PWD | sed -e "s/\(^.\{$cutt\}\)\(.*\)/\2/")"
46 PROMPT_COMMAND=pre_prompt
49 PS1=" ${cBorder}╒═${cBorder}═[ ${cText}\$newPWD${cBorder} ]\${fill}╕\n ${cBorder}└${cBorder}> ${white}"
51 # To enable the settings / commands in this file for login shells as well,
52 # this file has to be sourced in /etc/profile.
54 # If not running interactively, don't do anything
55 [ -z "$PS1" ] && return
57 # set variable identifying the chroot you work in (used in the prompt below)
58 #if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
59 # debian_chroot=$(cat /etc/debian_chroot)
62 # set a fancy prompt (non-color, overwrite the one in /etc/profile)
63 #PS1='\[\e[0;32m\]\u@\h:\w\$\[\e[1;37m\] '
64 #PS1='\[\e[0;36m\]\w\$\[\e[0;37m\] '
65 #export PROMPT_COMMAND='cwd=${PWD%/}; thisdir="$(echo $cwd | sed '\''s/.*\///'\'')"; dirparts="${cwd:0:$((${#cwd} - ${#thisdir}))}"; dirparts="$(echo ${dirparts%/} | sed '\''s/\//\\[\\e[0;33m\\]\/\\[\\e[32m\\]/g'\'')"; rc=${PWD%/}; rc=${rc:0:1}; PS1="\[\e]0;${cwd}/\007\e[1;36m\][\[\e[0;36m\]$(date "+%I:%M:%S %p")\[\e[1m\]] ${dirparts}\[\e[0;33m\]${rc}\[\e[1;34m\]${thisdir}\[\e[0;33m\]/\[\e[1;33m\] %\[\e[0m\] "'
67 # enable bash completion in interactive shells
68 if [ -f /etc/bash_completion ]; then
69 . /etc/bash_completion
72 export TERM=xterm-256color
76 #delete all files except $1, now works with directories and with rm -r
78 if [ "$1" == "-rf" ] || [ "$1" == "-Rf" ];
84 c=$(echo $a | grep -o "/" | wc -w);
85 if [ $c -eq 0 ]; then a=./$a; c=1; fi
86 cd $(echo $a | cut -d / -f 1-$c);
87 rm $p `ls -1 --color=none | grep -vxF $(echo $a | cut -d / -f $(echo $[c+=1]))`;
91 #find out ATI card temperature and set fan speed
92 function teplota { LD_PRELOAD=libXinerama.so.1 aticonfig --od-gettemperature; }
93 function fan() { aticonfig --pplib-cmd "set fanspeed 0 $1"; }
96 alias ls="ls --color -h"
97 #alias editt="sudo vi /usr/share/themes/openbox_cinan/openbox-3/themerc"
98 #alias pal="xterm -hold -bg black -fg white -geometry 37x12 -e pal"
99 alias pacman="pacman-color"
102 alias grep="grep --colour -i"
103 alias rubysearch="ruby ~/skripty/search_interface.rb"
104 alias vi="vim -u ~/.vimrc"
106 alias rtorrent="rtorrent -o http_capath=/etc/ssl/certs"
107 alias smplayer="smplayer 2>/dev/null"
108 alias f="cd /media/data/filmy"
109 alias F="cd /media/data"
110 alias d="cd /media/data2"
111 alias D="cd /media/data2/download"
112 alias "true-combat"="fan 50; true-combat.alsa; fan 3;"
113 alias soffice="env GTK2_RC_FILES=/usr/share/themes/Redmond/gtk-2.0/gtkrc env OOO_FORCE_DESKTOP=gnome soffice"
114 alias t="vim -c :TodoOpen -c :q"