From e981f38910d38bd355034fd1cce5396212733220 Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Sun, 13 Dec 2009 01:48:04 +0530 Subject: [PATCH] More headway or emacs config. ERC colors and transparency --- .emacs | 73 ++++++++++++++++++++++++++++++++++++++++----- .emacs.d/irblack.el | 29 +++++++++++++++--- 2 files changed, 91 insertions(+), 11 deletions(-) diff --git a/.emacs b/.emacs index baa158b..7e28672 100644 --- a/.emacs +++ b/.emacs @@ -20,9 +20,9 @@ ;; GLOBAL (color-theme-initialize) -;(if window-system +(if window-system ; (color-theme-gentooish) -; (color-theme-dark-laptop)) + (color-theme-dark-laptop)) (color-theme-irblack) (bar-cursor-mode 1) @@ -71,9 +71,9 @@ ;; Enable ergoemacs layout -(setenv "ERGOEMACS_KEYBOARD_LAYOUT" "dv") ; US Dvorak layout -(load "~/.emacs.d/ergoemacs-keybindings-5.1/ergoemacs-mode") -(ergoemacs-mode 1) +;; (setenv "ERGOEMACS_KEYBOARD_LAYOUT" "dv") ; US Dvorak layout +;; (load "~/.emacs.d/ergoemacs-keybindings-5.1/ergoemacs-mode") +;; (ergoemacs-mode 1) ;; Highlight bad whitespace (global-whitespace-mode t) @@ -136,8 +136,66 @@ (setq calendar-longitude 78.5) (setq calendar-location-name "Hyderabad, India") +;; Start the server for emacsclient +;(server-start) + ;; Custom key maps -(global-set-key (kbd "C-c t") 'totd) +(defun set-keys (commands) + (mapcar (lambda (x) + (global-set-key (read-kbd-macro (first x)) (second x))) + commands)) +(set-keys '( + ("C-c t" totd) + ("C-c s p" (lambda () (interactive) + (if (shellfm-running-p) + (shellfm-pause) + ((shellfm 1) (shellfm-station-recommended 1))))) + ("C-c s n" shellfm-skip-track) + ("C-c s r" shellfm-station-recommended) + ("C-c s s" shellfm-station-artist) + ("C-c s m" shellfm-station-playlist) + ("C-c s l" shellfm-love-track) + ("C-c s a" shellfm-add-to-playlist) + ("C-c s q" shellfm 0) + ("C-c s i" shellfm-track-info) + ("M-s" save-buffer) + ("M-N" make-frame) + ("M-W" delete-frame) + ("M-w" ido-kill-buffer) + ("M-1" delete-other-windows) + ("M-!" delete-window) + ("M-2" split-window-horizontally) + ("M-@" split-window-vertically) + ("C-c C-a" beginning-of-line) + ("M-o" other-window) + ("M-O" other-window) + ("M-`" switch-to-next-frame) + ("M-~" switch-to-previous-frame) + )) + +;; Transparency +(set-frame-parameter (selected-frame) 'alpha '(85 85)) +(add-to-list 'default-frame-alist '(alpha 85 85)) +(eval-when-compile (require 'cl)) +(defun toggle-transparency () + (interactive) + (if (/= + (cadr (find 'alpha (frame-parameters nil) :key #'car)) + 10) + (set-frame-parameter nil 'alpha '(10 10)) + (set-frame-parameter nil 'alpha '(85 85)))) +(global-set-key (kbd "C-c C-t") 'toggle-transparency) + +;; (global-set-key (kbd "") +;; (lambda () (interactive) +;; (if (shellfm-running-p) +;; (shellfm-skip-track) +;; (shellfm 1)))) + +;; ERC stuff +;; (setq erc-encoding-coding-alist (quote (("#lisp" . utf-8) +;; ("#nihongo" . iso-2022-jp) ("#truelambda" . iso-latin-1) +;; ("#bitlbee" . iso-latin-1)))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Haskell mode @@ -246,4 +304,5 @@ (when (load (expand-file-name "~/.emacs.d/elpa/package.el")) - (package-initialize)) + (package-initialize) + (require 'starter-kit-elpa)) diff --git a/.emacs.d/irblack.el b/.emacs.d/irblack.el index a213d4e..9f29e95 100644 --- a/.emacs.d/irblack.el +++ b/.emacs.d/irblack.el @@ -14,17 +14,17 @@ (interactive) (color-theme-install '(color-theme-irblack - ((background-color . "#000000") - (background-mode . dark) + (;; (background-color . "#000000") + ;; (background-mode . dark) (border-color . "#454545") (cursor-color . "#A8FF60") (foreground-color . "#F6F3E8") (mouse-color . "#A8FF60")) - (default ((t (:background "#000000" :foreground "#F6F3E8")))) + (default ((t (:foreground "#F6F3E8")))) (vertical-border ((t (:background "#666666")))) (blue ((t (:foreground "blue")))) (border-glyph ((t (nil)))) - (buffers-tab ((t (:background "#141414" :foreground "#CACACA")))) + (buffers-tab ((t (:background "#141414" :foreground "#cacaca")))) (font-lock-comment-face ((t (:foreground "#7C7C7C")))) (font-lock-constant-face ((t (:foreground "#99CC99")))) (font-lock-doc-string-face ((t (:foreground "#A8FF60")))) @@ -80,6 +80,27 @@ (nxml-element-local-name ((t (:foreground "#96CBFE")))) (nxml-attribute-local-name ((t (:foreground "#FFD7B1")))) + ;; erc + (erc-default-face ((t (nil)))) + (erc-direct-msg-face ((t (:foreground "#007998")))) + (erc-input-face ((t (:foreground "#feffff")))) + (erc-bold-face ((t (:bold t :weight bold)))) + (erc-inverse-face ((t (:background "Black" :foreground "White")))) + (erc-underline-face ((t (:underline t)))) + (erc-prompt-face ((t (:foreground "#c3c6c8")))) + (erc-notice-face ((t (:foreground "#7c7c7c")))) + (erc-action-face ((t (:bold t :weight bold)))) + (erc-error-face ((t (:foreground "#007998")))) + (erc-timestamp-face ((t (:foreground "#7c7c7c")))) + (erc-nick-default-face ((t (:foreground "#feffff")))) + (erc-nick-msg-face ((t (:bold t :foreground "#007998" :weight bold)))) + ;; erc-dangerous-host-face + ;; erc-keyword-face + (erc-current-nick-face ((t (:foreground "#007998")))) + + ;; (erc-command-indicator-face ((t (:bold t :weight bold)))) + ;; (erc-header-line ((t (:background "grey90" :foreground "grey20")))) + ;; (erc-my-nick-face ((t (:bold t :foreground "brown" :weight bold)))) ))) (provide 'irblack)