From 6892176569fe4c5b3f0db5b2613302c830660970 Mon Sep 17 00:00:00 2001 From: Alexander Bocken Date: Sat, 24 Feb 2024 15:42:34 +0100 Subject: [PATCH] ranger: gp and gp mapped to go to path in clipboard --- .config/ranger/rc.conf | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.config/ranger/rc.conf b/.config/ranger/rc.conf index e104a0c..0e86e58 100644 --- a/.config/ranger/rc.conf +++ b/.config/ranger/rc.conf @@ -281,13 +281,10 @@ set save_tabs_on_exit false # Enable scroll wrapping - moving down while on the last item will wrap around to # the top and vice versa. set wrap_scroll false -map grm cd ~/eth/hrm -map gpm cd ~/eth/pm -map gre cd ~/eth/recht -map grt cd ~/eth/rt2 -map gvl cd vl -map gus cd üs -map gz cd zsf +# go to path in clipboard (command: xclip -selection clipboard -o) +map gd eval fm.cd(os.popen('xclip -selection clipboard -o').read().strip()) +# go to path of file in clipboard +map gp eval fm.cd(os.path.dirname(os.popen('xclip -selection clipboard -o').read().strip())) map glb cd ~/.local/bin