I want to write a command in ~/.bashrc
that will create a trigger file that will open a different target file in a different folder when I double-click on the trigger file. I want the target file to open in VS Code.
The files might appear in a directory structure like this:
parentDir/
archiveDir/
yesterdaysDateDir/
todaysDateDir/
fileIWantToOpen.js
index/
fileIWantToDoubleClick
I understand that I can create an executable .desktop file to do this. I have found the specifications for .desktop files, but I have got lost in all the possible details.
I think that what I want might look something like this...
[Desktop Entry]
Type=Application
Terminal=true
Name=fileIWantToDoubleClick
Icon=utilities-terminal
Exec="code '../todaysDate/fileIWantToOpen.js'"
Categories=Application;
... but I am out of my depth. Any help in understanding what to do would be appreciated.
Creating a simple symbolic link does not work for me: I want to click on a file in my index
directory and have it open a specific file in a specific folder, rather than launch a clone with a different name from the index
directory.
create bash file
make it executable by running this command in the terminal
chmod +x fileIWantToDoubleClick
double-click on it to open the file