Linux
Radio

 

.emacs (2)




(autoload 'mpg123' "mpg123" "A Front end to mpg123" t)

;;------------------------------------------------------
;;(require 'color-theme)
;;    (color-theme-initialize)
;;    ;(color-theme-dark-blue2)
;;------------------------------------------------------
(add-to-list 'load-path "/usr/share/emacs23/site-lisp/emms/")
        (require 'emms-setup)
        (emms-standard)
        (emms-default-players)

(add-to-list 'load-path "~/.emacs.d/")

(require 'multi-term)

;;-------------------------------------------------------------------------------------------------
;; Menu-bar-mode Disable
;; Tool-bar-mode Disable
;;-------------------------------------------------------------------------------------------------
(menu-bar-mode 0)
(tool-bar-mode 0)

;;------------------------------------------------------------------------------------------------
;;Erc
;;------------------------------------------------------------------------------------------------
 (defvar bitlbee-password "Ahmet")

 (add-hook 'erc-join-hook 'bitlbee-identify)
 (defun bitlbee-identify ()
   "If we're on the bitlbee server, send the identify command to the
 &bitlbee channel."
   (when (and (string= "localhost" erc-session-server)
              (string= "&bitlbee" (buffer-name)))
     (erc-message "PRIVMSG" (format "%s identify %s"
                                    (erc-default-target)
                                    bitlbee-password))))
;;------------------------------------------------------------------------------------------------
;;Ansi
;;------------------------------------------------------------------------------------------------
(defun ash-term-hooks ()

(setq term-default-bg-color (face-background 'default))
(setq term-default-fg-color (face-foreground 'default)))

(add-hook 'term-mode-hook 'ash-term-hooks)

;;------------------------------------------------------------------------------------------------
;; My custom color theme :D
;;------------------------------------------------------------------------------------------------
(set-default-font
     "-Monospace-medium-r-normal--13-130-72-72-m-130-iso10646-1")
(require 'rainbow-delimiters)
(add-hook 'clojure-mode-hook 'rainbow-delimiters-mode)
(defun color-theme-hash ()
  (interactive)
  (color-theme-install
   '(color-theme-hash
     ((background-color . "#374B59")
      (background-mode . dark)
      (border-color . "#DC7A47")
      (cursor-color . "#ddffdd")
      (foreground-color . "#cccccc")
      (mouse-color . "#EB8333"))
     (fringe ((t (:background "#DC7A47"))))
     (vertical-border ((t (:foreground "#cd0000"))))
    
     (header-line ((t (:inherit variable-pitch :foreground "#444444" :background "grey10" :box (:color "grey10" :line-width 4) :height 0.9))))
     (mode-line-inactive ((t (:inherit variable-pitch :foreground "#151515" :background "#000000" :box (:color "#000000" :line-width 4)))))
     (region ((t (:foreground "#666666" :background "#303030"))))
     (font-lock-builtin-face ((t (:foreground "#82b8f2"))))
     (font-lock-comment-face ((t (:inherit variable-pitch :foreground "#8d6d6d" :italic t))))
     (font-lock-comment-delimiter-face ((t (:foreground "#403b3b"))))
     (font-lock-constant-face ((t (:foreground "#6a88d7"))))
     (font-lock-doc-string-face ((t (:foreground "#cd0000" :italic t))))
     (font-lock-doc-face ((t (:inherit variable-pitch :foreground "#6b9b8b" :italic t))))
     (font-lock-reference-face ((t (:foreground "red"))))
     (font-lock-reference-name-face ((t (:foreground "red"))))
     (font-lock-operator-face ((t (:foreground "#bbccbb" :bold t))))
     (font-lock-negation-char-face ((t (:foreground "#dd4444" :bold t))))
     (font-lock-function-name-face ((t (:foreground "#dd8888" :bold t))))
     (font-lock-keyword-face ((t (:foreground "#8aa8e7"))))
     (font-lock-preprocessor-face ((t (:foreground "#cb99e1"))))
     (font-lock-string-face ((t (:foreground "#cb99e1"))))
     (font-lock-type-face ((t (:foreground"#b7e234" :bold t))))
     (font-lock-variable-name-face ((t (:foreground "#888888"))))
     (font-lock-paren-face ((t (:foreground "#666677" :bold t))))
     (minibuffer-prompt ((t (:foreground "#85c0ff" :bold t))))
     (font-lock-warning-face ((t (:foreground "#ffbbbb"))))
     (show-paren-match-face ((t (:foreground "black" :background "#85c0ff" :bold t))))
     (show-paren-mismatch-face ((t (:foreground "black" :background "#dd4444" :bold t))))
     (org-hide ((t (:foreground "#121212"))))
     (org-link ((t (:foreground "#777788" :italic t :height 0.9))))
     (org-date ((t (:foreground "#88bbff"))))
     (org-agenda-date ((t (:foreground "#88bbff"))))
     (org-level-1 ((t (:foreground "#eeeeee" :bold t :height 1.3))))
     (org-level-2 ((t (:foreground "#8888bb" :height 1.1))))
     (org-level-3 ((t (:foreground "#666699" :height 1.0))))
     (org-level-4 ((t (:foreground "#666666" :style italic))))
     (org-tag ((t (:foreground "lightgreen"))))
     (org-todo ((t (:foreground "#ffccee" :bold t))))
     (org-done ((t (:foreground "#44ff88" :bold t))))
     (org-warning ((t (:foreground "#775555" :italic t))))
     (org-special-keyword ((t (:background "#000000" :foreground "#eeccaa"))))
     (org-verbatim ((t (:foreground) "#6666ff")))
     (org-block ((t (:foreground) "#6666ff")))
     (org-quote ((t (:foreground) "#6666ff")))
     (org-verse ((t (:foreground) "#6666ff")))
     (org-table ((t (:inherit fixed-pitch))))
     (eshell-prompt ((t (:foreground "#444444"))))
     (mode-line-global-face ((t (:foreground "#ffe6c0" :bold t))))
     (mode-line-folder-face ((t (:foreground "#777777"))))
     (mode-line-filename-face ((t (:foreground "#ccccff" :bold t))))
     (mode-line-mode-face ((t (:foreground "#ddff99" :bold t))))
     (mode-line-mode-process-face ((t (:foreground "#ffeeaa"))))
     (mode-line-tasks-face ((t (:foreground "#ffaaaa"))))
    )))

(require 'color-theme)
(color-theme-hash)

;;------------------------------------------------------------------------------
;;My Key Binding
;;-----------------------------------------------------------------------------
(global-set-key (kbd "<M-f1>") 'ansi-term)
(global-set-key (kbd "<M-f3>") 'speedbar)

;;------------------------------------------------------------------------------
;;copy past
;;-------------------------------------------------------------------------------

(global-set-key [(shift delete)] 'clipboard-kill-region)
(global-set-key [(control shift c)] 'clipboard-kill-ring-save)
(global-set-key [(control shift v)] 'clipboard-yank)

;;--------------------------------------------------------------------------------
;; Misc settings
;;--------------------------------------------------------------------------------
(setq inhibitstartup-screen t)
(setq initial-scratch-message nil)
(setq-default truncate-lines t)
(setq visible-bell t)
(setq ring-bell-function (lambda () ()))
(setq mouse-autoselect-window t)
(set-mouse-color "red")
       
(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.
;;-----------------------------------------------------------------------------------
 '(column-number-mode t)
 '(face-font-family-alternatives (quote (("Monospace" "courier" "fixed") ("courier" "CMU Typewriter Text" "fixed") ("Sans Serif" "helv" "helvetica" "arial" "fixed") ("helv" "helvetica" "arial" "fixed"))))
 '(font-use-system-font nil)
 '(fringe-mode (quote (nil . 0)) nil (fringe))
 '(indicate-buffer-boundaries (quote ((t . right) (top . left))))
 '(jabber-account-list (quote (("opuspocusxx@gmail.com" (:network-server . "talk.google.com") (:port . 5223) (:connection-type . ssl)) ("hocuspocusxx@chat.facebook.com" (:network-server . "chat.facebook.com") (:port . 5223) (:connection-type . network)))))
 '(jabber-alert-info-message-hooks (quote (jabber-info-wmii jabber-info-sawfish jabber-info-ratpoison jabber-info-screen jabber-info-beep jabber-info-wave jabber-info-echo jabber-info-switch jabber-info-display)))
 '(jabber-alert-info-wave "/etc/libreoffice/basis-link/share/gallery/sounds/apert.wav")
 '(jabber-alert-message-hooks (quote (jabber-message-screen jabber-message-beep jabber-message-wave jabber-message-echo jabber-message-switch jabber-message-display jabber-message-scroll jabber-message-osd)) t)
 '(jabber-alert-muc-hooks (quote (jabber-muc-screen jabber-truncate-muc jabber-autoanswer-answer-muc jabber-muc-display-personal jabber-muc-switch-personal jabber-muc-echo-personal jabber-muc-wave-personal jabber-muc-beep-personal jabber-muc-beep jabber-muc-wave jabber-muc-echo jabber-muc-switch jabber-muc-display jabber-muc-scroll)))
 '(jabber-alert-presence-hooks (quote (jabber-presence-screen jabber-presence-beep jabber-presence-wave jabber-presence-switch jabber-presence-display jabber-presence-echo)))
 '(jabber-alert-presence-wave "/etc/libreoffice/basis-link/share/gallery/sounds/apert.wav")
 '(jabber-default-status "...")
 '(scroll-bar-mode nil)
 '(size-indication-mode t)
 '(text-mode-hook (quote (turn-on-auto-fill text-mode-hook-identify))))
(custom-set-faces
  ;; custom-set-faces 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.
 '(default ((t (:inherit nil :stipple nil :background "#333333" :foreground "#d2d2d2" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 98 :width normal :foundry "unknown" :family "DejaVu Sans Mono"))))
 '(border ((t nil)))
 '(cursor ((t (:background "#ddffdd"))))
 '(mode-line ((t (:inherit variable-pitch :background "grey10" :foreground "#444444" :box (:line-width 2 :color "grey10") :height 0.9))))
 '(vertical-border ((t (:foreground "#DC7A47" :width medium)))))

;;---------------------------------------------------------------------------------------------------------------
;; ctrl-tab,ctrl-shift-tab to move between buffers/windows
;;---------------------------------------------------------------------------------------------------------------
(defun switch-tab-or-window-forward ()
  (interactive)
  (if (one-window-p)
      (tabbar-forward-tab)
    (other-window 1)))

(defun switch-tab-or-window-backward ()
  (interactive)
  (if (one-window-p)
      (tabbar-backward-tab)
    (other-window -1)))

(global-set-key (kbd "<C-tab>") 'switch-tab-or-window-forward)
(add-hook 'org-mode-hook (lambda () (define-key org-mode-map (kbd "<C-tab>") 'switch-tab-or-window-forward)))
(global-set-key (kbd "<C-S-iso-lefttab>") 'switch-tab-or-window-backward)
(global-set-key (kbd "<C-S-tab>") 'switch-tab-or-window-backward)
(global-set-key (kbd "<C-f4>") 'delete-window)

(global-set-key "\C-x\C-c"
(lambda ()
"Intelligent Close Frame"
(interactive)
(if (eq (car (visible-frame-list)) (selected-frame))
(if (> (length (visible-frame-list)) 1)
(delete-frame (selected-frame))
(save-buffers-kill-emacs))
(delete-frame (selected-frame)))))

(global-set-key (kbd "C-=") 'text-scale-increase)
(global-set-key (kbd "C--") 'text-scale-decrease)

(setq mode-line-in-non-selected-windows nil)
(setq default-mode-line-format
      (quote
       (" "
        (:propertize global-mode-string
                     face 'mode-line-global-face)
        mode-line-frame-identification
        (:propertize (:eval (if (> (length default-directory) 17)
                   (concat "..." (substring default-directory -20))
                 default-directory))
                     face 'mode-line-folder-face)
        (:propertize mode-line-buffer-identification
                     face 'mode-line-filename-face)
        " "
        (:propertize mode-name
                     help-echo (format-mode-line minor-mode-alist)
                     face 'mode-line-mode-face)
        (:propertize mode-line-process
                     face 'mode-line-mode-process-face)
        " "
        (:propertize urgent-org-mode-line
                     face 'mode-line-tasks-face)
        " "
        "-%-"
        )))