Browse Source

Fixed ranger pins

master
Micah Halter 1 year ago
parent
commit
22118f85a9
  1. 2
      ranger/.config/ranger/commands.py
  2. 2
      ranger/.config/ranger/pinrunner.sh
  3. 4
      ranger/.config/ranger/rc.conf

2
ranger/.config/ranger/commands.py

@ -99,7 +99,7 @@ class pingo(Command):
def execute(self):
import subprocess
import os.path
command="cat $HOME/.pins|fzf -n 1|awk '{print $1 \":\" $2}'"
command="cat $XDG_CONFIG_HOME/pins|fzf -n 1|awk '{print $1 \":\" $2}'"
fzf = self.fm.execute_command(command, stdout=subprocess.PIPE)
stdout, stderr = fzf.communicate()
if fzf.returncode == 0:

2
ranger/.config/ranger/pinrunner.sh

@ -1,5 +1,5 @@
#!/bin/bash
source $HOME/.local/bin/pins.sh
source $HOME/.local/bin/pins
$1 $2 2> /dev/null

4
ranger/.config/ranger/rc.conf

@ -455,8 +455,8 @@ map vr shell [ -e /tmp/nvimsocket ] && nvr %f 2>/dev/null &
# Pins
map pg pingo
map pa console shell $XDG_CONFIG_HOME/ranger/pinrunner.sh pa%space
map pd shell $XDG_CONFIG_HOME/ranger/pinrunner.sh pd "$(cat $XDG_DATA_HOME/pins|fzf -n 1|awk '{print $1}')"
map pe shell $XDG_CONFIG_HOME/ranger/pinrunner.sh pe "$(cat $XDG_DATA_HOME/pins|fzf -n 1|awk '{print $1}')"
map pd shell $XDG_CONFIG_HOME/ranger/pinrunner.sh pd "$(cat $XDG_CONFIG_HOME/pins|fzf -n 1|awk '{print $1}')"
map pe shell $XDG_CONFIG_HOME/ranger/pinrunner.sh pe "$(cat $XDG_CONFIG_HOME/pins|fzf -n 1|awk '{print $1}')"
# Document
map Mk shell compiler %f

Loading…
Cancel
Save