            (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

      (ar/vsetq ar/counsel-ag--default-locaction
                (read-directory-name "search in: " default-directory nil t)))
    (cond ((executable-find "rg")
           ;; (ar/vsetq helm-ag-base-command "rg --vimgrep --no-heading --ignore-case")
           (counsel-rg nil ar/counsel-ag--default-locaction))
          ((executable-find "pt")
           ;; (ar/vsetq helm-ag-base-command "pt -e --nocolor --nogroup")
           (counsel-pt nil ar/counsel-ag--default-locaction))
          ((executable-find "ag")
           (counsel-ag nil ar/counsel-ag--default-locaction))
          (t
           ;; (ar/vsetq helm-ag-base-command "ack --nocolor --nogroup")
           (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))
  :config
  ;; Smex handles M-x command sorting. Bringing recent commands to the top.
  (use-package smex

          (setq-local ivy--directory ivy--directory)
          (ivy-wgrep-change-to-wgrep-mode))
        (ivy-exit-with-action
         (lambda (_)
           (pop-to-buffer buffer)
           (delete-other-windows))))))

  (defun ar/counsel-ag (arg)
    (interactive "P")
