Coder Social home page Coder Social logo

starfish-app / starfish Goto Github PK

View Code? Open in Web Editor NEW
22.0 1.0 1.0 4.37 MB

A Gemini browser for elementary OS.

Home Page: gemini://josipantolis.from.hr/starfish/

License: GNU General Public License v3.0

CSS 0.38% Meson 1.88% Python 0.35% Vala 97.39%
vala gtk3 gtk meson elementary-os gemini gemini-client

starfish's Introduction

Starfish

A Gemini browser made for elementary OS.

Get it on AppCenter License: GPL v3 Build GitHub release

Gemini pages are displayed with your chosen accent color and light or dark style gentle introduction to Gemini is provided to help you find your bearings
page search and table of contents help you navigate larger gemtext pages connection to Gemini sites is secured by both server and client certificates

For more screenshots check out the screenshots directory.

About

Starfish is a graphical client for the Gemini protocol built with GTK and Vala. The main goal of the project is to provide a native elementary OS application for reading Gemini sites, that will make the protocol more accessible to users. Read more on the project's Gemini page: gemini://josipantolis.from.hr/starfish/.

Status

Starfish is in active development. It currently supports the prerelease version of the Gemini specification, including gemtext rendering and client certificates. Starfish can be used to view images and download other file types. There are still many improvements and new features that could be added to the app. For a list of current development plans check out GitHub issues.

Install

Starfish is packaged with Flatpak and published on elementary OS AppCenter. If you are running some other Linux distribution you can download the flatpakref file from elementary repo and install it either using a graphical package manager, or from terminal with:

flatpak install --from ./hr.from.josipantolis.starfish.flatpakref

Build from source

Starfish is built for elementary OS 6. All prerequisites can be met by installing elementary-sdk and gtkspell:

sudo apt install elementary-sdk
sudo apt install libgtkspell3-3-dev

For a full list of dependencies check out the dependencies list in the meson.build file.

