# localcmd
# The command to run on the local host to launch URLs in 'local' mode.
# The string '%s' will be replaced with the URL. The default is
-# 'firefox %s'.
+# 'xdg-open %s'.
#
# remotessh
# The command (and arguments) used to connect to the remote host for
#
# remotecmd
# The command to execute on the remote host for 'remote' mode. The
-# default is 'bash -c "DISPLAY=:0.0 firefox '%s'"' Which runs bash, sets
+# default is 'bash -c "DISPLAY=:0.0 xdg-open '%s'"' Which runs bash, sets
# up the environment to display on the remote host's main X display,
-# and runs firefox. As with 'localcmd', the string '%s' will be
+# and runs the default browser. As with 'localcmd', the string '%s' will be
# replaced with the URL.
#
# cmdoutput
# - Fix python 3 compatibility (replace "has_key" by "in")
# - V3.1 Ron Alleva <ron.alleva@gmail.com>:
# - Add 'use_full_name' setting, to allow storing URLs by full name of buffer
+# - V3.2 Marco Trevisan <mail@3v1n0.net>:
+# - Use xdg-open as default 'localcmd'
#
# Copyright (C) 2005 David Rubin <drubin AT smartcube dot co dot za>
#
SCRIPT_NAME = "urlgrab"
SCRIPT_AUTHOR = "David Rubin <drubin [At] smartcube [dot] co [dot] za>"
-SCRIPT_VERSION = "3.1"
+SCRIPT_VERSION = "3.2"
SCRIPT_LICENSE = "GPL"
SCRIPT_DESC = "Url functionality Loggin, opening of browser, selectable links"
CONFIG_FILE_NAME= "urlgrab"
self.data['localcmd']=weechat.config_new_option(
self.config_file, section_default,
"localcmd", "string", """Local command to execute""", "", 0, 0,
- "firefox '%s'", "firefox '%s'", 0, "", "", "", "", "", "")
+ "xdg-open '%s'", "xdg-open '%s'", 0, "", "", "", "", "", "")
- remotecmd="ssh -x localhost -i ~/.ssh/id_rsa -C \"export DISPLAY=\":0.0\" && firefox '%s'\""
+ remotecmd="ssh -x localhost -i ~/.ssh/id_rsa -C \"export DISPLAY=\":0.0\" && xdg-open '%s'\""
self.data['remotecmd']=weechat.config_new_option(
self.config_file, section_default,
"remotecmd", "string", remotecmd, "", 0, 0,