diff --git a/emacs/.emacs.d/config/init-dired.el b/emacs/.emacs.d/config/init-dired.el index 949b2c9..80c6f29 100644 --- a/emacs/.emacs.d/config/init-dired.el +++ b/emacs/.emacs.d/config/init-dired.el @@ -4,4 +4,23 @@ :config (evil-collection-dired-setup)) +;; Add a toggleable dired sidebar +(use-package dired-sidebar + :config + (defun winum-assign-0-to-dired-sidebar () + (when (equal major-mode 'dired-sidebar-mode) 0)) + (add-to-list 'winum-assign-functions #'winum-assign-0-to-dired-sidebar) + (add-hook 'dired-sidebar-mode-hook + (lambda () + (unless (file-remote-p default-directory) + (auto-revert-mode)))) + (add-hook 'dired-sidebar-mode-hook #'hide-mode-line-mode) + :general + (leader-map "d" #'dired-sidebar-toggle-sidebar) + :custom + (dired-sidebar-theme 'nerd) + (dired-sidebar-should-follow-file t) + (dired-sidebar-pop-to-sidebar-on-toggle-open nil) + (dired-sidebar-no-delete-other-windows t)) + (provide 'init-dired) diff --git a/emacs/.emacs.d/config/init-ui.el b/emacs/.emacs.d/config/init-ui.el index 0e4fae8..528d584 100644 --- a/emacs/.emacs.d/config/init-ui.el +++ b/emacs/.emacs.d/config/init-ui.el @@ -13,4 +13,8 @@ ;; Load custom themes (add-to-list 'custom-theme-load-path (expand-file-name "config/themes" user-emacs-directory)) +;; A small package to hide the mode line +(use-package hide-mode-line + :commands hide-mode-line-mode) + (provide 'init-ui)