                    ;; Haskell
                       haskell-mode
 
-                   ;; Java
-                      malabar-mode
-
                    ;; Javascript
-                      js2-mode
-                      ac-js2
                       jsx-mode
-                      react-snippets
 
                    ;; Markdown
                       markdown-mode
 
                    ;; Project nav
-                      ack-and-a-half
-                      projectile
-
-                   ;; R
-                      ess)
+                      projectile)
   "Packages required at launchtime")
 
+(when (not package-archive-contents)
+  (package-refresh-contents))
 (dolist (p my-packages)
   (when (not (package-installed-p p))
     (package-install p)))
 
+;; Initialize color-theme and load solarized
+(require 'color-theme)
+(color-theme-initialize)
+(add-to-list 'custom-theme-load-path "~/.emacs.d/emacs-color-theme-solarized" t)
+
 ;; global setup
 (dolist (mode '(menu-bar-mode tool-bar-mode scroll-bar-mode))
   (when (fboundp mode) (funcall mode -1)))
-(setq inhibit-startup-screen t)
-(setq auto-save-file-name-transforms `((".*" ,temporary-file-directory t))
-      backup-directory-alist `((".*" . ,temporary-file-directory)))
+(setq inhibit-startup-screen t
+      initial-scratch-message nil
+      initial-major-mode 'org-mode)
+(when window-system
+  (setq frame-title-format '(buffer-file-name "%f" ("%b"))))
+(setq tab-width 2
+      standard-indent 2
+      indent-tabs-mode nil)
+(setq make-backup-files nil)
+(setq backup-directory-alist `((".*" . ,temporary-file-directory)))
+(setq auto-save-file-name-transforms `((".*" ,temporary-file-directory t)))
+(defalias 'yes-or-no-p 'y-or-n-p)
+(setq echo-keystrokes 0.1
+      use-dialog-box nil
+      visible-bell t)
+(delete-selection-mode t)
+
+;;; magit
+(global-set-key (kbd "C-x g") 'magit-status)
 
 ;;; undo-tree
 (require 'undo-tree)

;;; Slather with elisp
(require 'package)
(add-to-list 'package-archives
  '("marmalade" . "http://marmalade-repo.org/packages/") t)
(add-to-list 'package-archives
  '("melpa" . "http://melpa.milkbox.net/packages/") t)
(package-initialize)

(when (not package-archive-contents)
    (package-refresh-contents))

(defvar my-packages '(starter-kit
                      starter-kit-bindings
                      starter-kit-lisp
                      starter-kit-js
                      starter-kit-ruby

                   ;; General
                      auto-complete
                      color-theme-solarized
                      dash-at-point
                      dirtree
                      powerline
                      rainbow-delimiters
                      tree-mode
                      undo-tree
                      windata
                      yaml-mode
                      yasnippet

                   ;; Clojure
                      ac-cider

(ac-config-default)

;;; solarized
(load-theme 'solarized t)
(defun endarken () (interactive) (load-theme 'solarized-dark t))
(defun enlighten () (interactive) (load-theme 'solarized-light t))
(global-set-key (kbd "C-c s") 'endarken)
