Skip to content

Access existed File Managers' bookmarks (e.g. Dolphin, Nautilus, PCManFM) in Dired.

Notifications You must be signed in to change notification settings

kuanyui/fm-bookmarks.el

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 

Repository files navigation

fm-bookmarks.el

Use existed file managers’ (FM) bookmarks in Dired.

Introduce

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! 🙏

Screenshot

https://farm8.staticflickr.com/7607/16822969870_d2d18cc3ac_o.png

Requirement

  • Any of supported file managers. Currently available:
    • Dolphin (KDE4 or 5)
    • Nautilus (GNOME3)
    • PCManFM (LXDE)

Installation

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)

Usage

KeyDescription
EnterOpen this directory
gRefresh list
qClose and quit
TabJump to next category
Shift-TabJump to previous category
Up , pPrevious item
Down , nNext item

Todo

  • [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?

About

Access existed File Managers' bookmarks (e.g. Dolphin, Nautilus, PCManFM) in Dired.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages