đŸ Archived View for dece.space âș dev âș bebop âș index.gmi captured on 2022-06-11 at 20:48:14. Gemini links have been rewritten to link to archived content
âŹ ïž Previous capture (2021-11-30)
-=-=-=-=-=-=-
Bebop is a Gemini browser for the terminal, focusing on practicality and laziness. It is a personal project to learn how to use ncurses and try new ways to explore the Geminispace. It borrows some ideas from Amfora and Vim.
It has a bunch of cool keybinds and tries to get the right balance between predictability and getting out of your way. Also, it is written in pure Python and does not require any external dependencies. Clone and run!
Once youâre used to it, it generally requires fewer effort to use than other browsers. To quote the readme:
Link navigation is done by entering the link ID with automatic validation: if there are less than 10 links on a page, pressing the link ID will take you to the page directly. If there are 30 links, pressing `1` will wait for another digit. If there are 1000 links but you wish to visit link #5, pressing 5 and enter will do!
I hope you will enjoy using it as much as I do! đ
The rest of this document contains general information about Bebop:
Installation instructions are in the README.md file along with the source code.
Check out the internal help by pressing `?` or typing `:help` and enter. If youâre familiar with Vim you should get accustomed to it pretty quickly. If youâre feeling lost, please get in contact so I can make it easier to discover on your own!
You use the program mostly by using keybinds. To make Bebop less straining to use, keybinds are often simple keys, and the control modifier is rarely used. Bebop also has a command-line that you can focus by pressing `:` which provides other features.
The logic is that keybinds are for the most common actions, and everything less common or which require some text input from the user is done through commands. That said, some actions like entering an URL are both common and need some user input, so they are implemented as keybinds to focus the command-line and fill a command name.
Movement is from Vim and other keys try to be intuitive. Most of the time, the uppercase keybinds are the âsuperâ version of the lowercase, e.g. `j` scrolls down a bit but `J` scrolls down a whole page. In some cases though, the uppercase keybind is the âinverseâ operation of the lowercase, e.g. `n` goes to the next search result but `N` goes to the previous result.
I have no need for them as I prefer to use a browser-agnostic aggregator at the moment (e.g. Spacewalk or Gemreader), so not unless you really want them ;)
Yes itâs not great. I had to fix various issues in the standard Textbox of Python, but it still feels a bit off. Tell me what bothers you so I can prioritize what to fix. Donât forget that you can press `M-e` (aka `ALT + e`) to open an external editor anytime you are focusing the command-line!
To read the page source, simply open it with your favorite editor using the `e` keybind. There is currently no âsave sourceâ function, because it is usually more convenient to edit the source and save it from there. The source is written in a temporary file that is deleted once the editor is closed.
Check out the internal help for a complete list of config options. Note that the first time Bebop runs it will create a config file with all known config keys to their default values; if you later upgrade Bebop to a version that provides other config options, they won't be added automatically to your config file. Config options that are not present in the config file are set to their default values.
Honestly, either just hack it or come ask me! If you modify Bebop for your personal needs and think that something should actually be a configurable value, please get in touch or submit a patch so I can add it. :)
Note that element colors, element appearance, keybinds and more things that may not be configurable now are planned to be at some point in the future. For the colors though I think itâs better to configure a nice palette for your terminal so that Bebop fits nicely in there instead of supporting color overrides.
This depends on your system and your desktop environment. I can provide some guidance for common GNU/Linux systems:
A desktop file to handle Gemini/Gopher/Finger can look like this:
[Desktop Entry] Type=Application Name=Bebop GenericName=Gemini Browser Categories=Network;WebBrowser;ConsoleOnly; Terminal=true Exec=bebop %u MimeType=x-scheme-handler/gemini; MimeType=x-scheme-handler/gopher; MimeType=x-scheme-handler/finger;
You can save it in `~/.local/share/applications/bebop.desktop`.
To use this desktop file as the default scheme opener on simple desktop environments following XDG standards such as Xfce, tools such as xdg-mime (`xdg-utils` package in Debian) make it easy to configure:
xdg-mime default bebop.desktop x-scheme-handler/gemini xdg-mime default bebop.desktop x-scheme-handler/finger xdg-mime default bebop.desktop x-scheme-handler/gopher
Everytime you click on a âgemini://â link, it should open it with Bebop in a new terminal window.
Bonus: if you are using Screen or Tmux, new terminal windows can be annoying. You can open Bebop in a new window of your Tmux session by replacing the Exec command in the desktop file: `tmux new-window -t 0 "bebop %u"` (replace 0 with your session name).
Bebop has two render modes for Gemtext, cleverly called âfancyâ and âdumbâ. Fancy is the default and takes the spec to the letter: client controls a lot how things are rendered. As such, margins between paragraphs, links, etc are set to render beautiful pages regardless of how the source is formatted.
On some sites though, such as Astrobotany or Station, empty lines help to fragment the content into meaningful subsections, such as a paragraph immediately followed by a link to the poster profile. There is also the issue of the blockquote being used like in email, even though the specification says that it should be one-line per quote, so there often are empty blockquotes between two lines of a quote, or wrapped text spread on a blockquote sequence: they render poorly in fancy mode. This is where dumb mode is useful: it prevents arbitrary margins and keeps the original empty lines in the rendered page.
Some pages also have hard-wrapped text, even though thatâs not strict Gemtext. In fancy mode they will be rendered with empty lines interleaved, which is ugly. Switching to dumb render mode helps here.
Render modes can be toggled using a keybind (see internal help), or set permanently for specific URL paths using the `set-render-mode` command.
Bebop does not highlight anything, but it does try to print a few things dimmed or italic, which might appear as highlighted if your terminal does not support it.
Yes. By default it uses a specific OpenSSL command to generate certificates, so if it is available on your system you should have nothing to configure. If you wish to use another TLS software to generate your certificates you can configure which command to call in your config file. Check the internal help for details.
Sure! You first need to find the certificate and key files, then create a new entry in the identity JSON file.
Lagrange stores your identities in your config directory in an `idents` directory. Find which pair of crt/key file is the identity you want to copy (ehm how?), then paste them into the Bebop user data directory, in the `identities` directory.
In the `identities.json` file, add a new entry with the following format. The key is the URL path to use the identity on (so this URL and all child URLs) and its value is a list of identities for this URL path. The value has a name field, possibly passed during certificate generation as the common name, and an id field which is the file name without extension of both the certificate and key.
{ "gemini://egsam.glv.one/4.3.cert": [ { "name": "tester", "id": "4f694ddf04d8e27c6d5a337c88509bffba2f36780a7f545c20646da9d76e678f" } ] }
Other browsers probably use something similar? It would be nice to have a standard to import/export identitiesâŠ