Setting the cookie file on new instances.
[surf.git] / surf.c
diff --git a/surf.c b/surf.c
index da84e1c..939a06f 100644 (file)
--- a/surf.c
+++ b/surf.c
@@ -2,6 +2,7 @@
  *
  * To understand surf, start reading main().
  */
+
 #include <signal.h>
 #include <X11/X.h>
 #include <X11/Xatom.h>
@@ -842,7 +843,7 @@ newclient(void) {
 static void
 newwindow(Client *c, const Arg *arg, gboolean noembed) {
        guint i = 0;
-       const char *cmd[12], *uri;
+       const char *cmd[14], *uri;
        const Arg a = { .v = (void *)cmd };
        char tmp[64];
 
@@ -864,6 +865,8 @@ newwindow(Client *c, const Arg *arg, gboolean noembed) {
                cmd[i++] = "-s";
        if(showxid)
                cmd[i++] = "-x";
+       cmd[i++] = "-c";
+       cmd[i++] = cookiefile;
        cmd[i++] = "--";
        uri = arg->v ? (char *)arg->v : c->linkhover;
        if(uri)
@@ -1289,6 +1292,9 @@ main(int argc, char *argv[]) {
        case 'b':
                enablescrollbars = 0;
                break;
+       case 'B':
+               enablescrollbars = 1;
+               break;
        case 'c':
                cookiefile = EARGF(usage());
                break;
@@ -1298,24 +1304,42 @@ main(int argc, char *argv[]) {
        case 'g':
                allowgeolocation = 0;
                break;
+       case 'G':
+               allowgeolocation = 1;
+               break;
        case 'i':
                loadimages = 0;
                break;
+       case 'I':
+               loadimages = 1;
+               break;
        case 'k':
+               kioskmode = 0;
+               break;
+       case 'K':
                kioskmode = 1;
                break;
        case 'n':
                enableinspector = 0;
                break;
+       case 'N':
+               enableinspector = 1;
+               break;
        case 'p':
                enableplugins = 0;
                break;
+       case 'P':
+               enableplugins = 1;
+               break;
        case 'r':
                scriptfile = EARGF(usage());
                break;
        case 's':
                enablescripts = 0;
                break;
+       case 'S':
+               enablescripts = 1;
+               break;
        case 't':
                stylefile = EARGF(usage());
                break;