Use existed file managers’ (FM) bookmarks in Dired.
If you’re using Dired, you may want to directly access existed
bookmarks in your prefered file manager (e.g. Dolphin, Nautilus,
PCManFM) via Dired, without any redundant configuration for Dired
or `balahbalah-bookmarks.el`. If so, fm-bookmarks.el
is just what
you’re looking for.
fm-bookmarks.el
also has an experimental feature to list mounted
media (via mount
shell command, due to the limitation of the crap
Emacs Lisp).
fm-bookmarks.el
currently supports:
- Dolphin (KDE 4 & 5)
- Nautilus
- PCManFM
because I have no Windows & Mac, sorry. 😓
However, without supported FMs, you still can use custom bookmarks.
If you can, please feel free to send a PR, or give me an example bookmarks file (& its path) of the other FMs. Thank you! 🙏
- Any of supported file managers. Currently available:
- Dolphin (KDE4 or 5)
- Nautilus (GNOME3)
- PCManFM (LXDE)
fm-bookmarks
is available in MELPA package repository. To install via MELPA, you can read its instructions.
(add-to-list 'load-path "/path/to/fm-bookmarks.el")
(require 'fm-bookmarks)
;; Shortcut to open FM Bookmarks.
(global-set-key (kbd "C-x `") #'fm-bookmarks)
;; Use ` to open FM Bookmarks in Dired-mode
(define-key dired-mode-map (kbd "`") #'fm-bookmarks)
;; Available options: kde5, kde4, gnome3, pcmanfm, custom
;; Multiple file managers are acceptable.
;; Notice that 'media currently is only available on Unix-like OS
(setq fm-bookmarks-enabled-file-managers '(kde5 kde4 gnome3 pcmanfm custom media))
;; Add custom bookmarks
(setq fm-bookmarks-custom-bookmarks
'(("Root" . "/")
("Tmp" . "/tmp/")
))
;; Hide item by name/path pattern
(setq fm-bookmarks-hide-by-name-pattern '("Bluetooth" "Images"))
(setq fm-bookmarks-hide-by-path-pattern '())
;; Don't show duplicated item. (Because the same path may be added by
;; different FMs)
(defvar fm-bookmarks-hide-duplicated t)
;; "Mounted media" is an experimental function. If you don't want
;; this, set this to nil.
(setq fm-bookmarks-enable-mounted-media t)
;; Use cache to avoid regenerating list every time.
(setq fm-bookmarks-enable-cache t)
Key | Description |
---|---|
Enter | Open this directory |
g | Refresh list |
q | Close and quit |
Tab | Jump to next category |
Shift-Tab | Jump to previous category |
Up , p | Previous item |
Down , n | Next item |
- [X] Pattern to hide items.
- [X] Hide duplicated item
- [X] Don’t generate list every time.
- [ ] More supported FMs.
- [ ] Windows Explorer?
- [ ] OSX Finder?
- [ ] Update modeline with cursor moving (To show info of the path).
- [ ] Stay alive after opening link?