Another copy of my dotfiles. Because I don't completely trust GitHub.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
568 B

  1. import os
  2. import sys
  3. from ranger.core.loader import CommandLoader
  4. from ranger.api.commands import Command
  5. class chrome_choose(Command):
  6. def execute(self):
  7. """ Extract copied files to current directory """
  8. filename = self.arg(1)
  9. cwd = self.fm.thisdir
  10. if filename == '.':
  11. with open('/tmp/ranger-chrome-choosed', 'w') as f:
  12. f.write(cwd.path + '/')
  13. sys.exit(0)
  14. with open('/tmp/ranger-chrome-choosed', 'w') as f:
  15. f.write(os.path.join(cwd.path, filename))
  16. sys.exit(0)