Skip to content

Instantly share code, notes, and snippets.

@zc00gii
Created October 10, 2010 19:06
Show Gist options
  • Save zc00gii/619471 to your computer and use it in GitHub Desktop.
Save zc00gii/619471 to your computer and use it in GitHub Desktop.
;;; Tell emacs where slime/swank is.
(add-to-list 'load-path "~/lisp/emacs/slime")
(add-to-list 'load-path "~/lisp/emacs/slime/contrib")
(add-to-list 'load-path "~/lisp/emacs/emacs-chess")
(add-to-list 'load-path "~/lisp/nisp/emacs")
(add-to-list 'load-path "~/lisp/nisp")
(add-to-list 'load-path "~/lisp/nisp/emacs/slime/")
(add-to-list 'load-path "~/lisp/nisp/emacs/slime/contrib")
(add-to-list 'load-path "~/lisp")
(add-to-list 'load-path "~/lisp/emacs")
(add-to-list 'load-path "~/lisp/zisp/emacs")
(add-to-list 'load-path "~/haskell/haskell-mode/")
(add-to-list 'load-path "~/lisp/magit")
(add-to-list 'load-path "~/lisp/emacs/emms/lisp")
(add-to-list 'load-path "~/lisp/emacs/ooc-mode")
(add-to-list 'load-path "~/.emacs.d")
;;; various libraries that slime will use, plus slime
(require 'inf-lisp)
(require 'slime)
(require 'inferior-slime)
(require 'slime-autodoc)
(require 'nisp-erc-cmd)
(require 'nisp-slime)
(require 'gist)
(require 'erc-servers)
(require 'paredit)
(require 'magit)
(require 'sudoku)
(require 'erc-cmd)
(require 'emms-setup)
(require 'erc-chess)
(require 'asm-mode-extensions)
(require 'ezbl)
(require 'eshell)
(require 'ooc-mode)
(require 'esh-commands)
(require 'ooc-mode)
(require 'flymake-ooc)
(require 'lua-mode)
(require 'awesome)
(load "~/emacs/haskellmode-emacs/haskell-site-file")
(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)
(semantic-mode 1)
(global-semantic-idle-summary-mode 1)
(emms-all)
(emms-standard)
(emms-default-players)
;; Show the current track each time EMMS
;; starts to play a track with "NP : "
(add-hook 'emms-player-started-hook 'emms-show)
(setq auto-mode-alist (cons '("\.lua$" . lua-mode) auto-mode-alist))
(autoload 'lua-mode "lua-mode" "Lua editing mode." t)
;; When asked for emms-play-directory,
;; always start from this one
(setq emms-source-file-default-directory "~/music/")
(tool-bar-mode -1)
(menu-bar-mode -1)
(scroll-bar-mode -1)
(defvar *volume* 100)
(defvar *mutedp* nil)
(define-key paredit-mode-map [(control ?\j)] nil)
(define-key paredit-mode-map (kbd "RET") 'paredit-newline)
(global-set-key (kbd "<XF86AudioPlay>") (lambda () (cond (emms-player-playing-p
(minibuffer-message "Pausing your playlist")
(emms-start))
((not emms-player-playing-p)
(minibuffer-message "Resuming your playlist")
(emms-start)))))
(global-set-key (kbd "<f5>") 'find-file)
(global-set-key (kbd "<f11>") 'save-buffer)
(global-set-key (kbd "<f6>") (lambda () (interactive) (kill-buffer (current-buffer))))
(defun change-volume (downp)
(cond (downp (if (<= 0 (- *volume* 1))
(setf *volume* (- *volume* 1))))
((not downp) (if (>= 100 (+ *volume* 1))
(setf *volume* (+ *volume* 1)))))
(shell-command-to-string
(format "amixer set Master %d%%" *volume*))
(minibuffer-message (format "Set volume to %d%%" *volume*)))
(defun awesome-paredit-hook ()
(paredit-mode t)
(turn-on-eldoc-mode)
(eldoc-add-command
'paredit-backward-delete
'paredit-close-round)
(local-set-key (kbd "RET") 'electrify-return-if-match)
(eldoc-add-command 'electrify-return-if-match)
(show-paren-mode t))
(add-hook 'lisp-mode-hook 'awesome-paredit-hook)
(add-hook 'emacs-lisp-mode-hook 'awesome-paredit-hook)
(defun mute ()
(interactive)
(cond ((not *mutedp*)
(shell-command-to-string "amixer set Master mute")
(minibuffer-message "Muted the speakers")
(setf *mutedp* t))
(*mutedp*
(shell-command-to-string "amixer set Master unmute")
(minibuffer-message "Unmuted the speakers")
(setf *mutedp* nil))))
(global-set-key (kbd "<XF86Copy>") 'kill-ring-save)
(global-set-key (kbd "<XF86Cut>") 'kill-region)
(global-set-key (kbd "<XF86Paste>") 'yank)
(global-set-key (kbd "<XF86AudioMute>") 'mute)
(global-set-key (kbd "<XF86AudioLowerVolume>") (lambda () (interactive) (change-volume t)))
(global-set-key (kbd "<XF86AudioRaiseVolume>") (lambda () (interactive) (change-volume nil)))
(global-set-key (kbd "<XF86Favorites>") (lambda () (interactive)
(switch-to-buffer "*slime-repl sbcl*")))
(global-set-key (kbd "<XF86Documents>") 'magit-status)
(global-set-key (kbd "<XF86MailForward>") 'switch-to-buffer)
(global-set-key (kbd "<XF86Close>") (lambda () (interactive)
(kill-buffer (current-buffer))))
(global-set-key (kbd "<f31>") (lambda () (interactive) ;; Open HoW stuff
(find-file "~/programming/lisp/how/how.asd")
(find-file "~/programming/lisp/how/packages.lisp")
(find-file "~/programming/lisp/how/src/sprite.lisp")
(find-file "~/programming/lisp/how/src/health.lisp")
(find-file "~/programming/lisp/how/src/image.lisp")))
(global-set-key (kbd "<f32>") (lambda () (interactive) ;; Open Amiga Juggler stuff
(find-file "~/programming/lisp/juggler/juggler.asd")
(find-file "~/programming/lisp/juggler/src/juggler.lisp")
(find-file "~/programming/lisp/juggler/src/materials.lisp")
(find-file "~/programming/lisp/juggler/src/globals.lisp")
(find-file "~/programming/lisp/juggler/src/render.lisp")))
(setq w3m-coding-system 'utf-8
w3m-file-coding-system 'utf-8
w3m-file-name-coding-system 'utf-8
w3m-input-coding-system 'utf-8
w3m-output-coding-system 'utf-8
w3m-terminal-coding-system 'utf-8)
(setq browse-url-browser-function 'browse-url-generic
browse-url-generic-program "/home/zc00gii/programming/uzbl/script.sh")
(defun reverse-string (string)
(declare (string string))
(concat (reverse (string-to-list string))))
(defun check-extension (extension buffer)
(declare (string extension buffer))
(string= (substring (reverse-string buffer) 0 (string-width extension)) (reverse-string extension)))
;;; Add more lisps to this lisp if/when you have them.
(setq slime-lisp-implementations
'((sbcl ("sbcl"))))
(slime-setup '(slime-repl
slime-fancy-inspector slime-repl slime-asdf
slime-parse slime-mrepl
slime-autodoc
slime-references
slime-fancy))
(autoload 'python-mode "python-mode.el" "Python mode." t)
(setq auto-mode-alist (append '(("/*.\.py$" . python-mode)) auto-mode-alist))
(set-frame-parameter (selected-frame) 'alpha ' (60 60))
(add-to-list 'default-frame-alist '(alpha 60 60))
(set-background-color "black")
(set-foreground-color "white")
;(defun shell () (interactive) (term "/bin/bash"))
(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.
'(browse-url-browser-function (quote browse-url-generic))
'(browse-url-generic-program "/home/zc00gii/bin/chrome")
'(c-basic-offset 4)
'(c-default-style (quote ((c-mode . "linux") (java-mode . "java") (awk-mode . "awk") (other . "gnu"))))
'(erc-autojoin-channels-alist (quote (("oftc.net" "#awesome" "#ck" "#gc-linux") ("rizon.net" "#zen-sources") ("devnode.net" "#devnode" "#wtfwjd" "#liquid") ("ztecnet.net" "#ztecnet") ("prison.net" "#wiidevot" "#wiihelp" "#hackmii" "#wiidev" "#wadder" "#0rangechicken" "#1ntrusion" "#wiilinux") ("freenode.net" "##linux" "#archlinux" "#archlinux-offtopic" "#1ntrusion" "#cios" "##freenode" "#botters" "#freenode" "#defocus" "#fairuseday" "#shellium"))))
'(erc-autojoin-domain-only t)
'(erc-autojoin-mode t)
'(erc-modules (quote (autoaway button completion dcc fill irccontrols list log match menu move-to-prompt netsplit networks noncommands readonly ring scrolltobottom stamp track truncate)))
'(erc-track-showcount nil)
'(erc-track-switch-direction (quote importance))
'(erc-whowas-on-nosuchnick t)
'(indent-tabs-mode t)
'(ooc-library-path "/home/zc00gii/ooc/libs")
'(ooc-rock-dist "/home/zc00gii/ooc/rock")
'(tab-width 4))
(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 "black" :foreground "white" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 90 :width normal :foundry "Adobe" :family "Terminus"))))
'(erc-current-nick-face ((t (:foreground "purple4" :weight bold))))
'(erc-default-face ((t (:foreground "DarkTurquoise"))))
'(erc-input-face ((t (:foreground "DarkTurquoise"))))
'(erc-my-nick-face ((t (:foreground "white" :weight bold))))
'(erc-nick-msg-face ((t (:foreground "green" :weight bold))))
'(erc-prompt-face ((t (:background "red" :foreground "blue" :weight bold))))
'(mode-line ((((class color) (min-colors 88)) (:background "blue4" :foreground "green4" :box (:line-width -1 :style released-button)))))
'(mode-line-inactive ((default (:inherit mode-line)) (((class color) (min-colors 88) (background dark)) (:background "green4" :foreground "blue4" :box (:line-width -1 :color "blue") :weight light)))))
(setq default-right-fringe-width 0)
(setq default-left-fringe-width 0)
(setq window-min-width 0)
(setq window-min-height 0)
(setq erc-save-buffer-on-part t)
(setq erc-log-channels-directory "~/docs/irc_logs/")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment