   '("" invocation-name " - " (:eval (if (buffer-file-name)
                                        (abbreviate-file-name (buffer-file-name))
                                      "%b"))))
-(require 'highlight-indentation)
-(setq highlight-indentation-offset 2)
-;(set-face-background 'highlight-indentation-face "#e3e3d3")
-;(set-face-background 'highlight-indentation-current-column-face "#c3b3b3")
-
-; line numbers
-;; banned for slowness
-;;(add-hook 'find-file-hook (lambda () (linum-mode 1)))
-;;(linum-mode t)
-;;(setq linum-format " %d ")
-
-; improved bar at the botton
-(require 'powerline)
-(powerline-default-theme)
-
-(load-theme 'leuven t)
+
+(use-package highlight-indentation
+  :ensure t
+  :init
+  (setq highlight-indentation-offset 2))
+
+(use-package powerline
+  :ensure t
+  :config
+  (progn
+    (powerline-default-theme))
+)
+
+(use-package leuven-theme
+  :ensure t
+  :config
+  (load-theme 'leuven t))
 
 (setq show-trailing-whitespace t)
 (setq-default show-trailing-whitespace t)

              vc-ignore-dir-regexp
              tramp-file-name-regexp))

;; work setup
(if (file-exists-p "~/.emacs.suse.d/init.el")
    (load-file "~/.emacs.suse.d/init.el"))

(require 'org)
(setq org-src-fontify-natively t)
(setq org-fontify-whole-heading-line t)
(setq org-pretty-entities t)

;; Org mode
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
(define-key org-mode-map (kbd "M-RET") nil)

;; org-trello major mode for all .trello files
(add-to-list 'auto-mode-alist '("\\.trello$" . org-mode))

;; add a hook function to check if this is trello file, then activate the org-trello minor mode.
(add-hook 'org-mode-hook
          (lambda ()
            (let ((filename (buffer-file-name (current-buffer))))
              (when (and filename (string= "trello" (file-name-extension filename)))
              (org-trello-mode)))))

(provide 'init)
;;; init.el ends here

;;; init.el --- Duncan Mac-Vicar P. emacs init
(defconst emacs-start-time (current-time))
(require 'cl)
;; do this early
(if (fboundp 'menu-bar-mode) (menu-bar-mode -1))
(if (fboundp 'tool-bar-mode) (tool-bar-mode -1))
;;(if (fboundp 'scroll-bar-mode) (scroll-bar-mode -1))

(require 'package)
(setq package-enable-at-startup nil)
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))
(add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/"))
(package-initialize)

(unless (package-installed-p 'use-package)
  (package-refresh-contents)
  (package-install 'use-package))

(eval-when-compile
  (require 'use-package))
(require 'diminish)
(require 'bind-key)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Appearance & Behavior
;;
(use-package ido-vertical-mode :ensure t)
(use-package flx-ido
  :ensure t
  :defer t
  :init
  (progn
    (setq gc-cons-threshold (* 20 (expt 2 20)) ; megabytes
          ido-use-faces nil)
    (setq ido-create-new-buffer 'always))
  :config
  (ido-mode 1)
  (ido-everywhere 1)
  (flx-ido-mode 1))

(use-package popwin :ensure t)

(defun set-frame-size-according-to-resolution ()
  (interactive)
  (when (display-graphic-p)
