 
 (defun aim/on-frame-open (frame)
   (interactive)
-  ;;(message "before FRAME %s" (frame-parameters frame))
+  (message "before FRAME %s" (frame-parameters frame))
+  (message "before FRAME background-mode %s" (frame-parameter frame 'background-mode))
+  (message "before FRAME foreground-mode %s" (frame-parameter frame 'foreground-mode))
   (if (not (display-graphic-p frame))
       (progn
-	(if (and (equal (frame-parameter frame 'background-mode) 'dark)
+	(if (and (equal (frame-parameter frame 'background-mode) 'light)
 		 (aim/frame-colours-unspecified frame))
 	    (progn
 	      (set-frame-parameter frame 'background-color "#000000")
-	      (set-frame-parameter frame 'foreground-color "#FFFFFF")
-	(if (and (equal (frame-parameter frame 'background-mode) 'light)
-		 (aim/frame-colours-unspecified frame))
-	    (progn
-	      (set-frame-parameter frame 'background-color "#FFFFFF")
-	      (set-frame-parameter frame 'foreground-color "#000000")
-	;; (if (equal (frame-parameter frame 'background-color) "white")
-	;;     (set-frame-parameter frame 'background-color "brightwhite"))
-	      (message "after FRAME %s" (frame-parameters frame)))))))))
+	      (set-frame-parameter frame 'foreground-color "#FFFFFF"))
+	  (if (and (equal (frame-parameter frame 'background-mode) 'dark)
+		   (aim/frame-colours-unspecified frame))
+	      (progn
+		(set-frame-parameter frame 'background-color "#FFFFFF")
+		(set-frame-parameter frame 'foreground-color "#000000"))))))
+  (message "after FRAME %s" (frame-parameters frame)))
 
 ;; (aim/on-frame-open (selected-frame))
 ;; (add-hook 'after-make-frame-functions 'aim/on-frame-open 'append)

 '(custom-safe-themes
   (quote
    ("8aebf25556399b58091e533e455dd50a6a9cba958cc4ebb0aab175863c25b9a4" default)))
 '(helm-gtags-prefix-key "g")
 '(helm-gtags-suggested-key-mapping t)
 '(helm-locate-project-list (quote ("~/frobware/meerkat" "~/linux-4.11")))
 '(notmuch-saved-searches
   (quote
    ((:name "aos-pod" :query "tag:lists/aos-pod" :key "p" :sort-order newest-first :search-type nil)
     (:name "today" :query "date:today" :key "T" :sort-order oldest-first)
     (:name "inbox" :query "tag:inbox" :key "i")
     (:name "unread" :query "tag:unread" :key "u")
     (:name "flagged" :query "tag:flagged" :key "f")
     (:name "sent" :query "tag:sent" :key "t")
     (:name "drafts" :query "tag:draft" :key "d")
     (:name "ImageQualify" :query "ImageQualify")
     (:name "me" :query "date:today to:me is:unread"))))
 '(ns-command-modifier (quote meta))
 '(package-selected-packages
   (quote
    (atomic-chrome notmuch-labeler notmuch-orgmode notmuch-org-mode notmuch gnus-desktop-notify magithub go-stacktracer golint irony rtags fringe-helper git-gutter company magit go-projectile terraform-mode direnv w3m gist pass kubernetes-overview helm-ls-git yaml-mode wgrep-ag vcl-mode use-package smex racer python-mode protobuf-mode peep-dired markdown-mode magit-gh-pulls itail helm-rtags helm-gtags guide-key google-c-style godoctor go-guru go-eldoc go-dlv git-gutter-fringe dockerfile-mode company-irony company-go cmake-mode cmake-ide clang-format cargo ag)))
 '(password-store-password-length 12)
 '(send-mail-function (quote smtpmail-send-it)))

(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(ediff-even-diff-A ((t (:background "dim gray"))))
 '(ediff-even-diff-B ((t (:background "dim gray"))))
 '(ediff-odd-diff-B ((t (:background "dim gray")))))

 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(ag-arguments (quote ("--smart-case" "--stats" "--follow" "--silent")))
 '(c-default-style
   (quote
    ((c-mode . "linux")
