0

I have arch linux with all the lastest updates, and I am running Ranger file manager version 1.9.2-1.

I use insync version 1.5.7 to sync my google drive files to the laptop.

If I open a terminal window and type

insync open_in_gdrive /home/user/path/to/file/test.gdsheet

or

insync open_in_gdrive /home/user/path/to/file/test.gddoc

the google doc / sheet opens in the web browser. This is desired and as expected.

When I add

# open google docs
map gG shell -d insync open_in_gdrive %p

to rc.conf, the Ranger configuration file, this allows me to use the shortcut gG to open the currently selected google doc / sheet, in the web browser. This works just as it should and is just fine.

But I would rather not have to press gG. It would be much easiear to set-up rifle.rc to recognise google docs / sheets and open these appropriately by simply pressing enter, when the file is selected.

I have tried various lines in rifle.rc as shown below, and these do not work.

# open google docs
ext gddoc = shell -d insync open_in_gdrive -- "$1"
ext gdsheet = shell -d insync open_in_gdrive -- "$1"
ext gdsheet|gddoc, has X, flag f = shell -d insync open_in_gdrive %p

Can anyone suggest what the correct line for rifle.conf should be to open an insync backed up google doc / sheet?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.