Tools & Customization

HOME | Sitemap


Tools that i use and itz customizations.

Table of Contents

GIT

I use magit in emacs for browsing through repo

Emacs

I may not be using all that is listed here.


  ;;; Start Emacs Server
  (server-start)

  ;; My Information 
  (setq user-full-name "Johnny Jacob")
  (setq user-mail-address "jjohnny@novell.com")

  ;; setting the title emacs window
  (setq frame-title-format "emacs - %b")
  ;; Don't want any startup message 
  (setq inhibit-startup-message   t)
  ;;; Color scheme
  (set-foreground-color "steelblue2")
  (set-background-color "black")

  ;;; Setting the default font
  ;;(set-default-font "8x13")
  
  ;; Frame Title
  (setq frame-title-format "Emacs: %b ")

  (tool-bar-mode nil) ; toolbar not available on the Win32 port yet...
  (menu-bar-mode nil) ; turn off the menus
  (scroll-bar-mode nil)

  ;; Load util functions
  (load "/home/jjohnny/.emacs.utils")
  (load "/home/jjohnny/.emacs.d/gtk-look.el")

  ;; Load color theme
  (load "/home/jjohnny/.emacs.d/pmade-colors.el")

  ;;; MaGIT - GIT UI in Emacs
  (load "/home/jjohnny/.emacs.d/magit.el")
  (require 'magit)

  ;;; Git.el from contrib/emacs
  (load "/home/jjohnny/.emacs.d/git.el")
  (require 'git)

  (load "/home/jjohnny/.emacs.d/git-blame.el")
  (require 'git-blame)

  ;;; egit - history browser
  ;;(load "/home/jjohnny/.emacs.d/egit.el")
  ;;(require 'egit)
  ;;; Compile buffer
  (setq compilation-scroll-output t)
  (setq compilation-skip-threshold 1)

  ;;; Diff Mode Extension
  (custom-set-faces
   '(diff-added ((t (:foreground "Green"))) 'now)
   '(diff-changed ((t (:foreground "MediumBlue"))) 'now)
   '(diff-context ((t (:foreground "Gray"))) 'now)
   '(diff-file-header ((t (:foreground "DarkRed" :background "Black"))) 'now)
   '(diff-function ((t (:foreground "White" :background "DarkBlue"))) 'now)
   '(diff-header ((t (:foreground "DarkRed" ))) 'now)
   '(diff-hunk-header ((t (:foreground "White" :background "DarkBlue"))) 'now)
   '(diff-index ((t (:foreground "DarkRed"))) 'now)
   '(diff-nonexistent ((t (:foreground "DarkBlue"))) 'now)
   '(diff-removed ((t (:foreground "Red"))) 'now)
   )

  ;; EDiff 

   (add-hook 'ediff-load-hook
	     (lambda ()
	       (set-face-foreground
		ediff-current-diff-face-B "blue")
	       (set-face-background
		ediff-current-diff-face-B "red")
	       (make-face-italic
		ediff-current-diff-face-B)))

  ;;; Rectangle Mark
  ;;; Notes : CUA is better.
  (load "/home/jjohnny/.emacs.d/rect-mark.el")
    (global-set-key (kbd "C-x r C-SPC") 'rm-set-mark)
    (global-set-key (kbd "C-x r C-x") 'rm-exchange-point-and-mark)
    (global-set-key (kbd "C-x r C-w") 'rm-kill-region)
    (global-set-key (kbd "C-x r M-w") 'rm-kill-ring-save)
    (autoload 'rm-set-mark "rect-mark"
      "Set mark for rectangle." t)
    (autoload 'rm-exchange-point-and-mark "rect-mark"
      "Exchange point and mark for rectangle." t)
    (autoload 'rm-kill-region "rect-mark"
      "Kill a rectangular region and save it in the kill ring." t)
    (autoload 'rm-kill-ring-save "rect-mark"
      "Copy a rectangular region to the kill ring." t)

  ;;; C-Mode Templates 
     (require 'tempo)
  ;;; (setq tempo-interactive t)

     (add-hook 'c-mode-hook
	       '(lambda ()
		  (local-set-key [f11] 'tempo-complete-tag)
		  (tempo-use-tag-list 'c-tempo-tags)
		  ))
  ;;; Templates appended to c-tempo-tags

     (defvar c-tempo-tags nil
       "Tempo tags for C mode")

     (tempo-define-template "c-debug-pf"
			    '("printf(\"%s(%d):%s:"r" \\n\", __FILE__, __LINE__, __PRETTY_FUNCTION__);">)
			    "include"
			    "Insert a printf statement with info on location"
			    'c-tempo-tags)
  ;;; Custom Keybindings
  (global-set-key "\C-z" 'shell)
  (global-set-key "\M-n" 'goto-line)

  ;;Clipboard
  (setq x-select-enable-clipboard t)

  ;;; Inserts the template "c-debug-pf"
  (global-set-key "\C-x\C-q" 'tempo-template-c-debug-pf)
  ;;; Shell Customizations
  (setq comint-scroll-show-maximum-output t)
(load "/home/jjohnny/.emacs.d/buff-menu+.el")
(load "/home/jjohnny/.emacs.d/dired+.el")
(toggle-dired-find-file-reuse-dir 1)

;; Function display in mode line
(which-function-mode t)

;; Devhelp integration
(load "/home/jjohnny/.emacs.d/devhelp.el")

;; Highlight
(load "/home/jjohnny/.emacs.d/highlight-regexp.el")

;; XCSCOPE
(load "/home/jjohnny/.emacs.d/xcscope.el")
(load "/home/jjohnny/.emacs.d/xcscope+.el")

(require 'xcscope)
(setq cscope-initial-directory "/home/jjohnny/src/git/e-mapi/")

(define-key global-map [(f10)]		     'cscope-find-this-symbol-no-prompting-no-updates)
(define-key global-map [(f8)]		     'cscope-find-global-definition-no-prompting-no-updates)
(define-key global-map [(control f9)]	     'cscope-find-this-text-string-no-updates)
(define-key global-map [(control f10)]	     'cscope-find-this-qsymbol-no-updates)
(define-key global-map [(control f8)]	     'cscope-find-global-definition-no-updates)
(define-key global-map [(control f12)]	     'cscope-find-functions-calling-this-function-no-updates)
(define-key global-map [(control shift f9)]  'cscope-find-this-text-string)
(define-key global-map [(control shift f10)] 'cscope-find-this-symbol)
(define-key global-map [(control shift f11)] 'cscope-find-global-definition)
(define-key global-map [(control shift f12)] 'cscope-find-functions-calling-this-function)
(define-key global-map [(control ?*)]	     'cscope-pop-mark)

;; ETAGS
(setq tags-table-list 
      '("/home/jjohnny/src/git/openchange/TAGS" "/home/jjohnny/src/git/gnome/evolution-mapi/TAGS" "/home/jjohnny/src/git/gnome/evolution-data-server/TAGS"))

;; EMACS Temporary Files
(defun make-backup-file-name (FILE)
  (concat "/home/jjohnny/.backups/emacs/" (file-name-nondirectory FILE)))

;;(setq backup-by-copying t)
;;(setq save-abbrevs nil)
;;(setq backup-directory-alist
;;     (cons '("." . "/home/jjohnny/src/tmp-files/emacs")
;;           backup-directory-alist))

;; reload current file . TODO : Find a better way

(defun reload-file ()
  (interactive t)
  (find-file (buffer-name))
)

;; Twitter
(load "/home/jjohnny/.emacs.d/twit.el")
(load "/home/jjohnny/.emacs.d/twittering-mode.el")
(require 'twittering-mode)
(setq twittering-username "johnnyjacob")

;; Identica
(load "/home/jjohnny/.emacs.d/identica-mode.el")
(require 'identica-mode)
(setq identica-username "johnnyjacob")
(setq identica-password "zuluzulu")

(defun mstatus ()
   (interactive)
   (identica-update-status-interactive)
)

;; Pastebin

(load "/home/jjohnny/.emacs.d/pastebin.el")

;; TRAMP
(add-to-list 'load-path "/home/jjohnny/.emacs.d/tramp/lisp/")
(require 'tramp)
(setq tramp-default-method "ssh")
(setq tramp-chunksize 500)

;; ERC Config
(load "/home/jjohnny/.emacs.erc.el")
;;(erc-match-mode 1)
(setq erc-server "irc.freenode.net" 
       erc-port 6667 
       erc-nick "ynoj"
       erc-user-full-name user-full-name
       erc-email-userid "userid"    ; for when ident is not activated
       erc-prompt-for-password nil) ; OPN doesn't require passwords

;;; --- FROM : http://www.xsteve.at/prg/emacs/power-user-tips.html
;;; find file at point
(require 'ffap)
;; rebind C-x C-f and others to the ffap bindings (see variable ffap-bindings)
(ffap-bindings)
;; C-u C-x C-f finds the file at point
(setq ffap-require-prefix t)

;; save a list of open files in /home/jjohnny/.emacs.desktop
;; save the desktop file automatically if it already exists
(setq desktop-save 'if-exists)
(desktop-save-mode 1)

;; save a bunch of variables to the desktop file
;; for lists specify the len of the maximal saved data also
(setq desktop-globals-to-save
      (append '((extended-command-history . 30)
                (file-name-history        . 100)
                (grep-history             . 30)
                (compile-history          . 30)
                (minibuffer-history       . 50)
                (query-replace-history    . 60)
                (read-expression-history  . 60)
                (regexp-history           . 60)
                (regexp-search-ring       . 20)
                (search-ring              . 20)
                (shell-command-history    . 50)
                tags-file-name
                register-alist)))

;;; --- FROM : http://www.xsteve.at/prg/emacs/power-user-tips.html

;; iBuffer
;;(global-set-key (kbd "C-x C-b") 'ibuffer-bs-show)
(autoload 'ibuffer "ibuffer" "List buffers." t)

(setq ibuffer-shrink-to-minimum-size t)
(setq ibuffer-always-show-last-buffer nil)
(setq ibuffer-sorting-mode 'recency)
(setq ibuffer-use-header-line t)

;; default groups for ibuffer
(setq ibuffer-saved-filter-groups
      (quote (("Default"
	       ("MAPI" (filename . ".*-mapi.*"))
	       ("IRC" (mode . erc-mode))
               ("Emacs" (or
                         (name . "^\\*scratch\\*$")
                         (name . "^\\*Messages\\*$"))
		)))))

;;ibuffer, I like my buffers to be grouped
(add-hook 'ibuffer-mode-hook
          (lambda ()
            (ibuffer-switch-to-saved-filter-groups
             "Default")))

;; Auto Complete
;;(load "/home/jjohnny/.emacs.d/auto-complete.el")
;; (require 'auto-complete)
;;    (global-auto-complete-mode t)

;;  (when (require 'auto-complete nil t)
;;    (global-auto-complete-mode t)
;;    (set-face-background 'ac-selection-face "steelblue")
;;    (set-face-background 'ac-menu-face "skyblue")
;;    (define-key ac-complete-mode-map "\t" 'ac-complete)
;;    (define-key ac-complete-mode-map "\r" nil)
;;    (define-key ac-complete-mode-map "\C-j" 'ac-next)
;;    (define-key ac-complete-mode-map "\C-k" 'ac-previous)
;;    (setq ac-auto-start t)
;;    (setq ac-sources '(ac-source-yasnippet ac-source-abbrev ac-source-words-in-buffer))
 
;;    (add-to-list 'ac-modes 'eshell-mode)
 
;;    (add-hook 'emacs-lisp-mode-hook
;;              (lambda ()
;;                (make-local-variable 'ac-sources)
;;                (setq ac-sources '(ac-source-yasnippet ac-source-abbrev ac-source-words-in-buffer ac-source-symbols))))
 
;;    (add-hook 'eshell-mode-hook
;;              (lambda ()
;;                (make-local-variable 'ac-sources)
;;                (setq ac-sources '(ac-source-yasnippet ac-source-abbrev ac-source-files-in-current-dir ac-source-words-in-buffer)))))

;;; ZOOM IN/OUT (font size inc / dec )
;;; Source : http://emacs-fu.blogspot.com/2008/12/zooming-inout.html
;;; TODO : 23.x has face-remap.
(defun djcb-zoom (n)
  "with positive N, increase the font size, otherwise decrease it"
  (set-face-attribute 'default (selected-frame) :height 
    (+ (face-attribute 'default :height) (* (if (> n 0) 1 -1) 10)))) 

(global-set-key (kbd "C-+")      '(lambda nil (interactive) (djcb-zoom 1)))
(global-set-key [C-kp-add]       '(lambda nil (interactive) (djcb-zoom 1)))
(global-set-key (kbd "C--")      '(lambda nil (interactive) (djcb-zoom -1)))
(global-set-key [C-kp-subtract]  '(lambda nil (interactive) (djcb-zoom -1)))

;; Planner

;(add-to-list 'load-path "/home/jjohnny/.emacs.d/planner/muse/lisp")
;(add-to-list 'load-path "/home/jjohnny/.emacs.d/planner/planner")
;(add-to-list 'load-path "/home/jjohnny/.emacs/planner/remember")

;(setq planner-project "WikiPlanner")
;(setq muse-project-alist
;      '(("WikiPlanner"
;	 ("/home/jjohnny/.emacs.d/plans"   ;; Or wherever you want your planner files to be
;	  :default "index"
;	  :major-mode planner-mode
;	  :visit-link planner-visit-link))))
;(require 'planner)
;(require 'planner-timeclock)
;(require 'planner-timeclock-summary)
;(require 'planner-timeclock-summary-proj)

;; OrgMode
;;(require 'remember)

(defun gtd ()
   (interactive)
   (find-file "/home/jjohnny/.emacs.d/org/gtd.org")
)

(defun notes ()
   (interactive)
   (find-file "~/Documents/Misc/Websites/johnnyjacob.org/source/")
)

(defun cheat ()
   (interactive)
   (find-file "~/Documents/Misc/Websites/johnnyjacob.org/source/notes.org")
)

(defun scrap ()
   (interactive)
   (find-file "/home/jjohnny/.emacs.d/org/notes/scrap.org")
)

(defun wlog ()
   (interactive)
   (find-file "/home/jjohnny/.emacs.d/org/worklog.org")
)

(defun org-evo ()
   (interactive)
   (find-file "/home/jjohnny/.emacs.d/org/evolution")
)

(setq org-agenda-include-diary nil)
(setq org-deadline-warning-days 7)
(setq org-timeline-show-empty-dates t)
(setq org-insert-mode-line-in-empty-file t)
(setq org-log-done t)

(setq org-agenda-files
      (list "/home/jjohnny/.emacs.d/org/gtd.org"))

(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)

;; For remember 
(setq remember-annotation-functions '(org-remember-annotation))
(setq remember-handler-functions '(org-remember-handler))
(add-hook 'remember-mode-hook 'org-remember-apply-template)
(define-key global-map "\C-cr" 'org-remember)

(setq org-default-notes-file "/home/jjohnny/.emacs.d/org/notes/")
;; If the file getz too large to manage
;; consider moving to smaller files.
(setq org-remember-templates
     '(
      ("inbox" ?i "* TODO %^{Brief Description} %^g\n%?" "/home/jjohnny/.emacs.d/org/gtd.org" "Inbox")
      ("Evolution" ?e "* TODO %^{Brief Description} %^g\n%?" "/home/jjohnny/.emacs.d/org/gtd.org" "Evolution")
      ("Moblin" ?o "* TODO %^{Brief Description} %^g\n%?" "/home/jjohnny/.emacs.d/org/gtd.org" "Moblin")
      ("MAPI" ?a "* TODO %^{Brief Description} %^g\n%?" "/home/jjohnny/.emacs.d/org/gtd.org" "MAPI")
      ("Tasque" ?t "* TODO %^{Brief Description} %^g\n%?" "/home/jjohnny/.emacs.d/org/tasque.org" "Tasque")
))

(setq org-agenda-custom-commands
'(

("H" "HOME"   
((tags "HOME")))

("O" "Office Lists"
     ((agenda)
          (tags-todo "OFFICE")))


("D" "Daily Action List"
     (
         (agenda "" ((org-agenda-ndays 1)
                      (org-agenda-sorting-strategy
                       (quote ((agenda time-up priority-down tag-up) )))
                      (org-deadline-warning-days 0)
                      ))))
)
)


(custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(org-agenda-ndays 7)
 '(org-agenda-repeating-timestamp-show-all nil)
 '(org-agenda-restore-windows-after-quit t)
 '(org-agenda-show-all-dates t)
 '(org-agenda-skip-deadline-if-done t)
 '(org-agenda-skip-scheduled-if-done t)
 '(org-agenda-sorting-strategy (quote ((agenda time-up priority-down tag-up) (todo tag-up))))
 '(org-agenda-start-on-weekday nil)
 '(org-agenda-todo-ignore-deadlines t)
 '(org-agenda-todo-ignore-scheduled t)
 '(org-agenda-todo-ignore-with-date t)
 '(org-deadline-warning-days 7)
 '(org-fast-tag-selection-single-key nil)
 '(org-log-done (quote (done)))
 '(org-reverse-note-order nil)
 '(org-tags-column -78)
 '(org-tags-match-list-sublevels nil)
 '(org-time-stamp-rounding-minutes 5)
 '(org-use-fast-todo-selection t)
 '(org-use-tag-inheritance nil)
)

(setq org-publish-project-alist
           '(("orgfiles"
               :base-directory "/home/jjohnny/Documents/Misc/Websites/johnnyjacob.org/source/"
               :base-extension "org"
               :publishing-directory "/home/jjohnny/Documents/Misc/Websites/johnnyjacob.org/pub/"
               :publishing-function org-publish-org-to-html
	       :link-home "index.html"
	       :html-preamble "HOME"
	       :auto-index t                  ; Generate index.org automagically...
	       :index-filename "sitemap.org"  ; ... call it sitemap.org ...
	       :index-title "Sitemap"         ; ... with title 'Sitemap'.
               :auto-preamble t
               :auto-postamble t)

              ("images"
               :base-directory "/home/jjohnny/Documents/Misc/Websites/johnnyjacob.org/source/images/"
               :base-extension "jpg\\|gif\\|png"
               :publishing-directory "/home/jjohnny/Documents/Misc/Websites/johnnyjacob.org/pub/"
               :publishing-function org-publish-attachment)
     
              ("other"
               :base-directory "/home/jjohnny/Documents/Misc/Websites/johnnyjacob.org/source/other/"
               :base-extension "css\\|el"
               :publishing-directory "/home/jjohnny/Documents/Misc/Websites/johnnyjacob.org/pub/"
               :publishing-function org-publish-attachment)
              ("website" :components ("orgfiles" "images" "other"))))

;;
;; Buffer switcher from : http://jfm3-repl.blogspot.com/2009/02/fast-emacs-buffer-flipping.html
;;
(defmacro define-buffer-visitor (visitor-name buffer-name command)
  `(defun ,visitor-name ()
     (interactive)
     (if (get-buffer ,buffer-name)
  (switch-to-buffer (if (equal ,buffer-name (buffer-name))
          nil
          ,buffer-name))
         (call-interactively ,command))))

(define-buffer-visitor visit-gtd "gtd.org" #'gtd)
(define-buffer-visitor visit-scratch "*scratch*" nil)

(ido-mode t)
(global-set-key "\C-cb" 'ido-switch-buffer)
(global-set-key "\C-cf" 'idob-find-file)
(put 'narrow-to-region 'disabled nil)

(global-set-key [M-left] 'windmove-left)          ; move to left windnow
(global-set-key [M-right] 'windmove-right)        ; move to right window
(global-set-key [M-up] 'windmove-up)              ; move to upper window
(global-set-key [M-down] 'windmove-down)          ; move to downer window

;; SLIME for CLisp

(add-to-list 'load-path "~/src/cvs/slime/")  ; your SLIME directory
(setq inferior-lisp-program "/usr/bin/clisp") ; your Lisp system
(require 'slime)
(slime-setup)

;; Highlight characters above 80 col

(load "~/.emacs.d/highlight-80+.el")
(require 'highlight-80+)

;; Use Flyspell mode 
(require 'flyspell)
(add-hook 'c-mode-hook          'flyspell-prog-mode 1)
(add-hook 'c++-mode-hook        'flyspell-prog-mode 1)
(add-hook 'autoconf-mode-hook   'flyspell-prog-mode 1)
(add-hook 'autotest-mode-hook   'flyspell-prog-mode 1)
(add-hook 'sh-mode-hook         'flyspell-prog-mode 1)
(add-hook 'makefile-mode-hook   'flyspell-prog-mode 1)
(add-hook 'emacs-lisp-mode-hook 'flyspell-prog-mode 1)

(add-hook 'changelog-mode-hook    'flyspell-mode 1)
(add-hook 'org-mode-hook          'flyspell-mode 1)

Screen

screenrc (Nothing fancy)


# terminfo and termcap for nice 256 color terminal
# allow bold colors - necessary for some reason
attrcolor b ".I"
# tell screen how to set colors. AB = background, AF=foreground
termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
# erase background with current bg color
defbce "on" 

#From : http://labs.dagensskiva.com/2008/05/02/a-favorite-screenrc-setting/
#Original : caption always "%{= gk}%-Lw%{= rW}%50> %n%f* %t %{-}%+Lw%< %= %{= Gk} %H %{= rW} %l %{= Gk} %0c:%s %d/%m %{-}"

caption always "%{= gk}%-Lw%{= rW}%50> %n%f* %t %{-}%+Lw%< %= %{= Gk} %H %{-}"

shelltitle "$ |bash"
startup_message off

screen -t GIT 0 
screen -t MAPI 1
screen -t ServersMAPI 2 
screen -t gEVO 3 
screen -t OpenChange 4 
screen -t GODMODE 5
screen -t Misc 6

XMonad


import XMonad
import XMonad.Actions.DwmPromote
import XMonad.Config.Gnome
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks

import XMonad.Layout.NoBorders
import XMonad.Layout.PerWorkspace
import XMonad.Layout.Tabbed

import XMonad.Util.EZConfig(additionalKeys)
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.Scratchpad   
import qualified XMonad.StackSet as W
import System.IO

-- Window placements
myManageHook :: [ManageHook]
myManageHook = 
    [ resource  =? "Do"   --> doIgnore 
    , resource =? "xchat" --> doF (W.shift "3:Comm")
    , className =? "Emacs" --> doF (W.shift "1:Code")
    , className =? "Pidgin" --> doF (W.shift "3:Comm")
    , className =? "xchat" --> doF (W.shift "3:Comm")
    , className =? "gitk" --> doF (W.shift "4:Read")
    , className =? "Gitg" --> doF (W.shift "4:Lab")
    , className =? "gitg" --> doF (W.shift "4:Lab")
    , className =? "Gitk" --> doF (W.shift "4:Read")
    , className =? "Transmission" --> doF (W.shift "8:Drift")
    , className =? "Banshee" --> doF (W.shift "9:Dump")
    , className =? "Firefox" --> doF (W.shift "5:Surf")
    , className =? "Anjal" --> doF (W.shift "2:Lab")
    ]++
    [ manageDocks
    ]

-- Custom layouts
tall = Tall 1 (1/100) (3/5)
tall2 = Tall 2 (2/100) (5/7)

lCodeCompile = avoidStruts $ (tall ||| Mirror tall ||| Full)
lTestConsole = avoidStruts $ (Mirror tall2 ||| Full )
lRead = avoidStruts $ (simpleTabbed ||| Mirror tall ||| Full)
lSurf = avoidStruts $ (simpleTabbed ||| Tall 1 (1/100) (1/2)||| Full)
lCommon = avoidStruts $ tall ||| Mirror tall ||| Full

lExpe = avoidStruts $ (Full ||| simpleTabbed)

myLayout = onWorkspace "1:Code" lCodeCompile $
	   onWorkspace "5:Surf" lSurf $
	   lCommon

main = do
xmonad $ gnomeConfig
        {
        workspaces = ["1:Code", "2:Lab", "3:Comm", "4:Read", "5:Surf", "6", "7", "8:Drift", "9:Dump"]
        , manageHook = manageHook gnomeConfig <+> composeAll myManageHook
	, layoutHook = avoidStruts $ myLayout
        , modMask = mod4Mask 
        , borderWidth = 5
	-- , focusedBorderColor = "#F89A0C"
	, focusedBorderColor = "#12FF00"
        , terminal = "xterm -bg black -fg white"
        }
        `additionalKeys`
       [((mod4Mask .|. shiftMask, xK_z),spawn "banshee-1 --play"),
        ((mod4Mask .|. shiftMask, xK_x), spawn "xterm -bg black -fg white")
       ]

zsh


# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
setopt notify
unsetopt beep
bindkey -e
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
zstyle :compinstall filename '/home/jjohnny/.zshrc'

autoload -Uz compinit
compinit
# End of lines added by compinstall
setopt share_history

git_prompt_info() {
  ref=$(git symbolic-ref HEAD 2> /dev/null) || return
  echo "(${ref#refs/heads/})"
}


#RPROMPT='%{$(git_prompt_info)}'
PROMPT='%~ > '
#RPROMPT='%t'

#ENV Variables
#export PATH=/usr/bin/ccache:/opt/icecream/bin/:/usr/lib/git/:$PATH
export PATH=/home/jjohnny/src/opt/emacs/bin:/home/jjohnny/.local/bin:$PATH
#ALIASES--------------
alias e='emacs -nw -Q'
alias ec='emacsclient -n'

alias xblue='xterm -bg black -fg steelblue2'
alias xwhite='xterm -bg black -fg white'

alias osc-internal="osc -A https://api.suse.de  -c /home/jjohnny/src/build/internal/oscrc"
alias osc-open="osc -A https://api.opensuse.org"

alias z=' find . -iname "*.[ch]" | xargs grep -in'
alias zc=' find . -iname "*.[c]" | xargs grep -in'
alias zh=' find . -iname "*.[h]" | xargs grep -in'
alias errors="cat errors.log | grep -i error"
alias me="make install 2> errors.log"
alias -g enw='emacs -nw'

#directory related
alias -g ..=".."
alias -g ..2="../.."
alias -g ..3="../../.."
alias -g ..4="../../../.."
alias -g ..5="../../../../.."

alias -g MAPI="$HOME/src/git/evolution-mapi/"
alias -g mapi-camel="$MAPI/src/camel"
alias -g mapi-servers="$MAPI/src/libexchangemapi"
alias -g TASQUE="$HOME/src/git/tasque"

#configuration args
alias -g trunk-agen-args=" --prefix=/home/jjohnny/src/opt/gnome/ --with-krb5=/usr --enable-nss=yes --with-nspr-includes=/usr/include/nspr4/ --with-nspr-libs=/usr/lib --with-nss-includes=/usr/include/nss3 --with-nss-libs=/usr/lib --enable-smime=yes --enable-nntp=yes --enable-exchange=yes --with-openldap=yes --enable-gnome-keyring=no --with-libdb=yes"
alias -g mapi-agen-args=" --enable-maintainer-mode --prefix=/home/jjohnny/src/git/e-mapi/opt/ --with-krb5=/usr --enable-nss=yes --with-nspr-includes=/usr/include/nspr4/ --with-nspr-libs=/usr/lib --with-nss-includes=/usr/include/nss3 --with-nss-libs=/usr/lib --enable-smime=yes --enable-nntp=yes --enable-exchange=yes --with-openldap=yes --enable-gnome-keyring=no"

#suffix aliases
alias -s c=ec
alias -s h=ec
alias -s cs=ec
alias -s pdf=evince
#--------------ALIASES

#Function to update local git repos from svn 

update-repos () {
    git_repo="/home/jjohnny/src/git"
    projects=(gtkhtml evolution-mapi evolution-data-server evolution-data-server/calendar/libical evolution evolution-exchange evolution-sharp tasque e-trunk/evolution-data-server e-trunk/gtkhtml e-trunk/evolution openchange deskice)

    for project in $projects
    do
	echo "[UPDATE] Fetching : "$project
	cd $git_repo/$project
	git svn fetch
    done

    cd $local_repo_path
    notify-send "Repositories update completed."
    echo "Commander. Repositories update completed." | festival --tts
}

mapitagsup() {
repo_base=/home/jjohnny/src/git/
rm $repo_base/TAGS
echo TAGS Removed.
echo "Commander. MAPI E-TAGS Removed." | festival --tts
find $repo_base/evolution-mapi $repo_base/e-trunk/evolution $repo_base/e-trunk/evolution-data-server -iname '*.[ch]' | xargs etags -a
ls -lh $repo_base/TAGS
echo TAGS updated.
echo "Commander. MAPI E-TAGS updated." | festival --tts
}


# For Groupwise Provider
export USE_IMAP=1

#pgrep -u $USER gconfd
#if [ "$?" != "0" ]; then
#    pkill gconfd
#    if [ "$?" == "0" ]; then
#        echo "Killing gconfd."
#    fi
#    /home/jjohnny/src/opt/gnome/libexec/gconfd-2 &
#    if [ "$?" == "0" ]; then
#        echo "New instance started."
#    fi
#fi

Other

IOTop - http://guichaz.free.fr/iotop/

HTop - http://htop.sourceforge.net/


Author: Johnny Jacob <johnnyjacobXZCSAgmailSARWR23A>

HTML generated by org-mode 6.21b in emacs 23