1
0
mirror of https://git.sr.ht/~sotirisp/qute-gemini synced 2024-11-23 08:22:18 +01:00
A userscript to view Gemini pages in qutebrowser
Go to file
2021-03-06 23:40:57 +02:00
LICENSES Change license to GPLv3+ 2021-03-05 12:55:53 +02:00
qute-gemini Show error page for failed requests 2021-03-06 23:40:57 +02:00
qute-gemini-tab
README.md Add way to use custom CSS 2021-03-06 19:34:42 +02:00

qute-gemini

A qutebrowser userscript that allows viewing Gemini pages by pressing a custom key. The pages are converted to HTML by the script and then displayed in qutebrowser.

The script borrows code from gcat, many thanks to its authors!

Installation

The XDG Base Directory Specification is supported but the default directory paths are used for simplicity.

  1. Copy qute-gemini and qute-gemini-tab into ~/.local/share/qutebrowser/userscripts/.

  2. Set custom keybindings for opening Gemini URLs by adding the following lines to ~/.config/qutebrowser/config.py:

    # Open in the current tab
    config.bind(';g', 'hint links userscript qute-gemini')
    # Open in a new tab
    config.bind(';G', 'hint links userscript qute-gemini-tab')
    

    The script only processes gemini:// URLs and opens all other URLs using qutebrowser, so opening a non-gemini:// should also work.

  3. Re-source the qutebrowser config or restart qutebrowser and visit the Gemini spec homepage to ensure that everything works.

Custom CSS

You can create a CSS file ~/.local/share/qutebrowser/userscripts/qute-gemini.css and qute-gemini will use it to style Gemini pages shown in qutebrowser.

Known issues

  • Userscript limitations
    • Only text/gemini content is shown. Any other MIME types received over Gemini are considered an error.
    • There is no support for user input (Gemini codes 1*).
    • There is no support for client certificates (Gemini codes 6*).
    • Opening non-gemini:// URLs with the userscript might not work correctly in rare cases.
  • Qutebrowser limitations
    • Opening gemini:// URLs by clicking on them does not work, only opening them via the keybinding is possible.
    • Qutebrowser userscripts don't accept arguments. My solution to being able to open links in the same or a different tab was to call the script under a different name.

License

Copyright 2019 Solderpunk, 2020 Aaron Janse, 2020 petedussin, 2020-2021 Sotiris Papatheodorou

This program is Free Software: You can use, study share and improve it at your will. Specifically you can redistribute and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

gcat is distributed under the BSD 2-Clause license.