User Tools

Site Tools


home:computing:linux:config_files:bash

[up]

bash

.bashrc

# -*- mode: sh; -*-
 
umask 077
 
source ${HOME}/.bashd/env
source ${HOME}/.bashd/alias
source ${HOME}/.bashd/settings
 
if [[ "$-" =~ i ]] ; then
    cat <<EOF
\033[1;36m
     .-.
     /v\\
    // \\\\   Fear the Penguin!  
   /(   )\\
    ^^-^^
\033[32m
EOF
 
    fortune -a
    echo '\033[m'
fi

.bashd/env

# -*- mode: sh; -*-
 
export CZREN_BAK
export EDITOR='emacs -nw'
export EMAIL='...'
export LS_COLORS='no=00:fi=00:di=01;34:ln=04;31:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;33:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tbz2=00;31:*.mp4=00;32:*.png=00;35:*.webp=00;35:*.bmp=00;35:*.gif=00;35:*.jpg=00;35:*.jpeg=00;35:*.pcx=00;35:*.ppm=00;35:*.tif=00;35:*.xbm=00;35:*.xpm=00;35:*.wav=00;33:*.mp3=00;33:*.m4a=00;33:*.au=00;33:*.aiff=00;33:*.mid=00;33:*.voc=00;33:*~=40;37:*akefile=04;36:*EADME=04;36'
export PAGER='w3m'
export PAPERSIZE='a4'
export PATH="${HOME}/.local/bin:${HOME}/.local/czbin:${HOME}/.local/opt/python/bin:${PATH}"
export PYTHONPATH="${HOME}/.local/lib/python"
export REPLYTO='...'
export TEXINPUTS="${HOME}/.local/share/tex"
 
unset LANG
unset LC_ALL
export LC_COLLATE='POSIX'
export LC_DATE='POSIX'
export LC_CTYPE='en_GB.utf8'
export LC_NUMERIC='en_GB.utf8'
export LC_MONETARY='en_GB.utf8'
export LC_MESSAGES='en_GB.utf8'
export LC_PAPER='en_GB.utf8'
export LC_NAME='en_GB.utf8'
export LC_ADDRESS='en_GB.utf8'
export LC_TELEPHONE='en_GB.utf8'
export LC_MEASUREMENT='en_GB.utf8'
export LC_IDENTIFICATION='en_GB.utf8'

.bashd/alias

# -*- mode: sh; -*-
 
alias av-probe='av-probe -v'
alias bmount='sudo mount -o ro --bind'
alias bpwd='basename "`pwd`"'
alias cdc="cd .."
alias cdcc="cd ../.."
alias cdccc="cd ../../.."
alias cdcccc="cd ../../../.."
alias cdd="cd -"
alias cp="cp -vir"
alias cursor='echo "[?25h"'
alias df='df -h'
alias dfcolour="sed -e 's//^[/g' -e 's/\(^-.*\)/\1/' -e 's/\(^\+.*\)/\1/' -e 's/\(^@.*\)/\1/' -e 's/\(^Index.*\)/\1/' -e 's/\(^=.*\)/\1/' -e 's/\(^diff.*\)/\1/'"
alias dir="echo \'Tis not windows, you bastard\!"
alias downcase='ren d'
alias e='${EDITOR}'
alias ID3reset='eyeD3 --remove-all'
alias ID3tov2.4='eyeD3 --to-v2.4'
alias feh='feh -g+1280+0 -^ "%n [%u of %l] - %wx%h %S %t %z" -.'
alias fortune='fortune -a'
alias free='free -m'
alias g,-x='git update-index --chmod=-x'
alias g,+x='git update-index --chmod=+x'
alias g,mv='git mv'
alias gqview='echo you mean geeqie'
alias grep='egrep --color'
alias h='history'
alias hexdump='hexdump -C'
alias jobs='jobs -l'
alias journal='$EDITOR ~/.journal/index.org'
alias kill-xdg='killall xdg-desktop-portal-gnome'
alias less='less -R'
alias ls="ls -al --color=always"
alias more='more -f'
alias mplayer='mplayer -geometry +1280+0'
alias mv="mv -vi"
alias open='xdg-open'
alias pip3.9='python3.9 -m pip'
alias ps='ps -FH'
alias purify='ren p'
alias rm='rm -vI'
alias refresh='source ~/.bashrc'
alias rename='ren r'
alias renmul='ren i'
alias restrict-perms='chmod -R go-rwx .'
alias rsync='rsync -avz'
alias screen='screen -DR'
#alias todo='/bin/rm -f .done; touch .todo'
alias upcase='ren u'
alias vi="vim"
alias yt-dlp="yt-dlp --no-mtime --restrict-filenames"
alias zl="unzip -l"
 
function todo
{
    if [ $# == 0 ] ; then
        /bin/rm -f .done; touch .todo
    else
        for i in "$@" ; do
            cd $i
            pwd
            todo
            cd - > /dev/null
        done
    fi
}
 
function did
{
    if [ $# == 0 ] ; then
        /bin/rm -f .todo; touch .done
    else
        for i in "$@" ; do
            cd $i
            pwd
            did
            cd - > /dev/null
        done
    fi
}
 
function Tree
{
    tree -C "$@" | w3m
}
 
function mmdump
{
    mplayer -dumpstream -dumpfile "$1" "$2"
}
 
function mkcd
{
    mkdir $1 && cd $1
}
 
function _
{
    ( "$@" ) >& /dev/null &
    disown
}
 
function diff
{
    /usr/bin/diff -du "$@" | dfcolour | $PAGER
}
 
function rcd
{
    cd `recent $@`
}
 
function rr
{
    $@ `recent`
}
 
function rndls
{
    /bin/ls -1 $1 | shuf
}
 
function viewman
{
    nroff -man $1 | $PAGER
}
 
function av-dump
{
    mplayer $1 -dumpstream -dumpfile $2
}

.bashd/settings

# -*- mode: sh; -*-
 
PS1='\n\[\e[22;34m\]<\D{%a %d %b %Y %H:%M:%S}> \[\e[35m\]<$?> \[\e[31m\]<`tty | sed -e s:/dev/::`> \[\e[34m\]<\u@\h>\[\e[m\]\n\[\e[1;32m\]==> \w >\[\e[m\] '
PS2='\[\e[1;32m\]-->\[\e[m\] '
 
bind 'set colored-completion-prefix on'
bind 'set colored-stats on'
bind 'set completion-query-items 100000'
bind 'set page-completions off'
bind 'set show-all-if-ambiguous on'
bind 'set show-all-if-unmodified on'
bind 'set match-hidden-files off'
 
shopt -u dotglob
home/computing/linux/config_files/bash.txt · Last modified: 14:43 26/01/2025 by acz

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki