 ;; -*- lexical-binding: t; -*-
+
+(when (eq system-type 'darwin)
+  (progn
+    (setq mac-command-modifier 'meta
+	  mac-right-option-modifier 'none
+	  mac-option-modifier 'super
+	  shell-command-switch "-lc")
+    (global-set-key "\M-`" 'other-frame)))
 
 (add-to-list 'load-path (expand-file-name "gcmh" user-emacs-directory))
 (require 'gcmh)

	    (setq flymake-diagnostic-functions (list 'lsp--flymake-backend))))

(add-hook 'minibuffer-setup-hook 'aim/minibuffer-setup)

(when (eq system-type 'darwin)
  (progn
    (setq mac-command-modifier 'meta
	  mac-right-option-modifier 'none
	  mac-option-modifier 'super
	  shell-command-switch "-lc")
    (global-set-key "\M-`" 'other-frame)))

(and (executable-find "direnv")
     (use-package direnv

    (load bootstrap-file nil 'nomessage)
    (straight-use-package 'use-package)))

(defvar use-nix-epkgs t)

(if use-nix-epkgs
    (require 'use-package)
  (progn
    (message "Straight UP!")
    (setq straight-use-package-by-default t
	  straight-repository-branch "develop"
	  straight-check-for-modifications nil
	  straight-disable-native-compile t
	  straight-disable-native-compilation t)
    (setq-default straight-vc-git-default-clone-depth 1)
    (aim/straight-bootstrap)))

(setq use-package-always-defer nil
      use-package-always-ensure t
      use-package-ignore-unknown-keywords t
      use-package-verbose nil)

(setq warning-suppress-log-types '((comp) (use-package)))

(use-package hrs
  :ensure nil
  :straight (:type built-in)
  :load-path (lambda () (expand-file-name "hrs" user-emacs-directory))
  :commands (hrs/reset-font-size
	     hrs/increase-font-size
	     hrs/default-font-size)
  :bind (("C-)" . hrs/reset-font-size)
	 ("C-+" . hrs/increase-font-size)
	 ("C--" . hrs/decrease-font-size)))

(use-package modus-themes
  :ensure nil
  :straight (:type built-in)
  :load-path (lambda () (expand-file-name "modus-themes" user-emacs-directory))
  :commands (modus-themes-load-themes
	     modus-themes-load-operandi
