There is no really easy way, but there are ways. Nautilus supports scripts by itself. You can write them, then store them in ~/.local/share/nautilus/scripts/
and use them by rightclicking on the file(s) and select the script to use.
This is covered in more detail e.g. here: https://help.ubuntu.com/community/NautilusScriptsHowto
By using the environment-variables initialized by Nautilus..
NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
- newline-delimited paths for selected files (only if local)
NAUTILUS_SCRIPT_SELECTED_URIS
- newline-delimited URIs for selected files
..you can then do a script like:
#!/bin/bash
cd $NAUTILUS_SCRIPT_CURRENT_URI
eval ${NAUTILUS_SCRIPT_SELECTED_FILE_PATHS##*/}
gnome-terminal -x sh -c 'julia -L ${NAUTILUS_SCRIPT_SELECTED_FILE_PATHS##*/}; exec bash'
where you change into the current directory, eval
if something is selected at all and with gnome-terminal -x
start a new shell with the continous-option -c
and launch Julia
. The -L
flag imports a file into your Julia shell. the ##*/
takes everything from the string starting at the last /
.
store the script in ~/.local/share/nautilus/scripts/
, make sure to set the right privileges with chmod +x yourScript.sh
and try running it by selecting a file in nautilus, rightclicking it and running the script.
for the keybinding check out Changing nautilus key
I hope this works for you,
Gewure