Linux
Radio

 

.emacs

(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)

;;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))))

;;GNUS ---------http://www.emacswiki.org/emacs/GnusGmail--------------------------

;(add-to-list 'gnus-secondary-select-methods '(nnimap "gmail"
; (nnimap-address "imap.gmail.com")
; (nnimap-server-port 993)
; (nnimap-stream ssl)))

;(setq gnus-select-method '(nnimap "gmail"
; (nnimap-address "imap.gmail.com")
; (nnimap-server-port 993)
; (nnimap-stream ssl)))

;;read mail nnmbox
;(setq gnus-secondary-select-methods '((nnmbox "")))

;Also, if you want to take advantage of using gmail’s SMTP server (so gmail keeps track of your sent mail),
;you can use the following settings:
;(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 "yourcompany.com")


;;Reply-to with the same address as it was sent to
;(setq gnus-posting-styles
; '(((header "to" "myname@gmail.com")
; (address "myname@gmail.com"))
; ((header "to" "blah@blah.com")
; (address "blah@blah.com"))
; ((header "cc" "myname@gmail.com")
; (address "myname@gmail.com"))
; ((header "cc" "blah@blah.com")
; (address "blah@blah.com"))))

;;Bitlbee ---------------------------------------------------------------------------------------
(require 'bitlbee)
; 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 . "#2d2d2d")
(background-mode . dark)
(border-color . "#000000")
(cursor-color . "#ddffdd")
(foreground-color . "#cccccc")
(mouse-color . "#cd0000"))
(fringe ((t (:background "#121212"))))
(vertical-border ((t (:foreground "#111111"))))
(mode-line ((t (:inherit variable-pitch :foreground "#444444" :background "grey10" :box (:color "grey10" :line-width 4) :height 0.9))))
(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 6)))))
(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 "#2b2b2b" :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 "") 'ansi-term)
;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.
'(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)
'(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 "..."))
(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 "#cccccc" :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"))))
'(mode-line ((t (:inherit variable-pitch :background "grey10" :foreground "#444444" :box (:line-width 4 :color "grey10") :height 0.9)))))

;;transparency ----------------------------------------------------------------------------------------
(defun djcb-opacity-modify (&optional dec)
"modify the transparency of the emacs frame; if DEC is t,
decrease the transparency, otherwise increase it in 10%-steps"
(let* ((alpha-or-nil (frame-parameter nil 'alpha)) ; nil before setting
(oldalpha (if alpha-or-nil alpha-or-nil 100))
(newalpha (if dec (- oldalpha 10) (+ oldalpha 10))))
(when (and (>= newalpha frame-alpha-lower-limit) (<= newalpha 100)) (modify-frame-parameters nil (list (cons 'alpha newalpha)))))) ;; C-8 will increase opacity (== decrease transparency) ;; C-9 will decrease opacity (== increase transparency ;; C-0 will returns the state to normal (global-set-key (kbd "C-8") '(lambda()(interactive)(djcb-opacity-modify))) (global-set-key (kbd "C-9") '(lambda()(interactive)(djcb-opacity-modify t))) (global-set-key (kbd "C-0") '(lambda()(interactive) (modify-frame-parameters nil `((alpha . 100))))) ;; ---------------------------------------------------------------------- ;; On-Screen Display alerts (if (and (display-graphic-p) (file-executable-p "/usr/bin/osd_cat")) (defun osd (fmt &rest args) "Display message on X screen." (let ((opts "-p bottom -A right -l 1 \ -f '-*-*-bold-r-*-*-34-*-*-*-*-*-iso10646-1'") (msg (apply 'format (concat fmt "\n") args))) (start-process "osd" nil shell-file-name shell-command-switch (format "echo %s | osd_cat %s" (shell-quote-argument msg) opts)))) (defalias 'osd 'message)) (defun jabber-message-osd (from buffer text proposed-alert) "Display a message using the osd_cat program." (let ((jid (if (jabber-muc-sender-p from) from (jabber-jid-user from)))) (osd (cdr (jabber-activity-lookup-name jid))))) (add-hook 'jabber-alert-message-hooks 'jabber-message-osd) (add-to-list 'auto-mode-alist '("\\.rar$\\'" . archive-mode)) ;;------------------------------------------------------------------------ ;; 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 "") 'switch-tab-or-window-forward)
(add-hook 'org-mode-hook (lambda () (define-key org-mode-map (kbd "") 'switch-tab-or-window-forward)))
(global-set-key (kbd "") 'switch-tab-or-window-backward)
(global-set-key (kbd "") 'switch-tab-or-window-backward)
(global-set-key (kbd "") '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)
" "
"-%-"
)))