DarkMatter in Cyberspace
  • Home
  • Categories
  • Tags
  • Archives

Define File Association for Rifle


I want to use apps of WPS to open Word, Excel and PowerPoint files in a new process (defined by the flag 'f'):

cat ~/.config/ranger/rifle.conf
ext docx?, has wps, flag f = wps -- "$@"
ext pdf, has evince, flag f = evince -- "$@"
ext xlsx?, has et, flag f = et -- "$@"
ext pptx?, has wpp, flag f = wpp -- "$@"
ext mp4, has totem, flag f = totem -- "$@"
ext jpg, has eog, flag f = eog -- "$@"

Now use rifle mydoc.docx in shell, or in ranger, to open docx, doc files without blocking ranger itself.

Ref:

https://wiki.archlinux.org/index.php/ranger#File_association

https://github.com/ranger/ranger/blob/master/ranger/config/rifle.conf



Published

Apr 10, 2017

Last Updated

Apr 10, 2017

Category

Tech

Tags

  • ranger 1
  • rifle 1

Contact

  • Powered by Pelican. Theme: Elegant by Talha Mansoor