From 95d61ac2c991800a177b836811d4f8748ede8e41 Mon Sep 17 00:00:00 2001 From: Derek Stevens Date: Wed, 2 Aug 2023 17:41:21 -0600 Subject: [PATCH] add homepage, fix downloads, add default CSS --- config.h | 6 ++++-- default.css | 4 ++++ surf.c | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 default.css diff --git a/config.h b/config.h index 9041eaf..57aa998 100644 --- a/config.h +++ b/config.h @@ -7,6 +7,8 @@ static char *certdir = "~/.surf/certificates/"; static char *cachedir = "~/.surf/cache/"; static char *cookiefile = "~/.surf/cookies.txt"; +#define HOMEPAGE "http://localhost:9001/bookmarks.html" + static SearchEngine searchengines[] = { { " ", "https://kagi.com/search?q=%s" }, }; @@ -81,8 +83,8 @@ static WebKitFindOptions findopts = WEBKIT_FIND_OPTIONS_CASE_INSENSITIVE | /* DOWNLOAD(URI, referer) */ #define DOWNLOAD(u, r) { \ - .v = (const char *[]){ "st", "-g", "80x6", "-e", "/bin/sh", "-c",\ - "curl -g -L -J -O -A \"$1\" -b \"$2\" -c \"$2\"" \ + .v = (const char *[]){ "st", "-g", "80x3", "-t", "downloading", "-e", "/bin/sh", "-c",\ + "cd ~/tmp; curl -g -L -J -O -A \"$1\" -b \"$2\" -c \"$2\"" \ " -e \"$3\" \"$4\"; read", \ "surf-download", useragent, cookiefile, r, u, NULL \ } \ diff --git a/default.css b/default.css new file mode 100644 index 0000000..72f914f --- /dev/null +++ b/default.css @@ -0,0 +1,4 @@ +*::-webkit-scrollbar { width:6px;height:6px; } +*::-webkit-scrollbar-track { background:#000; } +*::-webkit-scrollbar-thumb { background-color:#1f9b92;border-radius:0;border:none; } +*::-webkit-scrollbar-corner { background:#000; } diff --git a/surf.c b/surf.c index 7ffc4c3..7c821be 100644 --- a/surf.c +++ b/surf.c @@ -2138,7 +2138,7 @@ main(int argc, char *argv[]) if (argc > 0) arg.v = argv[0]; else - arg.v = "about:blank"; + arg.v = HOMEPAGE; setup(); c = newclient(NULL);