 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Presentation mode
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(setq presentation-mode-enabled nil)
-
-(defun presentation-mode ()
-  "Set frame size, theme and fonts suitable for presentation."
-  (interactive)
-  (setq font-size-pt 13)
-  (set-face-attribute 'default nil :height (* font-size-pt 10))
-  (set-frame-position (selected-frame) 0 0) ;; pixels x y from upper left
-  (set-frame-size (selected-frame) 80 25)  ;; rows and columns w h
-  (funcall default-light-theme) ;; change to default light theme
-  (delete-other-windows)
-  (setq presentation-mode-enabled t)
-  )
-
-(defun coding-zombie-mode ()
-  "Revert to default coding mode."
-  (interactive)
-  (setq font-size-pt default-font-size-pt)
-  (set-face-attribute 'default nil :height (* font-size-pt 10))
-  (full-screen-center)
-  (funcall default-theme) ;; change to default theme
-  (split-window-right)
-  (setq presentation-mode-enabled nil)
-  )
-
-(defun toggle-presentation-mode ()
-  "Toggle between presentation and default mode."
-  (interactive)
-  (if presentation-mode-enabled
-      (coding-zombie-mode)
-    (presentation-mode)))
+(define-minor-mode presentation-mode
+  "Minor mode to change to light theme with bigger fonts for better readability
+during presentations."
+  :init-value nil
+  :lighter    " Prez"
+  :global     t
+  (if presentation-mode
+      ;; Enable presentation mode
+      (progn
+        (modi/font-size-adj +3)
+        (set-frame-size (selected-frame) 80 25) ; rows and columns w h
+        (funcall default-light-theme) ; change to default light theme
+        (delete-other-windows))
+    ;; Disable presentation mode
+    (progn
+      (modi/font-size-reset)
+      (full-screen-center)
+      (funcall default-theme)
+      (split-window-right)
+      (other-window 1)
+      (toggle-between-buffers))))
 
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

 ("<f2>"        . modi/toggle-menu-bar)
 ;; F8 key can't be used as it launches the VNC menu
 ;; It can though be used with shift/ctrl/alt keys
 ("<S-f8>"      . toggle-presentation-mode)
 ;; Make Control+mousewheel do increase/decrease font-size
 ;; Source: http://ergoemacs.org/emacs/emacs_mouse_wheel_config.html
 ("<C-mouse-1>" . modi/font-size-reset) ; C + left mouse click

;; Time-stamp: <2015-02-09 13:57:23 kmodi>

;; Set up the looks of emacs

