 (run-at-time "10 min" (* 10 60) 'desktop-save-in-desktop-dir)
 
 ;;; General appearance
-(setq battery-update-interval 300)
-(setq display-time-24hr-format t)
-; display time in modeline
-(display-time-mode 1)
-
-(setq tool-bar-mode nil)
-(setq visible-bell t)
-
 ; frame appearance
 (setq initial-frame-alist '(
                             (menu-bar-lines . 0)

  "Push to gerrit (develop)"
  '(magit-push-to-gerrit "develop"))

(setq browse-url-browser-function (quote browse-url-generic))
(setq browse-url-generic-args (quote ("--incognito" "--user-data-dir=/tmp")))
(setq browse-url-generic-program "google-chrome")

; http://emacs-fu.blogspot.com/2008/12/showing-line-numbers.html
(require 'linum)
(global-linum-mode t)
(global-set-key (kbd "<f6>") 'linum-mode)

; join this and next line
(global-set-key [f8] (lambda() (interactive) (join-line 1)))

; http://nflath.com/2009/07/more-random-emacs-config/
(require 'uniquify)
(setq uniquify-buffer-name-style 'reverse)
(setq uniquify-separator "/")
; re-uniquify after a buffer gets killed
(setq uniquify-after-kill-buffer-p t)
; don't mess with special buffers (*scratch*, etc.)
(setq uniquify-ignore-buffers-re "^\\*")

;;; General modes
(add-hook 'text-mode-hook
          '(lambda () (auto-fill-mode t) ))
(add-hook 'text-mode-hook
          '(lambda () (setq fill-column 78)))

;;; Programming modes
;; Magit
(use-package magit :ensure t)
(global-set-key [(control x) (v) (b)] 'magit-status)
(global-set-key (kbd "C-x g") 'magit-status)
(global-magit-file-mode t)
(setq magit-repository-directories '(
				     ("~/criteo" . 1)
				     ("~/dotfiles" . 0)
				     ("~/.mutt" . 0)))

; this colours your text over the specified limit in red
(defun font-lock-width-keyword (width)
  "Return a font-lock style keyword for a string beyond width WIDTH

(font-lock-add-keywords 'java-mode (font-lock-width-keyword 80))
(font-lock-add-keywords 'borgmon-mode (font-lock-width-keyword 80))

;; Python
(setq py-indent-offset 2)

;; Ruby
(use-package inf-ruby
  :init
  (add-hook 'ruby-mode-hook 'inf-ruby-minor-mode))
(use-package smartparens
  :init
