   (custom-set-faces
    '(default ((t (:background nil))))))
 
-(if (display-graphic-p)
-    (load-theme 'zenburn t)
-  (run-term-solarized))
+(if window-system
+    (setup-gui-env)
+  (setup-term-env))
 
 ;; Display column number along with line number
 (column-number-mode t)

;;(global-linum-mode t)

;; Turn on bracket matching
(show-paren-mode 1)


;; Set the theme
;; Zenburn for the emacs GUI
;; Solarized Dark for the emacs in terminal
(defun setup-gui-env()
  (load-theme 'zenburn t)
  (scroll-bar-mode -1)
  (tool-bar-mode -1))

(defun setup-term-env()
  (load-theme 'solarized t)
  (set-frame-parameter nil 'background-mode 'dark)
  (set-terminal-parameter nil 'background-mode 'dark)
