Here are two other versions of the script in case somebody doesn't have ruby installed.
========
Python version:
#!/usr/bin/python
import os, sys
if (not sys.argv[1] or sys.argv[1][0] == '/'): os.system('thunar %s' % sys.argv[1]) elif (sys.argv[2][0:7] == 'file://'): os.system('thunar %s' % sys.argv[2]) else: os.system('nautilus.real %s' % ' '.join(sys.argv[1:])) #os.system('zenity --info --text="%s"' % ' '.join(sys.argv[1:])) #DEBUG
Shell script version:
#!/bin/bash
if [ -z "${1}" ] || [ "${1:0:1}" == "/" ]; then thunar "${1}" elif [ "${2:0:7}" == "file://" ]; then thunar "${2}" else nautilus.real "${@}" fi #zenity --info --text="${@}" #DEBUG
Blogroll Info Privacy
Jordan Callicoat
Here are two other versions of the script in case somebody doesn't have ruby installed.
========
Python version:
#!/usr/bin/python
import os, sys
if (not sys.argv[1] or sys.argv[1][0] == '/'):
os.system('thunar %s' % sys.argv[1])
elif (sys.argv[2][0:7] == 'file://'):
os.system('thunar %s' % sys.argv[2])
else:
os.system('nautilus.real %s' % ' '.join(sys.argv[1:]))
#os.system('zenity --info --text="%s"' % ' '.join(sys.argv[1:])) #DEBUG
========
Shell script version:
#!/bin/bash
if [ -z "${1}" ] || [ "${1:0:1}" == "/" ]; then
thunar "${1}"
elif [ "${2:0:7}" == "file://" ]; then
thunar "${2}"
else
nautilus.real "${@}"
fi
#zenity --info --text="${@}" #DEBUG