surf-prompt-on-open.diff (686B)
1 Description: Open dmenu URL prompt when surf is launched without a URI 2 Instead of loading about:blank, spawns the Ctrl+G "Go:" prompt so you 3 can immediately type a URL. 4 5 Apply: patch -p1 < patches/surf-prompt-on-open.diff 6 Unpatch: patch -R -p1 < patches/surf-prompt-on-open.diff 7 8 diff --git a/surf.c b/surf.c 9 --- a/surf.c 10 +++ b/surf.c 11 @@ -2122,12 +2122,17 @@ 12 if (argc > 0) 13 arg.v = argv[0]; 14 else 15 - arg.v = "about:blank"; 16 + arg.v = NULL; 17 18 setup(); 19 c = newclient(NULL); 20 showview(NULL, c); 21 22 - loaduri(c, &arg); 23 + if (arg.v) { 24 + loaduri(c, &arg); 25 + } else { 26 + arg = (Arg)SETPROP("_SURF_URI", "_SURF_GO", PROMPT_GO); 27 + spawn(c, &arg); 28 + } 29 updatetitle(c); 30 31 gtk_main();