diff options
author | NunoSempere <nuno.semperelh@protonmail.com> | 2024-03-23 21:51:55 -0300 |
---|---|---|
committer | NunoSempere <nuno.semperelh@protonmail.com> | 2024-03-23 21:51:55 -0300 |
commit | 07cae73c7116aee9686432783394eaba2c854ab9 (patch) | |
tree | f41dcb6e3e3d986e10094765dfbe68f2270294cd | |
parent | ed76b7e9e72cc2c3b5eeef0707638ff39a7cd31a (diff) |
remove extra files
68 files changed, 6 insertions, 5627 deletions
@@ -1,116 +1,3 @@ # Rosenrot -Rosenrot is a small browser forked from an earlier version of [rose](https://github.com/mini-rose/rose). It has some additional quality of life improvements tailored to my (@NunoSempere) tastes and setup, and detailed installation instructions for Debian 12. - -![](https://raw.githubusercontent.com/NunoSempere/rosenrot-browser/master/images/3-init.png) - -![](https://raw.githubusercontent.com/NunoSempere/rosenrot-browser/master/images/7-hello-world-search.png) - -![](https://raw.githubusercontent.com/NunoSempere/rosenrot-browser/master/images/6-multiple-tabs.png) - -### Installation and usage - -You can see detailed instructions [here](./user-scripts/debian-12/install-with-dependencies.sh), for Debian 12 in particular—though they should generalize easily to other distributions. - -The general steps are to install dependencies, and then - -``` -make build -make install # or sudo make install -rose -``` - -You can also collect some profiling info, and then use that to get a perhaps faster version: - -``` -make fast ## will ask you to use the browser for a bit -make install -rose -``` - -You can also create a rose.desktop file so that it will show up in your desktop environment. You can see this documented [here](./user-scripts/debian-12/install-with-dependencies.sh). - -## Features - -- Tabs, cookies, caching -- Minimal ui, autohiding elements -- ~454L core code (the rose.c file) -- Customize appearance of the browser through css -- Built-in rose-mklink script for in-shell static links -- Optional adblocking through [wyebadblock](https://github.com/jun7/wyebadblock) -- Plugin system, seeded with: - - Libre redirect: Redirect annoying websites to open source frontends - - Readability: Strip webpages of unnecessary elements for ease of reading with a custom shortcut - - Custom style: Override the css of predetermined websites - - Max number of tabs (by default 8), configurable. - - Stand in plugin: Mimick function definitions which do nothing for the above plugins so that they can be quickly removed - -You can see some screenshots in the [images](./images) folder. - -## Similar projects - -Here are some similar projects that I could find (minimalist, mostly based on webkit): - -- [Surf](https://git.suckless.org/surf/). Suckless community. Similar goals, higher coding standards, less actively maintained. -- [Rose](https://github.com/mini-rose/rose-browser). Lua integrations, supports compilation with GTK4. Every now and then, the developer nukes the git history and tries some different approach. -- [Epiphany](https://gitlab.gnome.org/GNOME/epiphany). GNOME. Clean browser, distributed via flathub, aimed at nontechnical users. Seems actively maintained. -- [Vimb](https://github.com/fanglingsu/vimb). Reasonably actively maintained, vim keybindings. -- [Nyxt](https://github.com/atlas-engineer/nyxt). Emphasis on sophisticated key bindings. -- [Wyeb](https://github.com/jun7/wyeb) -- [Luakit](https://github.com/luakit/luakit) -- ~~[Qutebrowser](https://github.com/qutebrowser/qutebrowser). More actively maintained. I don't understand the tech stack.~~ [Based](https://github.com/qutebrowser/qutebrowser/blob/main/doc/faq.asciidoc) on [Chromium](https://wiki.qt.io/QtWebEngine) - -Here are other projects I haven't checked out as much: [netsurf](https://www.netsurf-browser.org/), [uzbl](https://www.uzbl.org/), [edbrowse](https://github.com/CMB/edbrowse), - -Here are projects with their own rendering engines which could appeal to users of rosenrot: - -- [lynx](https://lynx.invisible-island.net/) (links, elinks), [w3m](https://w3m.sourceforge.net/): command line browsers. -- [dillo](https://github.com/dillo-browser/dillo/). Has its own rendering engine, and no javascript. -- [Ladybird](https://github.com/SerenityOS/serenity/tree/master/Ladybird). SerenityOS. Uses its own html and javascript engine. Compiling it on a mainstream Linux distribution, and documenting instructions could be an interesting project, but the few times I've tried that I've failed. -- [servo](https://github.com/servo/servo). Firefox/Mozilla. An in-development browser engine written in Rust, meant to replace Gecko. Could be extremely cool once it is ready, but it has been many years in development. - -### Relationship with [rose](https://github.com/mini-rose/rose) - -- Rose is a small browser based on webkit2gtk. Previously, it described itself as aiming to be a "basement for creating your own browser using [the] gtk and webkit libraries". It has since diverged into a more featureful small browser with lua bindings, and rebased its history. You can see the original, minimal version [here](https://github.com/NunoSempere/rosenrot-browser/blob/a45d1c70f58586fed97df70650e5d066b73d0a0d/rose.c). -- The current version offers compilation with both GTK3 and GTK4, and an up to date version of webkit. -- Rosenrot is my (@NunoSempere's) fork from that earlier minimal rose. It has accumulated quality of life features and, honestly, cruft, that I like, like a "readability" plugin that simplifies annoying websites like [Matt Levine's Money Stuff newsletter](https://www.bloomberg.com/opinion/articles/2022-10-18/matt-levine-s-money-stuff-credit-suisse-was-a-reverse-meme-stock). It also incorporates ad-blocking. -- Rosenrot is also a song by the German hardcore rock band [Rammstein](https://www.youtube.com/watch?v=af59U2BRRAU). - -### Comparison with [surf](https://git.suckless.org/surf/file/surf.c.html) - -- Surf is another browser based on GTK/Webkit, from the suckless community. -- It is significantly more complex: surf.c has [2170](https://git.suckless.org/surf/file/surf.c.html) lines, vs rose.c's [454](https://git.nunosempere.com/open.source/rosenrot/src/branch/master/rose.c). -- I find its code messier and harder to understand. -- Conversely, surf has significantly more configuration options, and digs deeper into webkit internals. -- Anecdotically, surf feels slower, though I haven't tested this rigorously. -- surf has a larger community, with patches and modifications. -- surf is more opinionated, but also less amateurish. -- Like rosenrot until very recently, it [uses](https://git.suckless.org/surf/file/config.mk.html#l15) an obsolete & deprecated version of [webkit](https://blogs.gnome.org/mcatanzaro/2023/03/21/webkitgtk-api-for-gtk-4-is-now-stable/) -- My recommendation would be to use rosenrot, and if you find some feature missing, either look how surf does it and import it to rose, or move to surf. - - But then again, I've built rosenrot to cater to my own tastes, so I'd say that. - -## Folk wisdom - -Of general interest: - -- I just found out that you can inspect a GTK application with the GTK explorer if you set a certain command-line variable. Try this with `make inspect`. -- Static variables keep their value between invocations. -- By default the searchbar is pretty gigantic. I've made this so because I'm a bit myopic, but also work with my laptop in a laptop stand. Anyways, if you are a more normal person you can change this in the style.css. -- The style.css usage isn't updated until installation. This is because by default rose uses the theme located in /usr/share/themes/rose/style.css, and that file isn't updated until make install. - -The "architecture" of the application looks as follows: - -![](https://raw.githubusercontent.com/NunoSempere/rosenrot-browser/master/images/0-architecture.png) - -## webkit2gtk-4.0 vs webkit2gtk-4.1 vs webkit2gtk-6.0 - -See [this blog post](https://blogs.gnome.org/mcatanzaro/2023/03/21/webkitgtk-api-for-gtk-4-is-now-stable/) for details. webkit2gtk-4.0 is deprecated, webkit2gtk-4.1 is the current [stable](https://webkitgtk.org/reference/webkit2gtk/stable/index.html) release and uses GTK3. webkit2gtk-6.0 is the current [unstable](https://webkitgtk.org/reference/webkitgtk/unstable/index.html) release, and uses GTK4. - -Migration instructions for migration to webkit2gtk-6 and GTK4 can be seen [here](https://github.com/WebKit/WebKit/blob/ed1422596dce5ff012e64a38faf402ac1674fc7e/Source/WebKit/gtk/migrating-to-webkitgtk-6.0.md) and [here](https://docs.gtk.org/gtk4/migrating-3to4.html). - -Rosenrot is currently on the stable webkit2gtk-4.1 release using GTK3, and has removed deprecated webkit apis. It has plans to eventually migrate to webkit2gtk-6.0 eventually but not soon, because the GTK4 rewrite seems onerous. - -## Ubuntu 20.04 - -A previous version of this repository was based on Ubuntu 20.04. You can still see documentation for that distribution [here](https://git.nunosempere.com/open.source/rosenrot/src/commit/8a1e0be30df52d5a21109297fd5bbc20efec1b3b), particularly a video installing rosenrot in a fresh Ubuntu 20.04 virtual machine [here](https://video.nunosempere.com/w/t3oAvJLPHTSAMViQ6zbwTV). However, that uses the webkit2gtk-4.0 library. Instead, I recommend adapting the Debian 12 instructions. - +This branch contains a minimalist version of rosenrot, similar in many ways to the original version of rose. @@ -1,57 +1,3 @@ # To do -- [ ] Settle on a C standard (C11?), and use safer string handling functions provided by it. - - See make lint for purported insecurities -- [ ] Document creating new applications, e.g., as in [Asana for Linux](https://git.nunosempere.com/NunoSempere/asana-for-linux) - - [ ] This time, use something other than Whatsapp as an example syslink. -- [ ] Fix bug about distorted audio. Maybe related to [this pipewire issue](<https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1547>)? - - See whether it even exists at all -- [ ] Upgrade to GTK-4 / Webkitgtk 6.0? Will take a fair amount of time, since GTK4 redesigns the application model somewhat. - - Instructions for webkit-6.0 [here](https://github.com/WebKit/WebKit/blob/ed1422596dce5ff012e64a38faf402ac1674fc7e/Source/WebKit/gtk/migrating-to-webkitgtk-6.0.md) - - Instructions for GTK-4 [here](https://docs.gtk.org/gtk4/migrating-3to4.html) - - [ ] Prepare for GTK-3 to GTK-4 transition - - [ ] Understand wtf is going on with signals and events: <https://docs.gtk.org/gtk4/migrating-3to4.html#stop-using-gtkwidget-event-signals>. <https://github.com/mini-rose/rose-browser/blob/288bf060d095c4895946669ae50d14193168b69c/src/window.c#L42> - - [ ] Remove webkit2gtk-4.1 and download webkit2gtk-6.0 - - [ ] Attempt to compile - -# Previously done - -- [x] Fix PageUp/PageDown shortcuts. -- ~~[ ] Set [`webkit_web_context_set_sandbox_enabled`](<https://webkitgtk.org/reference/webkit2gtk/2.36.8/WebKitWebContext.html#webkit-web-context-set-sandbox-enabled>), as recommended [here](<https://blogs.gnome.org/mcatanzaro/2022/11/04/stop-using-qtwebkit/>)~~. Irrelevant with upgrade to libsoup3. -- [x] Update to webkit2gtk-4.1 - - [x] Change README and point to last Ubuntu 20.04 commit -- [x] Add list of similar projects: <https://github.com/qutebrowser/qutebrowser#similar-projects> -- [x] Add comparisons against rose & surf - - [x] Compare against rose - - [x] Compare against surf -- [x] ~~Doesn't work with when Spanish is selected as the language, for some reason~~ => Previously misdiagnosed. The real issue was that it freezes when interacting with [Espanso](https://espanso.org/) substitutions, which I had set-up automatically on my machine when using words containing an ñ, like my own name, Nuño. -- [x] Add css for js alerts - - [x] Add custom alert whose css can be customized - - [ ] ~~Debug problems, e.g., this version is non-blocking.~~ => will leave as is -- [x] Figure out better way to have plugins => stand_in code seems superfluous -- [x] Double check newtab/next-tab behavior => custom style now loading correctly. -- [x] Add a shortcut for hiding the search tab. => Already exists: Ctrl+K -- [x] Find out what each of the css elements refers to. => done, see make inspect -- [x] Figure out if downloading files is doable. => it is -- [x] Look at using relative rather than absolute paths for configuration. => now makefile is a bit smarter -- [x] Streamline installation a bit - - [x] Substitute paths in makefile - - [x] Create cache directory automatically -- [x] Add an installation video walkthrough. Done, [here](https://video.nunosempere.com/w/t3oAvJLPHTSAMViQ6zbwTV) -- [x] Document `stand_in.c` better -- [x] Use a makefile. - - [x] Add clean, uninstall to makefile -- [x] Mask user agent -- [x] Launch with more than one tab from command line -- [x] Figure out merge with upstream -- [x] String substitution on uri in order to redirect to better frontends. -- [x] Present "standard" browser keybindings as an alternative. -- [x] Fix zoom in new tab -- [x] Reader mode -- [x] Add reader mode to config.def. -- [x] Make tab bar slightly prettier. -- [x] Add "open in new window" functionality. - - Useful for opening links in new tab when clicking on them and selecting that option - - And for actually opening links with the href new_tab option. - - Links: [1](<https://docs.gtk.org/gobject/func.signal_connect.html>), [2](<https://webkitgtk.org/reference/webkit2gtk/2.37.90/signal.AutomationSession.create-web-view.html>), [3](<https://webkitgtk.org/reference/webkit2gtk/2.26.0/WebKitWebView.html#WebKitWebView-create>), [4](<https://stackoverflow.com/questions/40180757/webkit2gtk-get-new-window-link>) - +- [ ] Create minimalist version of rosenrot diff --git a/images/0-architecture.png b/images/0-architecture.png Binary files differdeleted file mode 100644 index ebc6ee9..0000000 --- a/images/0-architecture.png +++ /dev/null diff --git a/images/1-startup.png b/images/1-startup.png Binary files differdeleted file mode 100644 index 1691ee6..0000000 --- a/images/1-startup.png +++ /dev/null diff --git a/images/2-blog.png b/images/2-blog.png Binary files differdeleted file mode 100644 index ceb423e..0000000 --- a/images/2-blog.png +++ /dev/null diff --git a/images/3-init.png b/images/3-init.png Binary files differdeleted file mode 100644 index 49526e5..0000000 --- a/images/3-init.png +++ /dev/null diff --git a/images/4-money-stuff-raw.png b/images/4-money-stuff-raw.png Binary files differdeleted file mode 100644 index 2b8c959..0000000 --- a/images/4-money-stuff-raw.png +++ /dev/null diff --git a/images/5-money-stuff-readability.png b/images/5-money-stuff-readability.png Binary files differdeleted file mode 100644 index d9afdbd..0000000 --- a/images/5-money-stuff-readability.png +++ /dev/null diff --git a/images/6-multiple-tabs.png b/images/6-multiple-tabs.png Binary files differdeleted file mode 100644 index 27bcc91..0000000 --- a/images/6-multiple-tabs.png +++ /dev/null diff --git a/images/7-hello-world-search.png b/images/7-hello-world-search.png Binary files differdeleted file mode 100644 index 74ac428..0000000 --- a/images/7-hello-world-search.png +++ /dev/null diff --git a/images/architecture.excalidraw b/images/architecture.excalidraw deleted file mode 100644 index 4125af2..0000000 --- a/images/architecture.excalidraw +++ /dev/null @@ -1,1621 +0,0 @@ -{ - "type": "excalidraw", - "version": 2, - "source": "https://excalidraw.com", - "elements": [ - { - "type": "rectangle", - "version": 292, - "versionNonce": 463851677, - "isDeleted": false, - "id": "lBjbsP-_NqzXWwmwk8A_X", - "fillStyle": "hachure", - "strokeWidth": 4, - "strokeStyle": "solid", - "roughness": 2, - "opacity": 100, - "angle": 0, - "x": 329.9536803142096, - "y": 5275.360621605454, - "strokeColor": "#1971c2", - "backgroundColor": "transparent", - "width": 569.850017875787, - "height": 511.1985001194681, - "seed": 1544920861, - "groupIds": [], - "frameId": null, - "roundness": { - "type": 3 - }, - "boundElements": [], - "updated": 1707673753423, - "link": null, - "locked": false - }, - { - "type": "rectangle", - "version": 151, - "versionNonce": 1697833011, - "isDeleted": false, - "id": "D38guL0T8tAKru7Rric51", - "fillStyle": "hachure", - "strokeWidth": 4, - "strokeStyle": "solid", - "roughness": 2, - "opacity": 100, - "angle": 0, - "x": 381.2549731527413, - "y": 5422.697051010744, - "strokeColor": "#1971c2", - "backgroundColor": "transparent", - "width": 449.99293922783875, - "height": 285.72208894312826, - "seed": 1269652371, - "groupIds": [], - "frameId": null, - "roundness": { - "type": 3 - }, - "boundElements": [], - "updated": 1707673769129, - "link": null, - "locked": false - }, - { - "type": "text", - "version": 149, - "versionNonce": 39022033, - "isDeleted": false, - "id": "fFflEFFbQ4RRZ_eoByT6u", - "fillStyle": "hachure", - "strokeWidth": 4, - "strokeStyle": "solid", - "roughness": 2, - "opacity": 100, - "angle": 0, - "x": 417.58882466308546, - "y": 5538.950319223284, - "strokeColor": "#1971c2", - "backgroundColor": "transparent", - "width": 367.1739196777344, - "height": 135, - "seed": 990822387, - "groupIds": [], - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1707683157130, - "link": null, - "locked": false, - "fontSize": 36, - "fontFamily": 1, - "text": "\n- redirect if annoying\n- set custom style", - "textAlign": "left", - "verticalAlign": "top", - "containerId": null, - "originalText": "\n- redirect if annoying\n- set custom style", - "lineHeight": 1.25, - "baseline": 122 - }, - { - "type": "rectangle", - "version": 208, - "versionNonce": 215694365, - "isDeleted": false, - "id": "K-pKhA9fp5y9wAqulAG4u", - "fillStyle": "hachure", - "strokeWidth": 4, - "strokeStyle": "solid", - "roughness": 2, - "opacity": 100, - "angle": 0, - "x": 438.1575179165558, - "y": 5110.275434716198, - "strokeColor": "#1971c2", - "backgroundColor": "transparent", - "width": 311.2534437057402, - "height": 142.91078863950042, - "seed": 844345885, - "groupIds": [], - "frameId": null, - "roundness": { - "type": 3 - }, - "boundElements": [ - { - "type": "text", - "id": "QcXv_ZjKNXXlWXMrl5QCk" - } - ], - "updated": 1707672960762, - "link": null, - "locked": false - }, - { - "type": "text", - "version": 175, - "versionNonce": 28815485, - "isDeleted": false, - "id": "QcXv_ZjKNXXlWXMrl5QCk", - "fillStyle": "hachure", - "strokeWidth": 4, - "strokeStyle": "solid", - "roughness": 2, - "opacity": 100, - "angle": 0, - "x": 520.3277196888595, - "y": 5159.230829035949, - "strokeColor": "#1971c2", - "backgroundColor": "transparent", - "width": 146.9130401611328, - "height": 45, - "seed": 212952701, - "groupIds": [], - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1707672960762, - "link": null, - "locked": false, - "fontSize": 36, - "fontFamily": 1, - "text": "load_uri", - "textAlign": "center", - "verticalAlign": "middle", - "containerId": "K-pKhA9fp5y9wAqulAG4u", - "originalText": "load_uri", - "lineHeight": 1.25, - "baseline": 35 - }, - { - "type": "rectangle", - "version": 121, - "versionNonce": 1630623891, - "isDeleted": false, - "id": "L5ptkBpEItORiR21JrXNI", - "fillStyle": "hachure", - "strokeWidth": 4, - "strokeStyle": "solid", - "roughness": 2, - "opacity": 100, - "angle": 0, - "x": 1661.157899040488, - "y": 5156.947956050425, - "strokeColor": "#2f9e44", - "backgroundColor": "transparent", - "width": 630.9615879030628, - "height": 373.3702566162666, - "seed": 305373757, - "groupIds": [], - "frameId": null, - "roundness": { - "type": 3 - }, - "boundElements": [], - "updated": 1707673702525, - "link": null, - "locked": false - }, - { - "type": "rectangle", - "version": 283, - "versionNonce": 1061180947, - "isDeleted": false, - "id": "kTn3xLEawZVegYqBQKAkU", - "fillStyle": "hachure", - "strokeWidth": 4, - "strokeStyle": "solid", - "roughness": 2, - "opacity": 100, - "angle": 0, - "x": 1634.5922790423188, - "y": 5581.239549379173, - "strokeColor": "#2f9e44", - "backgroundColor": "transparent", - "width": 688.764684838534, - "height": 192.0593832722834, - "seed": 2059495219, - "groupIds": [], - "frameId": null, - "roundness": { - "type": 3 - }, - "boundElements": [ - { - "type": "text", - "id": "Bf-8Lm_N3VLGxGi5-3DiP" - } - ], - "updated": 1707673706526, - "link": null, - "locked": false - }, - { - "type": "text", - "version": 362, - "versionNonce": 798104499, - "isDeleted": false, - "id": "Bf-8Lm_N3VLGxGi5-3DiP", - "fillStyle": "hachure", - "strokeWidth": 4, - "strokeStyle": "solid", - "roughness": 2, - "opacity": 100, - "angle": 0, - "x": 1699.2898375260388, - "y": 5654.769241015314, - "strokeColor": "#2f9e44", - "backgroundColor": "transparent", - "width": 559.3695678710938, - "height": 45, - "seed": 924059859, - "groupIds": [], - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1707673706526, - "link": null, - "locked": false, - "fontSize": 36, - "fontFamily": 1, - "text": "handle_signal_create_new_tab", - "textAlign": "center", - "verticalAlign": "middle", - "containerId": "kTn3xLEawZVegYqBQKAkU", - "originalText": "handle_signal_create_new_tab", - "lineHeight": 1.25, - "baseline": 35 - }, - { - "type": "rectangle", - "version": 213, - "versionNonce": 1201318259, - "isDeleted": false, - "id": "2IpPyxs-x8Wz_kBqVa6CX", - "fillStyle": "hachure", - "strokeWidth": 4, - "strokeStyle": "solid", - "roughness": 2, - "opacity": 100, - "angle": 0, - "x": 1682.9828836653555, - "y": 5286.247648117623, - "strokeColor": "#2f9e44", - "backgroundColor": "transparent", - |