From 374128fccc4f5725355736bf6008697318944101 Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Mon, 12 Dec 2022 15:37:31 +0000 Subject: tweak: boot up with the correct zoom --- rose.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rose.c b/rose.c index 326ef8d..439634b 100644 --- a/rose.c +++ b/rose.c @@ -305,6 +305,8 @@ void setup(GtkNotebook *notebook, const char *uri) gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(notebook)); gtk_widget_show_all(GTK_WIDGET(window)); gtk_widget_hide(GTK_WIDGET(bar)); + webkit_web_view_set_zoom_level(notebook_get_webview(notebook), ZOOM); + } int main(int argc, char **argv) -- cgit v1.2.3 From a69d72f42b904725da949d5e10f01b45b1614ef9 Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Mon, 12 Dec 2022 15:38:48 +0000 Subject: tweak: allow configurable width and height and set a default of 500, 400 --- config.def.h | 2 ++ rose.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config.def.h b/config.def.h index cb3c2cf..320b84c 100644 --- a/config.def.h +++ b/config.def.h @@ -28,6 +28,8 @@ #define ZOOM 1 /* Starting zoom level */ #define ZOOM_VAL .1 /* Zooming value in zoomin/zoomout functions */ #define BG_COLOR "#1E1E2E" +#define WIDTH 500 +#define HEIGHT 400 typedef enum { goback, diff --git a/rose.c b/rose.c index 439634b..15baf7d 100644 --- a/rose.c +++ b/rose.c @@ -296,7 +296,7 @@ void setup(GtkNotebook *notebook, const char *uri) bar = GTK_HEADER_BAR(gtk_header_bar_new()); search_buf = GTK_ENTRY_BUFFER(gtk_entry_buffer_new("", 0)); search = GTK_ENTRY(gtk_entry_new_with_buffer(search_buf)); - + gtk_window_set_default_size(window, WIDTH, HEIGHT); window_init(notebook); notebook_init(notebook, uri); -- cgit v1.2.3 From 1bed1963813cfcf453603e450bb0c134909ff21b Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Mon, 12 Dec 2022 15:44:48 +0000 Subject: tweak: suggest bg color for bright theme --- config.def.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.def.h b/config.def.h index 320b84c..03e7fd7 100644 --- a/config.def.h +++ b/config.def.h @@ -27,7 +27,7 @@ #define KEY(x) GDK_KEY_##x #define ZOOM 1 /* Starting zoom level */ #define ZOOM_VAL .1 /* Zooming value in zoomin/zoomout functions */ -#define BG_COLOR "#1E1E2E" +#define BG_COLOR "#1E1E2E" /* or e.g., "#FEFEFE" if not using dark theme */ #define WIDTH 500 #define HEIGHT 400 -- cgit v1.2.3 From 5e403cad14837cc1482c68b48316fe9861d0d737 Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Mon, 12 Dec 2022 22:10:49 +0000 Subject: fix: small sh/bash incompatibility in rose-mklink 'echo -e' throws a warning in sh, but not in bash --- rose-mklink | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rose-mklink b/rose-mklink index a56f321..a658930 100755 --- a/rose-mklink +++ b/rose-mklink @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash test "$1" = "--help" || test -z "$1" && { echo -e "usage: rose-mklink \n" -- cgit v1.2.3 From f6119ff7dbabc5b31eee3e9fe9800f964f387214 Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Tue, 13 Dec 2022 15:22:49 +0000 Subject: tweak: Add reference to how to use normal browser controls. --- config.def.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/config.def.h b/config.def.h index 03e7fd7..55a1f01 100644 --- a/config.def.h +++ b/config.def.h @@ -76,3 +76,25 @@ static struct { { CTRL, KEY(n), finder_next }, { CTRL | SFT, KEY(N), finder_prev } }; +/* For controls more akin to normal browsers, use: +{ + { CTRL, KEY(h), goback }, + { CTRL, KEY(j), goforward }, + { CTRL, KEY(r), refresh }, + { CTRL | SFT, KEY(R), refresh_force }, + { CTRL | SFT, KEY(H), back_to_home }, + { CTRL, KEY(equal), zoomin }, + { CTRL, KEY(minus), zoomout }, + { CTRL, KEY(0), zoom_reset }, + { CTRL, KEY(Page_Down), prev_tab }, + { CTRL, KEY(Page_Up), next_tab }, + { CTRL, KEY(w), close_tab }, + { 0x0, KEY(F11), toggle_fullscreen }, + { CTRL, KEY(l), show_searchbar }, + { CTRL, KEY(f), show_finder }, + { CTRL, KEY(n), finder_next }, + { CTRL | SFT, KEY(N), finder_prev } +}; +*/ +/* Reference for the key shorthand: + * */ -- cgit v1.2.3 From 5ab887db47d1b9a48e4f6bd6a7bb50ec2ada37e2 Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Tue, 13 Dec 2022 15:31:36 +0000 Subject: trivial tweak: fix README layout error. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bf0bb60..f622ea0 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -

Rose Browser

+

Rose Browser

Minimal browser based on webkit2gtk

#### Features -- cgit v1.2.3 From 981c15bf93dd531d331dc38792441b876dbedec0 Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Tue, 13 Dec 2022 16:33:04 +0000 Subject: feat: add less sucky duckduckgo homepage. --- config.def.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.def.h b/config.def.h index 55a1f01..fc5f0e4 100644 --- a/config.def.h +++ b/config.def.h @@ -20,8 +20,8 @@ #define GTK "gtk-application-prefer-dark-theme", true, "gtk-enable-animations", false -#define HOME "https://duckduckgo.com" -#define SEARCH "https://duckduckgo.com/?q=%s" +#define HOME "https://lite.duckduckgo.com/html/" +#define SEARCH "https://lite.duckduckgo.com/html/?q=%s" #define CACHE_DIR "/home/fenze/.cache/rose" #define KEY(x) GDK_KEY_##x -- cgit v1.2.3