To build and install the app execute (from project's root directory):

meson build --prefix=/usr
cd build
ninja
sudo ninja install

Test

After performing meson build you can run tests from inside build directory with:

meson test

Translate

After adding user facing strings, remember to wrap them _("like so"), from inside the build directory execute:

ninja hr.from.josipantolis.starfish-pot
ninja hr.from.josipantolis.starfish-update-po

Package

Starfish is packaged with Flatpak and based on io.elementary.Platform runtime. In order to build it locally you may need to install the runtime first:

flatpak install --user io.elementary.Sdk//7

After that you can build and install Starfish itself with:

flatpak-builder build hr.from.josipantolis.starfish.yml --user --install --force-clean

And run it with:

flatpak run hr.from.josipantolis.starfish

License

GNU GPLv3

Copyright © 2021 Josip Antoliš, [email protected].

starfish's People

Contributors

antolius avatar suzie97 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

nathanbnm

starfish's Issues

Add two finger swipe gestures for navigation

Proposal

Swiping using two fingers to move back and forward would be a very nice feature to have. We should aim to make it 1:1, or else it wouldn't make much sense to adopt it.

Prior Art

  • Safari on macOS
  • GNOME Web/Epiphany on GNOME and elementary OS
  • Lagrange on macOS

Example

Screen.Recording.2022-01-23.at.21.52.08.mov

Fix loading of gemini://drewdevault.com

Observed behavior

Loading of any page from gemini://drewdevault.com succeeds every 1 out of 3 attempts.

First request succeeds and then subsequent 2 fail on TLS handshake. Next request (the 4th one) again succeeds, and so on. Restarting the app resets the success-failure cycle. The cycle continues for any page from Drew's pod, regardless of the path.

Technical details

Here are the events emitted by the GLib.SocketClient.event:

1st request (succeeds):
event				connectable	connection
G_SOCKET_CLIENT_RESOLVING	173.195.146.137	null
G_SOCKET_CLIENT_RESOLVED	173.195.146.137	null
G_SOCKET_CLIENT_CONNECTING	173.195.146.137	GTcpConnection
G_SOCKET_CLIENT_CONNECTED	173.195.146.137	GTcpConnection
G_SOCKET_CLIENT_TLS_HANDSHAKING	173.195.146.137	GTlsClientConnectionGnutls
G_SOCKET_CLIENT_TLS_HANDSHAKED	173.195.146.137	GTlsClientConnectionGnutls
G_SOCKET_CLIENT_COMPLETE	173.195.146.137	GTcpWrapperConnection

2nd request (fails):
event				connectable	connection
G_SOCKET_CLIENT_RESOLVING	173.195.146.137	null
G_SOCKET_CLIENT_RESOLVED	173.195.146.137	null
G_SOCKET_CLIENT_CONNECTING	173.195.146.137	GTcpConnection
G_SOCKET_CLIENT_CONNECTED	173.195.146.137	GTcpConnection
G_SOCKET_CLIENT_TLS_HANDSHAKING	173.195.146.137	GTlsClientConnectionGnutls
G_SOCKET_CLIENT_RESOLVING	173.195.146.137	null
G_SOCKET_CLIENT_COMPLETE	173.195.146.137	null

3rd request (fails):
event				connectable	connection
G_SOCKET_CLIENT_RESOLVING	173.195.146.137	null
G_SOCKET_CLIENT_RESOLVED	173.195.146.137	null
G_SOCKET_CLIENT_CONNECTING	173.195.146.137	GTcpConnection
G_SOCKET_CLIENT_CONNECTED	173.195.146.137	GTcpConnection
G_SOCKET_CLIENT_TLS_HANDSHAKING	173.195.146.137	GTlsClientConnectionGnutls
G_SOCKET_CLIENT_RESOLVING	173.195.146.137	null
G_SOCKET_CLIENT_COMPLETE	173.195.146.137	null

Extra thoughts

Starfish creates a new instance of GLib.SocketClient for each request, so the caching / resource reuse that's causing the bug has to be in lower level code. Since app restart resets the success-error cycle the issue needs to be tied to the application process.

While I first observed the issue by loading gemini://drewdevault.com pages, it might actually impacts all (or at least some of the) sites served by the gmnisrv Gemini server. One other gemsite that I've observed the bug on is gemini://gmi.noulin.net.

Support wildcard server certificates

What Happened?

Loading gemini page that uses a wildcard CN in its certificate results in Certificate is not applicable error page.

Steps to Reproduce

Go to gemini://om.gay/

Expected Behavior

Certificate should be accepted as normal.

Platform Information

6.x (Odin)

Software Version

Compiled from git

Hardware Info

No response

Improve input page

Input widget should accommodate bigger inputs better (i.e. be multi-line, wrap long text, offer spell checking, etc.)
User should see how many characters they've used up vs how many can still fit into the limit of 1024 bytes for entire UTF-8 encoded absolute URL defined by the spec.
Input prompt should be selectable.

Consider GtkSpell library for spellchecking.

Port to GTK4

Port from GTK3 to GTK4. Underlying elementary stack (library support, Granite, stylesheet, etc.) is a blocker for completing this one, but some preliminary work can be done in advance.

Improve image page

In case image is bigger than the application window it should scale down to fit the window.
User should have an option of zooming the image to its full dimensions or fitting it to window.
User should be able to right-click on the image, and the popup menu should have option to save or copy the image.

Improve tabs

Tab name should use the top level heading from the rendered gemtext, and default to last URI segment only for non-gemtext files.
Tab icon should use site's favicon (as specified in gemini://mozz.us/files/rfc_gemini_favicon.gmi) if available, or a distinct emoji otherwise.
User should be able to pin tabs.
Middle-clicking on navigation buttons in header bar should open corresponding pages in a new tab. In this case of back and forward buttons history should b copied over from the current to the new tab.
Opening links to URIs that have client certificates associated with them in a new tab should not automatically use the certificate.

Align text content to justify by default

Problem

Right now, text is left aligned by default, and also takes up a lot of width. This makes text harder to read in bigger monitors or ultra wide monitors because the text takes up a lot of the screen width, and users need to turn their heads around from left to right in order to read.

Proposal

Make text centre-aligned/justify by default with ample padding on the left and right sides.

Prior Art

Lagrange

Screenshot 2022-01-17 at 16 40 48

Communique

Communique is not a gemini client, but its a RSS reader. Sharing this screenshot since this is my app so it serves as the best example for my proposal.
image

Search Geminispace from address bar

User should be able to enter arbitrary (non URL) words into address bar to search for them over Geminispace.

gemini://geminispace.info/ can be used as a default search engine, but user should be able to configure this in preferences dialog. Dialog should validate user's input by checking that URI:

  • uses gemini schema
  • does not contain a query component
  • results in a 10 INPUT status

Search should be performed by loading the search URL with address bar content added as the query parameter.

Typo

Found a little typo in the description of Starfish in the Elementary OS AppCenter

screenshot(1)

Implement custom theming

User should be able to customize the style of individual gemtext elements.
Theme changes should be applied on the fly to all currently open gemtext pages.
Theme should be saved in a file and should be portable between different Starfish installations (like client certs are).

Add multi-window spport

User should be able to open multiple Starfish windows by either:

  1. Right clicking a link on a Gemini page and picking a new "Open link in a new window" option
  2. Right clicking the Starfish icon in a dock and picking a "Open a New Window" option
  3. Dragging a tab out of an existing window

Each window should persist it's own session states (e.g. history, page loading status, info on certificates etc.).
It should be possible to move tabs across windows, in which case their session state should transition with them.

Add address bar history

Address bar should keep a list of recently visited URIs.
When user starts typing this list should be searched and they should be presented with a list of matching URIs.
This feature should be disabled if user disables history in their Security & Privacy settings.

Add breadcrumbs to address bar

Address bar should represent path segments in current URI as breadcrumb buttons, similar to how elementary Files does it for folder structure.
Address bar should always leave some empty space after the last URI segment button. Clicking on that should allow user to manually enter text. In case of long URIs apply ellipses to middle segments first.
Clicking on individual path segment breadcrumbs should navigate to their corresponding URI.
User should be able to turn this feature off and use manual address bar only.

If server doesn't have any content for a given URI sub-path it's segment should form the same breadcrumb with the next (more concrete) one. For example, given following server responses:

gemini://example.com -> 20 (success)
gemini://example.com/gemlog -> 20 (success)
gemini://example.com/gemlog/2021 -> 51 (not found), 31 (redirect) or other non 2x status
gemini://example.com/gemlog/2021/Jan -> 51 (not found), 31 (redirect) or other non 2x status
gemini://example.com/gemlog/2021/Jan/post.gmi -> 20 (success)

Breadcrumbs for the gemini://example.com/gemlog/2021/Jan/post.gmi URI should look like:

[gemini://example.com > gemlog > 2021/Jan/post.gmi >          ]

User can click on:

  1. [gemini://example.com > to go to gemini://example.com
  2. > gemlog > to go to gemini://example.com/gemlog
  3. > 2021/Jan/post.gmi > to go to gemini://example.com/gemlog/2021/Jan/post.gmi
  4. > ] to enter manual editing mode, which should start with full URI gemini://example.com/gemlog/2021/Jan/post.gmi selected. If address bar loses focus without user pressing enter or clicking on the go/refresh button it should revert back to breadcrumb mode and disregard manual changes to the URI.

Use elementary style on other distros

Currently if Starfish is installed as flatpak on other distributions it looks broken.
Starfish should load elementary stylesheet and icon theme regardless of platform it's installed on.

Support downloads in the background

Downloads should happen in the background. User should be free to navigate away from the file that's being downloaded.
The download page should be redesigned to look better, with proper heading and copy explaining the download process (like client certificate picker page does).
User should be able to review all ongoing downloads and stop them.
Notification for successful download should link to directory where the file was saved to.
Errors that might arise during the download should be communicated to the user, with an option to retry the download.

Improve keyboard navigation

User should be able to use keyboard shortcut(s) to:

  • Trigger all actions that are represented with buttons in the header bar
  • Focus on the address entry
  • Open URI from the address entry in a new tab (similar to how return opens URI in current tab)
  • Navigate the table of contents
  • Focus on links on a gemtext page
  • Open focused links in either current or new tab

There should be a popup detailing all available keyboard shortcuts accessible from the application menu.

Provide Gemini mime type icon

Currently installing Starfish registers Gemini mime type on the system. It should provide a custom icon for it as well.

Update intro page

Problem

Intro page is out of date. Some of the linked pods are no longer online, and there are some new pods that should be included (e.g. new search engines).

Proposal

Update the linked resources across discover and apps pages. Also push the same updates to the on-line version over at gemini://josipantolis.from.hr.

Prior Art (Optional)

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.