From 4e7f546d3c149fbc5b35309715091df0a98922ae Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Mon, 12 Feb 2024 00:00:05 +0100 Subject: tweak README, extract TODO to separate file --- README.md | 89 +++++++++++---------------------------------------------------- TODO.md | 46 +++++++++++++++++++++++++++++++++ makefile | 1 + 3 files changed, 62 insertions(+), 74 deletions(-) create mode 100644 TODO.md diff --git a/README.md b/README.md index 104e778..b786b77 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Rosenrot is a small browser forked from an earlier version of [rose](https://git ![](https://raw.githubusercontent.com/NunoSempere/rosenrot-browser/master/images/6-hello-world.png) -### Installation +### Installation and usage You can see detailed instructions [here](./user-scripts/ubuntu-20.04/install-with-dependencies.sh), for Ubuntu 20.04 in particular—though they should generalize easily to other distributions. Or a video installing rosenrot in a fresh Ubuntu 20.04 virtual machine [here](https://video.nunosempere.com/w/t3oAvJLPHTSAMViQ6zbwTV). @@ -15,19 +15,14 @@ The general steps are to install dependencies, and then ``` make build make install # or sudo make install +rose ``` -### Usage - -After building: - -``` -./rose -``` - -After installing: +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 ``` @@ -37,7 +32,7 @@ You can also create a rose.desktop file so that it will show up in your desktop - Tabs, cookies, caching - Minimal ui, autohiding elements -- ~464L core code (the rose.c file) +- ~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) @@ -50,17 +45,15 @@ You can also create a rose.desktop file so that it will show up in your desktop You can see some screenshots in the [images](./images) folder. -## Architecture - -![](https://raw.githubusercontent.com/NunoSempere/rosenrot-browser/master/images/0-architecture.png) +## Comparisons -## Relationship with [rose](https://github.com/mini-rose/rose) +### Relationship with [rose](https://github.com/mini-rose/rose) - Rose is a minimal 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". - Rosenrot is my (@NunoSempere's) fork from rose. It has accumulated quality of life features/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) +### 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 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) @@ -71,71 +64,19 @@ You can see some screenshots in the [images](./images) folder. - surf is more opinionated, but also less amateurish. For instance, rosenrot - My recommendation would be to use rose, and if you find some feature missing, either look how surf does it and import it to rose, or move to surf. -### Contribute +### Folk wisdom -- Contribute upstream to [github.com/mini-rose/rose](https://github.com/mini-rose/) for core functionality changes. -- Contribute here for quality of life improvements, by sending a pull request on Github. - -### Cool things +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. - -### Known bugs/gotchas. - -General: - - 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. -About my own system: +The "architecture" of the application looks as follows: -- [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. -- [ ] At some point, I tried to install libsoup-3 and borked some unknown installation option/paths. So now I need to run rose with `GIO_MODULE_DIR=/usr/lib/x86_64-linux-gnu/gio/modules/ /bin/rose` (or put `export GIO_MODULE_DIR=/usr/lib/x86_64-linux-gnu/gio/modules/` in my .bashrc). This won't affect new users though, just double checked on a fresh machine. +![](https://raw.githubusercontent.com/NunoSempere/rosenrot-browser/master/images/0-architecture.png) -### To do - -#### Quality of life: - -- [ ] Document creating new applications, e.g., as in [Asana for Linux](https://git.nunosempere.com/NunoSempere/asana-for-linux) -- [ ] Add list of similar projects: - -#### Maintenance - -- [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 -- [ ] Set [`webkit_web_context_set_sandbox_enabled`](), as recommended [here]() -- [ ] Use something other than Whatsapp as an example syslink. -- [ ] Fix bug about distorted audio. Maybe related to [this pipewire issue]()? -- [ ] Upgrade to GTK-4 / Webkitgtk 6.0? Will take a fair amount of time, since these are not available on Ubuntu 20.04. - -#### Previously done - -- [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](), [2](), [3](), [4]() +Specific to my own system: +- [ ] At some point, I tried to install libsoup-3 and borked some unknown installation option/paths. So now I need to run rose with `GIO_MODULE_DIR=/usr/lib/x86_64-linux-gnu/gio/modules/ /bin/rose` (or put `export GIO_MODULE_DIR=/usr/lib/x86_64-linux-gnu/gio/modules/` in my .bashrc). This won't affect new users though, just double checked on a fresh machine. diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..ebe4401 --- /dev/null +++ b/TODO.md @@ -0,0 +1,46 @@ +# To do + +## Quality of life: + +- [ ] Document creating new applications, e.g., as in [Asana for Linux](https://git.nunosempere.com/NunoSempere/asana-for-linux) +- [ ] Add list of similar projects: + - [x] Compare against rose + - [x] Compare against surf +- [ ] Set [`webkit_web_context_set_sandbox_enabled`](), as recommended [here]() +- [ ] Use something other than Whatsapp as an example syslink. +- [ ] Fix bug about distorted audio. Maybe related to [this pipewire issue]()? +- [ ] Upgrade to GTK-4 / Webkitgtk 6.0? Will take a fair amount of time, since these are not available on Ubuntu 20.04. + +# Previously done + +- [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](), [2](), [3](), [4]() + diff --git a/makefile b/makefile index 7c60183..9eba7f1 100644 --- a/makefile +++ b/makefile @@ -58,6 +58,7 @@ fast: $(SRC) $(PLUGINS) $(CONFIG) GIO_MODULE_DIR=/usr/lib/x86_64-linux-gnu/gio/modules/ $(CC) $(WARNINGS) $(OPTIMIZED_MORE) -fprofile-generate $(INCS) $(PLUGINS) $(SRC) -o rose $(LIBS) $(ADBLOCK) @echo "Now use the browser for a while to gather some profiling data" + sleep 2 ./rose $(CC) $(WARNINGS) $(OPTIMIZED_MORE) -fprofile-use $(INCS) $(PLUGINS) $(SRC) -o rose $(LIBS) $(ADBLOCK) rm -f *.gcda -- cgit v1.2.3