Compare commits

..

No commits in common. "e9950d648aa04dfe97d806904583324f6007a958" and "0f2ca9b9f7790a664a548bc6034711a17101519d" have entirely different histories.

13 changed files with 35 additions and 86 deletions

View File

@ -4,7 +4,7 @@ Rosenrot is a small browser forked from an earlier version of [rose](https://git
![](https://raw.githubusercontent.com/NunoSempere/rosenrot-browser/master/images/7-hello-world-search.png) ![](https://raw.githubusercontent.com/NunoSempere/rosenrot-browser/master/images/7-hello-world-search.png)
![](https://raw.githubusercontent.com/NunoSempere/rosenrot-browser/master/images/3-multiple-tabs.png) ![](https://raw.githubusercontent.com/NunoSempere/rosenrot-browser/master/images/6-hello-world.png)
### Installation and usage ### Installation and usage

View File

@ -15,11 +15,9 @@
#define BG_COLOR "#FEFEFE" /* "FEFEFE", "#1E1E2E" */ #define BG_COLOR "#FEFEFE" /* "FEFEFE", "#1E1E2E" */
#define DEBUG false #define DEBUG false
#define MAX_NUM_TABS 8 // set to 0 or false if you want unlimited tabs, or look at the relevant rose.c code. #define MAX_NUM_TABS 8 // set to 0 or false if you want unlimited tabs, or look at the relevant rose.c code.
#define SEARCH "https://search.nunosempere.com/search?q=%s" #define ROSE_HOMEPAGE false
// #define SEARCH "https://lite.duckduckgo.com/html/?q=%s" #define SEARCH "https://lite.duckduckgo.com/html/?q=%s" // "https://search.nunosempere.com/search?q=%s"
#define HOME "" #define HOME ROSE_HOMEPAGE ? "file:///home/nuno/Documents/workspace/rosenrot/user-scripts/debian-12/rose-images/rose-homepage-2.png" : "https://search.nunosempere.com/"
// #define HOME "https://search.nunosempere.com/"
// #define HOME "file:///home/nuno/Documents/workspace/rosenrot/user-scripts/debian-12/rose-images/rose-homepage-2.png"
// Plugins // Plugins
#define LIBRE_REDIRECT_ENABLED true #define LIBRE_REDIRECT_ENABLED true

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

BIN
images/3-multiple-tabs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 KiB

BIN
images/6-hello-world.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 258 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 123 KiB

After

Width:  |  Height:  |  Size: 42 KiB

BIN
rosenrot

Binary file not shown.

View File

@ -26,16 +26,9 @@ WebKitWebView* notebook_get_webview(GtkNotebook* notebook)
} }
/* Load content*/ /* Load content*/
void show_bar(GtkNotebook* notebook);
void load_uri(WebKitWebView* view, const char* uri) void load_uri(WebKitWebView* view, const char* uri)
{ {
if (strlen(uri) == 0){ if (g_str_has_prefix(uri, "http://") || g_str_has_prefix(uri, "https://") || g_str_has_prefix(uri, "file://") || g_str_has_prefix(uri, "about:")) {
webkit_web_view_load_uri(view, "");
bar.entry_mode = _SEARCH;
show_bar(notebook);
}else if (g_str_has_prefix(uri, "http://") || g_str_has_prefix(uri, "https://") || g_str_has_prefix(uri, "file://") || g_str_has_prefix(uri, "about:")) {
webkit_web_view_load_uri(view, uri); webkit_web_view_load_uri(view, uri);
} else { } else {
// Check for shortcuts // Check for shortcuts
@ -414,7 +407,7 @@ int main(int argc, char** argv)
gtk_init(NULL, NULL); // <https://docs.gtk.org/gtk3/func.init.html> gtk_init(NULL, NULL); // <https://docs.gtk.org/gtk3/func.init.html>
g_object_set(gtk_settings_get_default(), GTK_SETTINGS_CONFIG_H, NULL); // <https://docs.gtk.org/gobject/method.Object.set.html> g_object_set(gtk_settings_get_default(), GTK_SETTINGS_CONFIG_H, NULL); // <https://docs.gtk.org/gobject/method.Object.set.html>
GtkCssProvider* css = gtk_css_provider_new(); GtkCssProvider* css = gtk_css_provider_new();
gtk_css_provider_load_from_path(css, "/usr/share/themes/rosenrot/style.css", NULL); gtk_css_provider_load_from_path(css, "/usr/share/themes/rose/style.css", NULL);
gtk_style_context_add_provider_for_screen(gdk_screen_get_default(), GTK_STYLE_PROVIDER(css), 800); gtk_style_context_add_provider_for_screen(gdk_screen_get_default(), GTK_STYLE_PROVIDER(css), 800);
/* Initialize GTK objects. These are declared as static globals at the top of this file */ /* Initialize GTK objects. These are declared as static globals at the top of this file */
@ -447,7 +440,7 @@ int main(int argc, char** argv)
/* Show to user */ /* Show to user */
gtk_widget_show_all(GTK_WIDGET(window)); gtk_widget_show_all(GTK_WIDGET(window));
// gtk_widget_hide(GTK_WIDGET(bar.widget)); gtk_widget_hide(GTK_WIDGET(bar.widget));
/* Deal with more tabs */ /* Deal with more tabs */
if (argc > 2) { if (argc > 2) {

View File

@ -1,9 +1,25 @@
@define-color Surface0 #313244;
@define-color Surface1 #45475a;
@define-color Base #1e1e2e;
@define-color Mantle #181825;
@define-color Lavender #b4befe;
@define-color Text #cdd6f4;
* { * {
padding: 0px;
margin: 0px;
outline-color: @Lavender;
color: @Text;
border-color: white;
font-size: 25px; font-size: 25px;
/*@Base; */ /*@Base; */
/* border-bottom-color: @Base; */ /* border-bottom-color: @Base; */
} }
window, notebook, headerbar {
background: @Base;
}
/* Make titlebar pretty gigantic. I'm pretty myopic. */ /* Make titlebar pretty gigantic. I'm pretty myopic. */
.titlebar { .titlebar {
padding: 10px; padding: 10px;
@ -22,21 +38,33 @@ header * {
} }
tabs { tabs {
background-color: @Base;
padding: 3px; padding: 3px;
outline-color: white;
border-color: @Base;
} }
tab { tab {
background-color: @Base;
margin: 2px 5px 2px 0px; margin: 2px 5px 2px 0px;
padding: 5px; padding: 5px;
border-style: solid; border-style: solid;
font-size: 27px; font-size: 27px;
/*border-color: white;
border-bottom-color: white;
outline-color: white;
margin: 5px;
padding-left: 10px;
padding-right: 10px; */
} }
entry { entry {
background-color: @Surface0;
padding-left: 10px; padding-left: 10px;
} }
entry:focus { entry:focus {
background-color: @Surface0;
padding-left: 10px; padding-left: 10px;
} }

View File

@ -1,70 +0,0 @@
@define-color Surface0 #313244;
@define-color Surface1 #45475a;
@define-color Base #1e1e2e;
@define-color Mantle #181825;
@define-color Lavender #b4befe;
@define-color Text #cdd6f4;
* {
padding: 0px;
margin: 0px;
outline-color: @Lavender;
color: @Text;
border-color: white;
font-size: 25px;
/*@Base; */
/* border-bottom-color: @Base; */
}
window, notebook, headerbar {
background: @Base;
}
/* Make titlebar pretty gigantic. I'm pretty myopic. */
.titlebar {
padding: 10px;
font-size: 30px;
}
.titlebar * {
padding: 10px;
font-size: 27px;
}
header * {
font-size: 20px;
padding: 5px;
}
tabs {
background-color: @Base;
padding: 3px;
outline-color: white;
border-color: @Base;
}
tab {
background-color: @Base;
margin: 2px 5px 2px 0px;
padding: 5px;
border-style: solid;
font-size: 27px;
/*border-color: white;
border-bottom-color: white;
outline-color: white;
margin: 5px;
padding-left: 10px;
padding-right: 10px; */
}
entry {
background-color: @Surface0;
padding-left: 10px;
}
entry:focus {
background-color: @Surface0;
padding-left: 10px;
}