Compare commits
2 Commits
0f2ca9b9f7
...
e9950d648a
Author | SHA1 | Date | |
---|---|---|---|
e9950d648a | |||
6d925ea23a |
|
@ -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/6-hello-world.png)
|
||||
![](https://raw.githubusercontent.com/NunoSempere/rosenrot-browser/master/images/3-multiple-tabs.png)
|
||||
|
||||
### Installation and usage
|
||||
|
||||
|
|
8
config.h
8
config.h
|
@ -15,9 +15,11 @@
|
|||
#define BG_COLOR "#FEFEFE" /* "FEFEFE", "#1E1E2E" */
|
||||
#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 ROSE_HOMEPAGE false
|
||||
#define SEARCH "https://lite.duckduckgo.com/html/?q=%s" // "https://search.nunosempere.com/search?q=%s"
|
||||
#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 SEARCH "https://search.nunosempere.com/search?q=%s"
|
||||
// #define SEARCH "https://lite.duckduckgo.com/html/?q=%s"
|
||||
#define HOME ""
|
||||
// #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
|
||||
#define LIBRE_REDIRECT_ENABLED true
|
||||
|
|
BIN
images/3-init.png
Normal file
BIN
images/3-init.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
Binary file not shown.
Before Width: | Height: | Size: 172 KiB |
Binary file not shown.
Before Width: | Height: | Size: 302 KiB |
BIN
images/6-multiple-tabs.png
Normal file
BIN
images/6-multiple-tabs.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 258 KiB |
Binary file not shown.
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 123 KiB |
13
rosenrot.c
13
rosenrot.c
|
@ -26,9 +26,16 @@ WebKitWebView* notebook_get_webview(GtkNotebook* notebook)
|
|||
}
|
||||
|
||||
/* Load content*/
|
||||
|
||||
void show_bar(GtkNotebook* notebook);
|
||||
void load_uri(WebKitWebView* view, const char* uri)
|
||||
{
|
||||
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:")) {
|
||||
if (strlen(uri) == 0){
|
||||
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);
|
||||
} else {
|
||||
// Check for shortcuts
|
||||
|
@ -407,7 +414,7 @@ int main(int argc, char** argv)
|
|||
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>
|
||||
GtkCssProvider* css = gtk_css_provider_new();
|
||||
gtk_css_provider_load_from_path(css, "/usr/share/themes/rose/style.css", NULL);
|
||||
gtk_css_provider_load_from_path(css, "/usr/share/themes/rosenrot/style.css", NULL);
|
||||
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 */
|
||||
|
@ -440,7 +447,7 @@ int main(int argc, char** argv)
|
|||
|
||||
/* Show to user */
|
||||
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 */
|
||||
if (argc > 2) {
|
||||
|
|
28
style.css
28
style.css
|
@ -1,25 +1,9 @@
|
|||
@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;
|
||||
|
@ -38,33 +22,21 @@ header * {
|
|||
}
|
||||
|
||||
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;
|
||||
|
||||
}
|
||||
|
|
70
user-scripts/styles/style-v3.css
Normal file
70
user-scripts/styles/style-v3.css
Normal file
|
@ -0,0 +1,70 @@
|
|||
@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;
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user