View Single Post
Posts: 114 | Thanked: 201 times | Joined on Apr 2009
#1044
More proposed patches for xiojason's browser-proxy script. All of these apply against version 2.0.
  • 01-reorganize-browser-launching-code.patch: Move the browser launching code into its own class, to simplify the rest of the changes. Introduce a config option default_browser to select the default browser; takes values "tear" or "microb".
  • 02-add-arbitrary-browser-support.patch: Adds support for launching an arbitrary program as the default browser. Set default_browser to "other" and other_browser_cmd to the command line of the browser you want to use, with '%s' as a URL placeholder (e.g. "fennec '%s'").
  • 03-add-explicit-fennec-and-midori-support.patch: Adds explicit support for Fennec (tested, but with a highly nonstandard Fennec install) and Midori (untested) as the default browser. Set default_browser to "fennec" or "midori" to use. (With this patch, this script really isn't Tear-specific anymore . . .)
  • 04-add-config-file-support.patch: Add support for loading configuration from a config file, $HOME/.config/browser-proxy. If a config file isn't found, the script will use the built-in defaults (continuous mode off, Tear the default browser). You can, for example, enable continuous mode and make Midori the default browser by doing this in a shell:
    Code:
    $ cat > /home/user/.config/browser-proxy <<EOF
    # This is a comment
    continuous_mode = 1
    default_browser = "midori"
    EOF
    If running in continuous mode, you can force the script to reread its configuration by sending it SIGHUP (kill -HUP pid).

(edit: add missing "EOF" in here document)
 

The Following 2 Users Say Thank You to steven676 For This Useful Post: