ENH move device directory
This commit is contained in:
parent
2ad4386db4
commit
abcf0b601a
|
@ -233,7 +233,7 @@ desktop file exec directive."
|
||||||
|
|
||||||
(defconst nd/device-mount-dirs
|
(defconst nd/device-mount-dirs
|
||||||
(list
|
(list
|
||||||
(f-join "/media" (user-login-name))
|
(f-join "/tmp/media" (user-login-name))
|
||||||
(f-join "/run" "media" (user-login-name))))
|
(f-join "/run" "media" (user-login-name))))
|
||||||
|
|
||||||
(defun nd/get-mounted-directories ()
|
(defun nd/get-mounted-directories ()
|
||||||
|
@ -3483,11 +3483,12 @@ I handle device mounting using rofi and a custom mounting script (elsewhere in m
|
||||||
(defun nd/find-devices ()
|
(defun nd/find-devices ()
|
||||||
"Navigate to mounted devices."
|
"Navigate to mounted devices."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((mounted (-annotate #'f-filename (nd/get-mounted-directories))))
|
(-if-let (mounted (-annotate #'f-filename (nd/get-mounted-directories)))
|
||||||
(-when-let (dev (completing-read "Go to device: " mounted))
|
(-when-let (dev (completing-read "Go to device: " mounted))
|
||||||
(-if-let (path (alist-get dev mounted nil nil #'equal))
|
(-if-let (path (alist-get dev mounted nil nil #'equal))
|
||||||
(find-file path)
|
(find-file path)
|
||||||
(message "Invalid device: %s" dev)))))
|
(message "Invalid device: %s" dev)))
|
||||||
|
(message "No devices to mount")))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
*** filtering
|
*** filtering
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
|
|
Loading…
Reference in New Issue