Skip to content

Commit

Permalink
final dotfiles for the master branch
Browse files Browse the repository at this point in the history
  • Loading branch information
omps committed Jan 21, 2015
0 parents commit 741503f
Show file tree
Hide file tree
Showing 7 changed files with 3,999 additions and 0 deletions.
145 changes: 145 additions & 0 deletions .bashrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for example
PATH=$PATH:~/bin
# If not running interactively, don't do anything
[ -z "$PS1" ] && return

# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth

# append to the history file, don't overwrite it
shopt -s histappend

# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"

# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi

# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color) color_prompt=yes;;
esac

# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes

if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi

if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt

# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac

# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'

alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi

# some more ls aliases
alias ll='ls -alFh'
alias la='ls -A'
alias l='ls -CF'

# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'

# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.

if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
fi

export PERL_LOCAL_LIB_ROOT="/home/singho/perl5";
export PERL_MB_OPT="--install_base /home/singho/perl5";
export PERL_MM_OPT="INSTALL_BASE=/home/singho/perl5";
export PERL5LIB="/home/singho/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int:/home/singho/perl5/lib/perl5";
export PATH="/home/singho/perl5/bin:$PATH";

install () {
sudo apt-get install $?
}

search () {
sudo apt-cache search $?
}

update () {
sudo apt-get update
}

export WEB=$HOME/public_html/

mount () {
sudo mount $@
}

apt-get () {
sudo apt-get $@
}


export JDK_HOME=/usr/local/share/jdk1.7.0_45/
export JAVA_HOME=/usr/local/share/jdk1.7.0_45/bin/
export PATH=$PATH:/usr/local/share/android-studio/bin
source ~/perl5/perlbrew/etc/bashrc
export ALTERNATE_EDITOR=""
export EDITOR=emacsclient

source ~/perl5/perlbrew/etc/bashrc

export XDG_CONFIG_HOME="$HOME/.config"

#/home/omps/bin/start_emacs.sh
Empty file added .emacs
Empty file.
148 changes: 148 additions & 0 deletions .gnus
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
; -*- Lisp -*-
(require 'nnir)

;;@see http://www.emacswiki.org/emacs/GnusGmail#toc1
(setq gnus-select-method '(nntp "news.gmane.org"))

;; ask encyption password once
(setq epa-file-cache-passphrase-for-symmetric-encryption t)

(setq smtpmail-auth-credentials "~/.authinfo.gpg")

;;@see http://gnus.org/manual/gnus_397.html
(add-to-list 'gnus-secondary-select-methods
'(nnimap "gmail"
(nnimap-address "imap.gmail.com")
(nnimap-server-port 993)
(nnimap-stream ssl)
(nnir-search-engine imap)
(nnimap-authinfo-file "~/.authinfo.gpg")
; @see http://www.gnu.org/software/emacs/manual/html_node/gnus/Expiring-Mail.html
;; press 'E' to expire email
(nnmail-expiry-target "nnimap+gmail:[Gmail]/Trash")
(nnmail-expiry-wait 90)
)
)

(setq-default
gnus-summary-line-format "%U%R%z %(%&user-date; %-15,15f %B%s%)\n"
gnus-user-date-format-alist '((t . "%Y-%m-%d %H:%M"))
gnus-summary-thread-gathering-function 'gnus-gather-threads-by-references
gnus-sum-thread-tree-false-root ""
gnus-sum-thread-tree-indent ""
gnus-sum-thread-tree-leaf-with-other "-> "
gnus-sum-thread-tree-root ""
gnus-sum-thread-tree-single-leaf "|_ "
gnus-sum-thread-tree-vertical "|")

(setq gnus-thread-sort-functions
'(
(not gnus-thread-sort-by-date)
(not gnus-thread-sort-by-number)
))

; NO 'passive
(setq gnus-use-cache t)
(setq gnus-use-adaptive-scoring t)
(setq gnus-save-score t)
(add-hook 'mail-citation-hook 'sc-cite-original)
(add-hook 'message-sent-hook 'gnus-score-followup-article)
(add-hook 'message-sent-hook 'gnus-score-followup-thread)
; @see http://stackoverflow.com/questions/945419/how-dont-use-gnus-adaptive-scoring-in-some-newsgroups
(setq gnus-parameters
'(("nnimap.*"
(gnus-use-scoring nil))
))

