summary refs log tree commit diff stats
diff options
context:
space:
mode:
authortoonn <toonn@toonn.io>2018-01-31 22:55:45 +0100
committertoonn <toonn@toonn.io>2018-01-31 22:55:45 +0100
commitf65e74eb9828969c01fff68f0a808931bc4399bb (patch)
tree223c3923d7d5ed6dbcbf15fd2d4d0d3e5a71c175
parent78722ddc70750cb63e18e1173b61c9bb571baf0b (diff)
downloadranger-f65e74eb9828969c01fff68f0a808931bc4399bb.tar.gz
Update bindings for media directories
Because of `udisks2` `/run/media/$USER` is becoming a common directory
for automounting, this adds a keybinding to go there (using the first
available letter in the path).

Similarly the binding for `/media` now points to `/media/$USER`, because
for example ubuntu adopted this new location.
I believe the `$USER` parts have to do with security, giving only the
user that mounted a filesystem access to it.
-rw-r--r--ranger/config/rc.conf3
1 files changed, 2 insertions, 1 deletions
diff --git a/ranger/config/rc.conf b/ranger/config/rc.conf
index 38e6f11e..5eaeae89 100644
--- a/ranger/config/rc.conf
+++ b/ranger/config/rc.conf
@@ -384,7 +384,8 @@ map gl cd -r .
 map gL cd -r %f
 map go cd /opt
 map gv cd /var
-map gm cd /media
+map gm eval fm.cd('/media/' + os.getenv('USER'))
+map gi eval fm.cd('/run/media/' + os.getenv('USER'))
 map gM cd /mnt
 map gs cd /srv
 map gt cd /tmp