     (setq epa-pinentry-mode 'loopback))
 
 ;; eshell settings
+(defvar is-eterm-buffer nil
+  "If set to t, the function 'my/eshell-exit' will exit the current frame. Otherwise, it will kill the current eshell buffer.")
+
+(defun my/eterm ()
+  "Opens separate frame specifically for eshell"
+  (interactive)
+  (make-frame-command)
+  (set-frame-size (selected-frame) 90 24)
+  (eshell 'new)
+  (make-local-variable 'is-eterm-buffer)
+  (setq mode-line-format nil)
+  (setq-local is-eterm-buffer t)
+  (select-frame-set-input-focus (selected-frame)))
+
+(defun my/eshell-exit ()
+  "Wrapper for eshell/exit that closes the frame if opened by my/eterm"
+  (if is-eterm-buffer
+      (delete-frame)
+    (eshell/exit)))
+
 (defun my/system-name ()
   "Returns system-name without a '.*' suffix"
     (if (cl-search "." system-name)

(save-place-mode 1)
;; line numbers
(global-display-line-numbers-mode 1)
;; highlight current line
(global-hl-line-mode)
;; Turn off unbroken single line wrap indicators
(fringe-mode '(0 . 0))
;; Graphical mode tweaks
(when (display-graphic-p)
  ;; macOS-specific graphical settings
  (when (string-equal system-type 'darwin)
    (setq ns-use-srgb-colorspace nil))

  ;; enable base16-dracula theme for emacs
  (setq custom-safe-themes t)
  (load-theme 'base16-dracula t)

  ;; telephone-line settings
  (setq telephone-line-primary-left-separator 'telephone-line-tan-left
        telephone-line-secondary-left-separator 'telephone-line-tan-hollow-left
        telephone-line-primary-right-separator 'telephone-line-tan-right
        telephone-line-secondary-right-separator 'telephone-line-tan-hollow-right)
  (setq telephone-line-height 24
        telephone-line-evil-use-short-tag t)
  ;; Font settings
  (add-to-list 'default-frame-alist '(font . "Iosevka Medium-16")))

;; Load telephone-line
(telephone-line-mode 1)

;; Keep backups and autosaves in /tmp
(setq backup-directory-alist

  (load bootstrap-file nil 'nomessage))

;; install packages
(straight-use-package 'use-package)

;; base16 themes for emacs
(when (display-graphic-p)
  (use-package base16-theme
    :straight t
    :init
      (when (string-equal system-type 'darwin)
        (setq ns-use-srgb-colorspace nil)))
    :config
    (load-theme 'base16-dracula t)
  ;; highlight current line
  (global-hl-line-mode))

;; git manager
(use-package magit
  :straight t)

;; undo-tree
(use-package undo-tree
  :straight t)
(global-undo-tree-mode)

;; dash
(use-package dash
  :straight t)

;; monitor
(use-package monitor
  :straight t)

;; goto-chg
(use-package goto-chg
  :straight t)

;; vim-like bindings for emacs
(use-package evil
  :straight t
  :config
  (evil-mode 1))

;; vim motions without numbers
(use-package evil-easymotion
  :straight t)

;; inline searching with the s key
(use-package evil-snipe
  :straight t
  :config
  (evil-snipe-mode +1)
  (evil-snipe-override-mode +1))

;; commenting with vim motions
(use-package evil-commentary
  :straight t
  :config
  (evil-commentary-mode))

;; evil-integration for org-mode
(use-package org-evil
  :straight t)

;; Fancy bullets in org-mode
(use-package org-bullets
  :straight t
  :hook (org-mode . org-bullets-mode))

;; mode-line customization with evil support
(use-package telephone-line
  :straight t
  :config
  (setq telephone-line-primary-left-separator 'telephone-line-tan-left
        telephone-line-secondary-left-separator 'telephone-line-tan-hollow-left
        telephone-line-primary-right-separator 'telephone-line-tan-right
        telephone-line-secondary-right-separator 'telephone-line-tan-hollow-right)
  (setq telephone-line-height 24
        telephone-line-evil-use-short-tag t)
  (telephone-line-mode 1))

;; smart managing of parentheses
(use-package paredit
  :straight t
  :config
  (autoload 'enable-paredit-mode "paredit" "Turn on pseudo-structural editing of Lisp code." t)
  :hook ((emacs-lisp-mode eval-expression-minibuffer-setup emacs-lisp-mode ielm-mode lisp-mode lisp-interaction-mode scheme-mode) . enable-paredit-mode))

;; make sexps easier to distinguish
(use-package rainbow-delimiters
  :straight t
  :hook ((emacs-lisp-mode eval-expression-minibuffer-setup emacs-lisp-mode ielm-mode lisp-mode lisp-interaction-mode scheme-mode) . rainbow-delimiters-mode))

;; epub reader
(use-package nov
  :straight t)

;; Settings
;;=========