(defvar gnus-default-adaptive-score-alist
'((gnus-kill-file-mark (from -10))
(gnus-unread-mark)
(gnus-read-mark (from 10) (subject 30))
(gnus-catchup-mark (subject -10))
(gnus-killed-mark (from -1) (subject -30))
(gnus-del-mark (from -2) (subject -15))
(gnus-ticked-mark (from 10))
(gnus-dormant-mark (from 5))))

(setq gnus-score-find-score-files-function
'(gnus-score-find-hierarchical gnus-score-find-bnews bbdb/gnus-score)
)

;; BBDB: Address list
(when (file-exists-p "/usr/share/emacs/site-lisp/bbdb")
(add-to-list 'load-path "/usr/share/emacs/site-lisp/bbdb")
(require 'bbdb)
(bbdb-initialize 'message 'gnus 'sendmail)
(setq bbdb-file "~/bbdb.db")
(add-hook 'gnus-startup-hook 'bbdb-insinuate-gnus)
(setq bbdb/mail-auto-create-p t
bbdb/news-auto-create-p t)
(defvar bbdb-time-internal-format "%Y-%m-%d"
"The internal date format.")
;;;###autoload
(defun bbdb-timestamp-hook (record)
"For use as a `bbdb-change-hook'; maintains a notes-field called `timestamp'
for the given record which contains the time when it was last modified. If
there is such a field there already, it is changed, otherwise it is added."
(bbdb-record-putprop record 'timestamp (format-time-string
bbdb-time-internal-format
(current-time))))
)


(add-hook 'message-mode-hook
'(lambda ()
(flyspell-mode t)
(local-set-key "<TAB>" 'bbdb-complete-name)))

;; Fetch only part of the article if we can. I saw this in someone
;; else's .gnus
(setq gnus-read-active-file 'some)

;; Tree view for groups. I like the organisational feel this has.
(add-hook 'gnus-group-mode-hook 'gnus-topic-mode)

;; Threads! I hate reading un-threaded email -- especially mailing
;; lists. This helps a ton!
(setq gnus-summary-thread-gathering-function
'gnus-gather-threads-by-subject)

;; Also, I prefer to see only the top level message. If a message has
;; several replies or is part of a thread, only show the first
;; message. 'gnus-thread-ignore-subject' will ignore the subject and
;; look at 'In-Reply-To:' and 'References:' headers.
(setq gnus-thread-hide-subtree t)
(setq gnus-thread-ignore-subject t)

; Personal Information
(setq user-full-name "My Name"
user-mail-address "username@gmail.com"
;message-generate-headers-first t
)

;; Change email address for work folder. This is one of the most
;; interesting features of Gnus. I plan on adding custom .sigs soon
;; for different mailing lists.
;; Usage, FROM: My Name <work>
(setq gnus-posting-styles
'((".*"
(name "My Name"
(address "username@gmail.com"
(organization "")
(signature-file "~/.signature")
("X-Troll" "Emacs is better than Vi")
)))))

; You need install the command line brower 'w3m' and Emacs plugin 'w3m'
(setq mm-text-html-renderer 'w3m)

(setq message-send-mail-function 'smtpmail-send-it
smtpmail-starttls-credentials '(("smtp.gmail.com" 587 nil nil))
smtpmail-auth-credentials '(("smtp.gmail.com" 587 "username@gmail.com" nil))
smtpmail-default-smtp-server "smtp.gmail.com"
smtpmail-smtp-server "smtp.gmail.com"
smtpmail-smtp-service 587
smtpmail-local-domain "homepc")
;http://www.gnu.org/software/emacs/manual/html_node/gnus/_005b9_002e2_005d.html
(setq gnus-use-correct-string-widths nil)
(gnus-compile)
Loading

0 comments on commit 741503f

Please sign in to comment.