.bashrc
Code: Select all
# Bash startup file
# bocke, 2012, bocke <at> slackware-srbija <dot> org.
# If not running interactively (ie: script), exit immediately.
[ -z "$PS1" ] && return
# Source color definitions
[ -f ~/.bash_colors ] && source ~/.bash_colors
# Add custom paths to the PATH
PATH="$PATH:$HOME/.local/bin"
MANPATH="$MANPATH:$HOME/.local/man"
export GTK2_RC_FILES=$HOME/.gtkrc-2.0
# Are we on Slack? (not crack)
if [ -f /etc/slackware-version ]
then
# I used to use this for Slack specific options when I dual
# booted with Arch. It doesn't hurt to leave it here.
export SLACK=1
fi
# Fancy shell prompt
PS1="\n[\[${TXTGRN}\]\j\[${TXTRST}\]][$(tty)][\[$TXTGRN\]\u\[$TXTRST\]][\w] (\A)\n \[${TXTGRN}\]~>\[${TXTRST}\] "
# Set some usual suspects
EDITOR=ex
VISUAL=vim
PAGER=less
LESS="-R"
export LESS PAGER VISUAL EDITOR
# Bash options
shopt -s checkwinsize
shopt -s huponexit
shopt -s cdable_vars
shopt -s extglob
set -C
set -o vi
set -m
# Set terminal type depending on if X is started or not
if [ -z "$DISPLAY" ]; then
export TERM='linux'
else
export TERM='rxvt'
PROMPT_COMMAND='echo -ne "\033]0;${PWD}\007"'
fi
# Set transparency for xterm/uxterm
[ -n "$XTERM_VERSION" ] && transset-df -a 0.8 >/dev/null
# Set the default browser depending on if X is started or not
if [ -n "$DISPLAY" ]; then
export BROWSER=firefox
else
export BROWSER=links
fi
# This is optional on Slack, so we better check.
COMPLETITION=$(type -t complete)
if [ $COMPLETITION == builtin ]
then
complete -cf man
fi
# Aliases
alias ls="ls --color"
alias lsl="ls -lhS --group-directories-first"
alias lsd="ls -d */"
alias lsn="ls --color=never"
alias dir="dir --color"
alias dirn="dir --color=never"
alias d="dir"
alias du="du -h"
alias df="df -h"
alias free="free -m"
alias grep="grep --color"
alias grepn="grep --color=never"
unset SLACK
Code: Select all
# Definicije boja
TXTBLK='\e[0;30m' # Black - Regular
TXTRED='\e[0;31m' # Red
TXTGRN='\e[0;32m' # Green
TXTYLW='\e[0;33m' # Yellow
TXTBLU='\e[0;34m' # Blue
TXTPUR='\e[0;35m' # Purple
TXTCYN='\e[0;36m' # Cyan
TXTWHT='\e[0;37m' # White
BLDBLK='\e[1;30m' # Black - Bold
BLDRED='\e[1;31m' # Red
BLDGRN='\e[1;32m' # Green
BLDYLW='\e[1;33m' # Yellow
BLDBLU='\e[1;34m' # Blue
BLDPUR='\e[1;35m' # Purple
BLDCYN='\e[1;36m' # Cyan
BLDWHT='\e[1;37m' # White
UNDBLK='\e[4;30m' # Black - Underline
UNDRED='\e[4;31m' # Red
UNDGRN='\e[4;32m' # Green
UNDYLW='\e[4;33m' # Yellow
UNDBLU='\e[4;34m' # Blue
UNDPUR='\e[4;35m' # Purple
UNDCYN='\e[4;36m' # Cyan
UNDWHT='\e[4;37m' # White
BAKBLK='\e[40m' # Black - Background
BAKRED='\e[41m' # Red
BAKGRN='\e[42m' # Green
BAKYLW='\e[43m' # Yellow
BAKBLU='\e[44m' # Blue
BAKPUR='\e[45m' # Purple
BAKCYN='\e[46m' # Cyan
BAKWHT='\e[47m' # White
TXTRST='\e[0m' # Text Reset
Code: Select all
export LANG=en_US.utf8
export LC_COLLATE=sr_RS@latin
export LC_CTYPE=sr_RS@latin
export LC_MEASUREMENT=sr_RS@latin
export LC_MONETARY=sr_RS@latin
export LC_NUMERIC=sr_RS@latin
export LC_PAPER=sr_RS@latin
export LC_TELEPHONE=sr_RS@latin
export LC_TIME=sr_RS@latin
Code: Select all
#
# ~/.bash_profile
#
[[ -f ~/.bashrc ]] && . ~/.bashrc
Code: Select all
" vimrc, bocke, bocke <at> slackware-srbija <dot> org, 2012
" Let vim options override vi-like behaviour where appropriate
set nocompatible
" Vim under Slack needed this before. Might not be needed anymore.
set encoding=utf-8
" Mouse support under all modes
set mouse=a
" Options with a value
set backspace=indent,eol,start
set tabstop=4
set shiftwidth=4
set laststatus=2
set cmdheight=1
set foldlevel=3
set report=0
set numberwidth=2
set viminfo="1000,<1000,s1000,:1000,%1000,
" Options without a value
set showfulltag
set showcmd
set showmode
set number
set showmatch
set hlsearch
set incsearch
set ignorecase
set autoindent
set cindent
set ruler
set foldenable
set linebreak
" Fancy status line
set statusline=%F%m%w\ %y\ ff:%{&ff}\ l:%02l,r:%02c\ t:%02L
" Don't polute current path with *~. Create them in a specific dir
set backupdir=/home/bocke/.backup
" Enhance command completition with a nice textual menu
set wildmenu
" Give me the pretty colors!
syntax on
" Set the color scheme
if has("gui_running")
" colorscheme desert
colorscheme wombat
set guifont=DejaVuSansMono
set guioptions=emirv
set showtabline=2
set noguipty
set mousemodel=popup
else
let has_x = $DISPLAY
if strlen(has_x) " Theme to use in XTerm
set t_Co=256
colorscheme desert256
else
" Console colorscheme
colorscheme blue
endif
endif
" Vundle
set rtp+=~/.vim/bundle/vundle
call vundle#rc()
Bundle 'gmarik/vundle'
" Bundles from github
Bundle 'gregsexton/MatchTag'
Bundle 'mattn/sonictemplate-vim'
Bundle 'spolu/dwm.vim'
Bundle 'mbbill/undotree'
Bundle 'mbbill/code_complete'
Bundle 'scrooloose/syntastic'
Bundle 'scrooloose/nerdtree'
Bundle 'scrooloose/vim-fugitive'
Bundle 'msanders/snipmate.vim'
Bundle 'tpope/vim-git'
" Bundles from vim scripts git repo
Bundle 'vim-dokuwiki'
" Themes
Bundle 'rainux/vim-desert-warm-256'
Bundle 'jelera/vim-gummybears-colorscheme'
Bundle 'nielsmadan/harlequin'
Bundle 'goatslacker/mango.vim'
Bundle 'mbbill/desertEx'
Bundle 'tpope/vim-vividchalk'
Code: Select all
!! Tell Athena widgets to use rectangle shapes where possible
*shapeStyle: Rectangle
!! Xfs settings
Xft.dpi: 96
Xft.antialias: 1
Xft.hinting: 1
Xft.hintstyle: hintfull
Xft.lcdfilter: lcddefault
Xft.rgba: rgb
Xft.autohint: 0
!! XTerm Settings
XTerm*customization: -color
Xterm*geometry: 80x25
XTerm*faceName: DejaVuSansMono
XTerm*faceSize: 10
XTerm*fontWarning: 2
XTerm*ScrollBar: false
XTerm*rightScrollbar: true
XTerm*jumpScroll: true
XTerm*fastScroll: true
XTerm*scrollKey: true
XTerm*resizeGravity: SouthWest
! Color settings
XTerm*dynamicColors: true
XTerm*foreground: #ffffff
XTerm*background: grey20
XTerm*cursorColor: lightblue
XTerm*ScrollBar*foreground: black
XTerm*ScrollBar*background: grey20
! XTerm Color Scheme
XTerm*color0: black
XTerm*color1: red3
XTerm*color2: green3
XTerm*color3: yellow3
XTerm*color4: darkblue
XTerm*color5: magenta3
XTerm*color6: cyan3
XTerm*color7: gray90
XTerm*color8: gray30
XTerm*color9: red
XTerm*color10: green
XTerm*color11: yellow
XTerm*color12: lightblue
XTerm*color13: magenta
XTerm*color14: cyan
XTerm*color15: #ffffff
! binding overrides
XTerm*Text.Translations: #overrride\n\
<Btn4Down>: scroll-one-line-down()\n\
<Btn5Down>: scroll-one-line-up()\n
!! XTerm Settings
UXTerm*customization: -color
UXTerm*geometry: 80x25
UXTerm*faceName: DejaVuSansMono
UXTerm*faceSize: 10
UXTerm*fontWarning: 2
UXTerm*ScrollBar: false
UXTerm*rightScrollbar: true
UXTerm*jumpScroll: true
UXTerm*fastScroll: true
UXTerm*scrollKey: true
UXTerm*resizeGravity: SouthWest
! Color settings
UXTerm*dynamicColors: true
UXTerm*foreground: #ffffff
UXTerm*background: grey20
UXTerm*cursorColor: lightblue
UXTerm*ScrollBar*foreground: black
UXTerm*ScrollBar*background: grey20
! UXTerm Color Scheme
UXTerm*color0: black
UXTerm*color1: red3
UXTerm*color2: green3
UXTerm*color3: yellow3
UXTerm*color4: darkblue
UXTerm*color5: magenta3
UXTerm*color6: cyan3
UXTerm*color7: gray90
UXTerm*color8: gray30
UXTerm*color9: red
UXTerm*color10: green
UXTerm*color11: yellow
UXTerm*color12: lightblue
UXTerm*color13: magenta
UXTerm*color14: cyan
UXTerm*color15: #ffffff
! binding overrides
UXTerm*Text.Translations: #overrride\n\
<Btn4Down>: scroll-one-line-down()\n\
<Btn5Down>: scroll-one-line-up()\n
!! Rxvt
Rxvt*jumpScroll: True
Rxvt*scrollBar: True
Rxvt*scrollBar_right: True
Rxvt*scrollTtyOutput: True
Rxvt*scrollWithBuffer: True
Rxvt*smallfont_key: -
Rxvt*bigfont_key: +
Rxvt*saveLines: 512
Rxvt*internalBorder: 4
Rxvt*externalBorder: 4
Rxvt*geometry: 80x25
Rxvt*faceName: DejaVuSansMono
Rxvt*faceSize: 10
! Color scheme
Rxvt*color0: black
Rxvt*color1: red3
Rxvt*color2: green3
Rxvt*color3: yellow3
Rxvt*color4: darkblue
Rxvt*color5: magenta3
Rxvt*color6: cyan3
Rxvt*color7: gray90
Rxvt*color8: gray30
Rxvt*color9: red
Rxvt*color10: green
Rxvt*color11: yellow
Rxvt*color12: lightblue
Rxvt*color13: magenta
Rxvt*color14: cyan
Rxvt*color15: #ffffff
!! XClock
XClock*customization: -color
XClock*width: 128
XClock*height: 128
XClock*Clock*render: True
XClock*Clock*chime: True
XClock*Clock*padding: 10
XClock*Clock*analog: True
XClock*Clock*twentyfour: True
!! XCalc
XCalc*customization: -color
!! Xedit
Xedit*customization: -color
Xedit*grip.width: 12
Xedit*grip.height: 5
!! Bitmap
! Bitmap Widget styling
Bitmap*bitmap.background: #ffffff
Bitmap*bitmap.foreground: black
! Bitmap widget options
Bitmap*bitmap.size: 32x32
Bitmap*bitmap.stippled: off
Bitmap*bitmap.dashed: off
Bitmap*bitmap.grid: true
Bitmap*bitmap.gridTolerance: 2
Bitmap*bitmap.margin: 8
Bitmap*bitmap.cursor: left_ptr
! Bitmap widget square size
Bitmap*bitmap.squareWidth: 8
Bitmap*bitmap.squareHeight: 8
Bitmap*font: -*-lucida-medium-r-normal-*-120-*-*-*-*-*
! Colors
Bitmap*background: #e1e1de
Bitmap*borderColor: #aaaaa3
! Pane form CommandButton properties
Bitmap*pane.form.background: gray
Bitmap*pane.form.Command.shapeStyle: Rectangle
! Pane options
Bitmap*pane*internalBorderColor: #aaaaac
! Pane form ToggleButton properties
Bitmap*pane.form.Toggle.shapeStyle: Rectangle
! Menu Button properties
Bitmap*MenuButton.borderWidth: 0
Bitmap*MenuButton.width: 32
Bitmap*MenuButton.shapeStyle: Rectangle
Bitmap*MenuButton.justify: left
! Menu item Settings
Bitmap*SmeBSB.width: 32
Bitmap*SmeBSB.justify: left
! Specific settings for File menu
Bitmap*fileButton.leftBitmap: None
Bitmap*fileMenu.SmeBSB.HorizontalMargins: 0
! Specific settings for Edit menu
Bitmap*editButton.leftBitmap: None
Bitmap*editMenu.SmeBSB.HorizontalMargins: 16
Bitmap*status.borderColor: #aaaaac
Bitmap*status.borderWidth: 1
! grip (separator) styling
Bitmap*Grip.width: 8
Bitmap*Grip.height: 3
Bitmap*Grip.foreground: #aaaaac
Bitmap*Grip.background: #ffffff
Bitmap*Grip.borderColor: gray
Bitmap*pane.Grip.width: 3
Bitmap*pane.Grip.height: 8
! Dialog styling
Bitmap*Dialog.Command.shapeStyle: Rectangle
Bitmap*Dialog.Text.background: #ffffff
Bitmap*Dialog.Icon.foreground: black
Bitmap*Dialog.Icon.background: #ffffff
Bitmap*Dialog.Icon.borderWidth: 1
Bitmap*Dialog.Icon.borderColor: #aaaaac
! FileMenu Strings
Bitmap*fileMenu.new.label: New (Ctrl-N)...
Bitmap*fileMenu.load.label: Load (Ctrl-F)...
Bitmap*fileMenu.insert.label: Insert (Ctrl-I)...
Bitmap*fileMenu.save.label: Save (Ctrl-S)
Bitmap*fileMenu.saveAs.label: Save As (Ctrl-W)...
Bitmap*fileMenu.resize.label: Resize (Ctrl-R)...
Bitmap*fileMenu.rescale.label: Rescale (Ctrl-X)...
Bitmap*fileMenu.filename.label: Filename (Ctrl-E)...
Bitmap*fileMenu.basename.label: Basename (Ctrl-B)...
Bitmap*fileMenu.quit.label: Quit (Ctrl-C, Q)
! EditMenu Strings
Bitmap*editMenu.image.label: Image (Alt-I)
Bitmap*editMenu.grid.label: Grid (Alt-G)
Bitmap*editMenu.dashed.label: Dashed (Alt-D)
Bitmap*editMenu.axes.label: Axes (Alt-A)
Bitmap*editMenu.stippled.label: Stippled (Alt-S)
Bitmap*editMenu.proportional.label: Proportional (Alt-P)
Bitmap*editMenu.zoom.label: Zoom (Alt-Z)
Bitmap*editMenu.cut.label: Cut (Alt-C)
Bitmap*editMenu.copy.label: Copy (Alt-W)
Bitmap*editMenu.paste.label: Paste (Alt-Y, Ctrl-mb)
!! XClipboard
XClipboard*background: #e1e1de
XClipboard*Text.background: #ffffff
XClipboard*borderColor: #aaaaac
XClipboard*font: -*-lucida-medium-r-normal-*-120-*-*-*-*-*
!! XFig
Fig*customization: -color
Fig*background: #e1e1de
Fig*font: -*-lucida-medium-r-normal-*-120-*-*-*-*-*
!! Seyon
Seyon*customization: -color
!! XMore
XMore*background: #e1e1de
XMore*borderColor: #aaaaac
XMore*Text.background: #ffffff
XMore*font: -*-lucida-medium-r-normal-*-120-*-*-*-*-*
XMore*Text.Translations: #overrride\n\
<Btn4Down>: scroll-one-line-down()\n\
<Btn5Down>: scroll-one-line-up()\n
!! XFontSel
XFontSel*background: #e1e1de
XFontSel*borderColor: #aaaaac
XFontSel*sampleText.background: #ffffff
! Pane styling
XFontSel*Paned*internalBorderColor: #aaaaac
XFontSel*Paned*BorderColor: #aaaaac
! grip (separator) styling
XFontSel*Grip.width: 8
XFontSel*Grip.height: 3
XFontSel*Grip.foreground: #aaaaac
XFontSel*Grip.background: #ffffff
XFontSel*Grip.borderColor: gray
XFontSel*font: -*-lucida-medium-r-normal-*-120-*-*-*-*-*
!! XLoad
XLoad*width: 150
XLoad*height: 60
XLoad*Label.font: -*-lucida-medium-r-normal-*-120-*-*-*-*-*
XLoad*Label.background: black
XLoad*Label.foreground: #ffffff
XLoad*load.update: 1
XLoad*load.background: gray
XLoad*load.foreground: brown
!! Xditview
Xditview*background: #e1e1de
Xditview*dvi.background: #ffffff
Xditview*Text.background: #ffffff
Xditview*Label.font: -*-lucida-medium-r-normal-*-120-*-*-*-*-*
Xditview*MenuButton.leftBitmap: None
Xditview*MenuButton.borderWidth: 0
!! Xman
Xman*background: #e1e1de
Xman*Command.borderColor: #aaaaac
!Xman*font: -*-lucida-medium-r-normal-*-120-*-*-*-*-*
Xman*faceName: DejaVuSansMono
Xman*manualFontNormal: DejaVuSansMono
Xman*faceSize: 10
Xman*manualPage.background: #ffffff
Xman*manualPage.useRight: True
Xman*directory.background: #ffffff
Xman*Paned.borderColor: #aaaaac
Xman*Paned.internalBorderColor: #aaaaac
Xman*Dialog.Command.background: #e1e1de
Xman*Dialog.Command.borderColor: #aaaaac
Xman*Text.background: #ffffff
! grip (separator) styling
Xman*Grip.width: 8
Xman*Grip.height: 3
Xman*Grip.foreground: #aaaaac
Xman*Grip.background: #ffffff
Xman*Grip.borderColor: grey
! Xman options
Xman*bothShown: true
Xman*topBox: false
Xman*verticalList: true
! Key and mouse Bindings
Xman*manualPage*translations: #override \n\
<Btn4Down>: Page(Line,-1) \n\
<Btn5Down>: Page(Line,1) \n
!! XMessage
Xmessage*customization: -color
!! Xvideotune
Xvidtune*background: #e1e1de
Xvidtune*borderColor: #aaaaac
Xvidtune*Scrollbar.background: #ffffff
Xvidtune*Text.background: #ffffff
!Xvidtune*Label.foreground: darkred
Xvidtune*WarnLabel.borderColor: red
Xvidtune*WarnLabel.foreground: red
Xvidtune*WarnLabel.background: black
Xvidtune*WarnOK.borderColor: red
Xvidtune*WarnOK.foreground: red
Xvidtune*WarnOK.borderWidth: 3
Xvidtune*WarnCancel.borderColor: green
Xvidtune*WarnCancel.foreground: green
Xvidtune*WarnCancel.borderWidth: 3
Xvidtune*Command.foreground: #ffffff
Xvidtune*Command.background: black
Xvidtune*Command.internalWidth: 5
Xvidtune*Command.internalHeight: 5
Xvidtune*Toggle.foreground: #ffffff
Xvidtune*Toggle.background: black
Xvidtune*Toggle.internalWidth: 5
Xvidtune*Toggle.internalHeight: 5
Xvidtune*Buttons-form.Command.foreground: red
Xvidtune*Buttons-form.Command.borderColor: red
Xvidtune*Buttons-form.Toggle.foreground: red
Xvidtune*Buttons-form.Toggle.borderColor: red
Xvidtune*Buttons-form.Quit-button.foreground: green
Xvidtune*Buttons-form.Quit-button.borderColor: green
Xvidtune*font: -*-lucida-bold-r-normal-*-120-*-*-*-*-*
!! XbmBrowser
XbmBrowser*customization: -color
! Options
XbmBrowser*label_all: True
XbmBrowser*label_icons: True
XbmBrowser*label_syms: True
XbmBrowser*show_xpmbad: True
XbmBrowser*show_other: False
XbmBrowser*show_hidden: False
!XMinesweep
Xminesweep*background: #e1e1de