Skip to content

Commit

Permalink
Merge af4daf1 into 5a8f9a0
Browse files Browse the repository at this point in the history
  • Loading branch information
keis committed Feb 2, 2016
2 parents 5a8f9a0 + af4daf1 commit 76f7ecf
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bin/uzbl-browser.in
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ if [ -z "$UZBL_EVENT_SOCKET" ]; then
fi
fi

exec uzbl-core "$@" "${config_file:+--config "$config_file"}" --connect-socket "$UZBL_EVENT_SOCKET"
exec uzbl-core "$@" ${config_file:+--config "$config_file"} --connect-socket "$UZBL_EVENT_SOCKET"
2 changes: 1 addition & 1 deletion bin/uzbl-tabbed
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,7 @@ class UzblTabbed:
'--connect-socket', self.socket_path]

if uri:
cmd += ['--uri', str(uri)]
cmd += [str(uri)]

if config['explicit_config_file'] is not None:
cmd += ['-c', config['explicit_config_file']]
Expand Down
2 changes: 1 addition & 1 deletion examples/config/config
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ set download_handler spawn_sync @scripts_dir/download.sh

# What to do when a website wants to open a new window:
# Open link in new window
@on_event NEW_WINDOW spawn_sh 'uzbl-browser ${0:+-u "$0"}' %r
@on_event NEW_WINDOW spawn_sh 'uzbl-browser ${0:-"$0"}' %r
# Open in current window (also see the REQ_NEW_WINDOW event handler below)
#@on_event NEW_WINDOW uri %s
# Open in new tab. Other options are NEW_TAB_NEXT, NEW_BG_TAB and NEW_BG_TAB_NEXT.
Expand Down
10 changes: 8 additions & 2 deletions src/uzbl-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ uzbl_init (int *argc, char ***argv)
/* Commandline arguments. */
const GOptionEntry
options[] = {
{ "uri", 'u', 0, G_OPTION_ARG_STRING, &uri,
"Uri to load at startup (equivalent to 'uzbl <uri>' after uzbl has launched)", "URI" },
{ "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose,
"Whether to print all messages or just errors.", NULL },
{ "named", 'n', 0, G_OPTION_ARG_STRING, &uzbl.state.instance_name,
Expand Down Expand Up @@ -105,6 +103,14 @@ uzbl_init (int *argc, char ***argv)
g_option_context_parse (context, argc, argv, NULL);
g_option_context_free (context);

if (*argc >= 2) {
uri = (*argv)[1];
}

if (*argc >= 3) {
fprintf (stderr, "Extra arguments to %s ignored\n", (*argv)[0]);
}

/* Print bug information. */
if (bug_info) {
printf ("Commit: %s\n", COMMIT);
Expand Down
2 changes: 1 addition & 1 deletion uzbl-core.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Comment=Uzbl - web interface tools which adhere to the unix philosophy.
Terminal=false
Type=Application
Icon=uzbl.png
Exec=uzbl-browser --uri %u
Exec=uzbl-browser %u
StartupNotify=false
Categories=Application;Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;

0 comments on commit 76f7ecf

Please sign in to comment.