SweetFX Settings DB
Latest forum threads
2 hours, 31 minutes ago
2 hours, 31 minutes ago
3 hours, 15 minutes ago
by mnbvc
4 hours, 17 minutes ago
by mnbvc

Open link target

Preset for Nautilus Script
Created by Bilu
Added April 17, 2022
Updated 17 Apr 16:46 CEST
Shader used: Other
Preset description:
Using the downloaded file didn't work for me. Do it manually instead: - create a file called "Open link target" - copy & paste the settings and save the file - follow the instructions below: #============================================================================== # # Move the file to the location path for Nautilus scripts: # ~/.local/share/nautilus/scripts # # # Make it executable: # touch ~/.local/share/nautilus/scripts/"Open link target" # chmod +x ~/.local/share/nautilus/scripts/"Open link target" # #==============================================================================
Download preset Show / Hide settings
#!/bin/bash #============================================================================== # # Move the file to the location path for Nautilus scripts: # ~/.local/share/nautilus/scripts # # # Make it executable: # touch ~/.local/share/nautilus/scripts/"Open link target" # chmod +x ~/.local/share/nautilus/scripts/"Open link target" # #============================================================================== #============================================================================== # INIT VARIABLES # may depends of your system DIRNAME='/usr/bin/dirname' GREP='/bin/grep' NAUTILUS='/usr/bin/nautilus' PERL='/usr/bin/perl' READLINK='/bin/readlink' XDG_OPEN='/usr/bin/xdg-open' #============================================================================== # MAIN # lets check if object is selected : [ "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" == "" ] # retrieve the first object selected : first_object=`echo "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" \ | $PERL -ne 'print;exit'` # lets check if local path : [ `echo "$first_object" | $GREP -c "^/"` -eq 0 ] # retrieve the target path : if [ -L "$first_object" ] ; then # symbolic link target=`$READLINK -f "$first_object"` else # not a symbolic link : target="$first_object" fi target_to_open_in_nautilus="$target" ### GO : let's open $NAUTILUS --no-desktop --select "$target_to_open_in_nautilus" exit 0 ### EOF

Screenshots

Comments

You need to be logged in to post a comment