            (minibuffer-keyboard-quit))))
   (ivy-mode +1)
 
-  (use-package ivy-posframe
-    :ensure t
-    :config
-    (setq ivy-display-function #'ivy-posframe-display-at-frame-center)
-    (ivy-posframe-enable)))
+  ;; Unsure about this one.
+  ;; (use-package ivy-posframe
+  ;;   :ensure t
+  ;;   :config
+  ;;   (setq ivy-display-function #'ivy-posframe-display-at-frame-center)
+  ;;   (ivy-posframe-enable))
+  )
 
 ;; Displays yasnippet previous inline when cycling through results.
 (use-package ivy-yasnippet

         :map counsel-ag-map
         ("C-c C-e" . ar/ivy-occur)
         :map wgrep-mode-map
         ("C-c C-c" . ar/wgrep-finish-edit))
  :init
  ;; `ar/ivy-occur',`ar/counsel-ag', and `ar/wgrep-finish-edit' replicate a more
  ;; streamlined result-editing workflow I was used to in helm-ag.
  (defun ar/ivy-occur ()
    (interactive)
    (if (not (window-minibuffer-p))
        (user-error "No completion session is active")
      (let* ((caller (ivy-state-caller ivy-last))

      (ar/vsetq ar/counsel-ag--default-locaction
                (read-directory-name "search in: " default-directory nil t)))
    (cond ((executable-find "rg")
           (counsel-rg nil ar/counsel-ag--default-locaction))
          ((executable-find "pt")
           (counsel-pt nil ar/counsel-ag--default-locaction))
          ((executable-find "ag")
           (counsel-ag nil ar/counsel-ag--default-locaction))
          (t
           (counsel-ack nil ar/counsel-ag--default-locaction))))

  (defun ar/wgrep-finish-edit ()
    (interactive)
    (let ((wgrep-auto-save-buffer t))
      (wgrep-finish-edit))
    (quit-window)
    (set-window-configuration ar/ivy-occur--win-config)
    (select-window (nth 0 (window-list))))

  (defun ar/wgrep-abort-changes ()
    (interactive)
    (wgrep-abort-changes)
    (quit-window)
    (set-window-configuration ar/ivy-occur--win-config)
    (select-window (nth 0 (window-list))))

  :config
  ;; Smex handles M-x command sorting. Bringing recent commands to the top.
  (use-package smex
