 ;;   (or frame-background-mode
 ;;       (setq frame-background-mode 'dark)))
 
+(defun aim/set-cursor-colour nil
+  (interactive)
+  (if (and (display-graphic-p) aim/is-linux)
+      (set-face-background 'cursor "yellow")
+    (shell-command (format "echo -ne '\\033]12;#00ff00\\007' > /proc/%d/fd/1" (emacs-pid)))))
+
 (fset 'yes-or-no-p 'y-or-n-p)
 
 (put 'narrow-to-region 'disabled nil)

  (interactive)
  (shell-command (format "go run %s" (buffer-file-name (current-buffer)))))

(defun isearch-face-settings ()
  (interactive)
  (set-face-foreground 'isearch "black")
  (set-face-background 'isearch "yellow")
  (set-face-foreground 'lazy-highlight "black")
  (set-face-background 'lazy-highlight "orange"))

(eval-after-load "isearch"
  `(isearch-face-settings))

(defun aim/occur-go-public-functions ()
  (interactive)

  :config (setq dumb-jump-selector 'helm) ;;(setq dumb-jump-selector 'ivy)
  :ensure t)

(use-package pinentry
  :ensure t)

(defun aim/frame-colours-unspecified (frame)
  (interactive)
  (let ((fg (face-attribute 'default :foreground frame))
	(bg (face-attribute 'default :background frame)))
    (and (equal fg "unspecified-fg") (equal bg "unspecified-bg"))))

(defun aim/on-frame-open (frame)
  (interactive)
  ;;(message "before FRAME %s" (frame-parameters frame))
  (if (not (display-graphic-p frame))
      (progn
	(if (and (equal (frame-parameter frame 'background-mode) 'dark)
		 (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)))))))))

;; (aim/on-frame-open (selected-frame))
;; (add-hook 'after-make-frame-functions 'aim/on-frame-open 'append)

(use-package server
  :ensure t
