Code Monkey home page Code Monkey logo

geopard's Introduction

Geopard

Geopard is a GTK 4 Gemini client written in Rust.

Download on Flathub

screenshot 1 screenshot 1-dark

Some notable features

  • Colors! The browser will have a different color for each domain you visit.

  • Fast (async core + caching): Streams content by default. That means you can open pages even when you have connection speeds of Kb/s. It also caches pages in the history, so you can go back/forward in an instant

  • Can download binary files: The download will start as soon as you open the corresponding link. You can always cancel it by opening another page.

  • It works. Until I find another bug...

Technical details

Under the hood, it uses GTK 4 and Rust. Everything related to IO is asynchronous. To do that, it makes use of Rust's async/await capabilities and the async-std crate.

How to change settings

You should find the configuration files in ~/.config/geopard/ If you use flatpak, they are in ~/.var/app/com.ranfdev.Geopard/config/geopard/. In the future I will probably introduce a settings GUI.

How to build

With Flatpak

If you have gnome-builder installed, use it to open the folder of the source code and hit the run button.

Build with Nix

If you have the nix package manager and flakes enabled, you can simply do:

git clone https://github.com/ranfdev/Geopard.git
nix build
./result/bin/geopard

General build instructions

Install these development packages:

  • gtk4
  • glib
  • rust (with cargo)
  • openssl
  • pkg-config
  • meson

Clone, compile, install.

git clone https://github.com/ranfdev/Geopard.git
cd Geopard
meson --prefix=/usr build
ninja -C build
sudo ninja -C build install

Note You can use a local-build.sh script provided with project's repository to quickly rebuild and test your changes.

License

GPLv3 logo This repository is licensed under the terms of the GNU GPLv3 license. You can find a copy of the license in the LICENSE file.

Authors

Lorenzo Miglietta (ranfdev)

geopard's People

Contributors

basdebue avatar bertob avatar chuangzhu avatar darkdragon-001 avatar daudix avatar ifoundsilenthouse avatar kevgo avatar ranfdev avatar rene-coty avatar tfuxu avatar vanillajonathan avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

geopard's Issues

Keyboard/mouse shortcut suggestions

Thank you for a nice, clean, and GNOME-feel browser. I'd like to suggest adding or changing a few shortcuts to make it feel on par with "big brother" Firefox/Chromium experience.

  • Ctrl-L: focus URL bar (F6 might also be less accessible on keyboards without the F-key row).
  • Mouse middle button: open link in a new tab. Or/and Ctrl+Left button click.
  • Alt+←/→ is documented to cycle tabs. Instead it seems to navigate browsing history back and forth. Bug?
  • Ctrl+[Shift]+Tab: cycle tabs.
  • Alt+0..9 seems to switch tabs, but isn't document.

Geopard version: 1.1.0.

Add support for opening files and opening links

Is your feature request related to a problem? Please describe.
You can not open files or links through a browser or the command line.

Describe the solution you'd like
Adding support for opening files and links would solve this problem and make it more accessible instead of needing to copy and paste links into the browser.

Additional context

Opening a link through the command line

$ flatpak run com.ranfdev.Geopard gemini://abcdef.xyz/
com.ranfdev.Geopard

(geopard:2): GLib-GIO-CRITICAL **: 01:30:25.213: This application can not open files.

Opening a link through the browser

gemini

Ability to widen the screen

Right now Geopard only uses a slim realestate to show the page with no ability to add/change in the configuration file. There are some text that will make you scroll horizontally when you can just show it if it was wide enough.

Unable to run after build.

Tested on 33db318 and release v1.0.1

I'm unable to build and run locally.

Here's my steps to reproduce:

curl -Lo Geopard-1.0.1.tar.gz https://github.com/ranfdev/Geopard/archive/refs/tags/v1.0.1.tar.gz
tar xf Geopard-1.0.1.tar.gz
cd Geopard-1.0.1
meson build
cd build
ninja
./src/release/geopard

Error:

thread 'main' panicked at 'Could not load gresource file: Error { domain: g-file-error-quark, code: 4, message: "Failed to open file “/usr/local/share/geopard/resources.gresource”: open() failed: No such file or directory" }', src/main.rs:67:59

manually changing the RESOURCES_FILE constant in src/build_cofnig.rs isn't changing the error.

Feature request: zoom +/-

On my PinePhone Pro, the font size in Geopard looks great, but on my Desktop PC w/ a 4k monitor the Geopard font is really small.. Is there any chance that a zoom in/out feature could be added to Geopard?

Set autofocus on address bar

Is your feature request related to a problem? Please describe.
It's a little frustrating that wanting to enter a link that I've previously copied, or making a quick search, I have to manually focus on the address bar with my mouse. These two are very often used activities, but it's a repetitive step that we have to go through every time we want to do a search, or open a link.

Describe the solution you'd like
I would solve this problem with a solution taken straightly from standard browsers - while being on home tab / opening new tab, address bar should be automatically focused.
Describe alternatives you've considered
A simple shortcut that would focus on address bar.

Jump to...

Is your feature request related to a problem? Please describe.
Long pages take ages to scroll. Also, you could use this to create toc's.

Describe the solution you'd like
The URI scheme (RFC 3986 section 3.5) defines what it calls fragments (use a # in the URI to reference a chapter of it). It would be nice if this could be implemented somehow.

PS: I really hope I'm not starting to annoy you with all of these items. They're no priority, it's just what I'm noticing and it should be written down.

Handle mouse forward/back buttons

Is your feature request related to a problem? Please describe.
I use my forward and back buttons on my mouse a ton and was wondering if you're going to implement them.

Describe the solution you'd like
Connect forward/back mouse button signal to the same handler which handle the UI buttons.

Open file links in default apps

for example, somthing like this: gemini://example.org/pictures/picture.jpg or gemini://example.org/videos/video.mp4, now it just not work

Back and forward mouse buttons don't do anything

Describe the bug

Trying to navigate back and forward using the extra mouse buttons doesn't do anything. Works in another other GNOME application, and it's a common interaction method in GTK whenever there's "back" and "forward" functions, like web browsers.

To Reproduce

  1. Press back or forward buttons on your mouse. (mouse4 and mouse5)

Software info (please complete the following information):

  • OS: Fedora Silverblue 36
  • Geopard's Version: 1.1.1

Scrollbar should be on the window edge

The scrollbar is inside the clamp, so it draws a lot of attention and doesn't match the rest of the system, where scrollbars are always on the edge of the view,

image

Make tab oerview accessible in desktop winodw size

Is your feature request related to a problem? Please describe.
Currently tab overview is only available when window has small size, and there are no shortcut to open it, which is sad as it's nice on desktop too

Describe the solution you'd like
Make tab overview button visible in headerbar in all window sizes, like Epiphany does, and make it accessible via shortcut (Epiphany and Console use Shift + Ctrl + O)

Describe alternatives you've considered
Adding only keyboard shortcut

Additional context
Epiphany tab overview button in desktop and mobile sizes

Снимок экрана от 2023-07-14 06-29-52
Снимок экрана от 2023-07-14 06-30-05

btw congrats with 100 stars :)

Search in a page + Navigation history

Just two feature suggestions to enhance the browsing experience:

  • Searching some content in a page with the Ctrl+F shortcut
  • A navigation history window that could be opened with Ctrl+H and display the user's browsing history

Render Markdown

Is your feature request related to a problem? Please describe.
It would be cool if Geopard could render Markdown. Sure, gmi is the "native" syntax, but it also clearly states that alternatives can certainly be used. Markdown would allow gemini to be used for documentation with tables, code blocks and so on.

Join Gnome circle ?

This app looks pretty mature and takes advantage of brand new GTK4 / libadwaita features e.g.: with TabOverview, while keeping the browsing experience simple and neat 🙂️
Joining Gnome circle would help to make it known and receive more attention from the Linux community...

Reload button

Is your feature request related to a problem? Please describe.
I've needed to reload websites a lot lately for development and if certain sites are down... I think a reload button would make a ton of sense here.

Describe the solution you'd like
A reload button between back/forward and new tab.

Additional context
I'd love to help implement it (since it very low hanging fruit) but I really can't understand the code (or rust in general), I really tried to understand it...

Geopard won't start (Flatpak)

Describe the bug
The Flatpak version of Geopard won't start. Neither from an application launcher nor from cli.

To Reproduce
Steps to reproduce the behavior:

  • Start Geopard from application launcher (wofi --show drun)
  • Start Geopard from flatpak-cli (flatpak run com.ranfdev.Geopard)
  • Error message appears (see additional context)

Expected behavior
Geopard should start in a graphical window.

Screenshots
.

Software info (please complete the following information):

  • OS: 5.18.3-arch1-1 running sway (Wayland)
  • Geopard's Version: 1.2.0 (with flatpak info com.ranfdev.Geopard )

Additional context
Error message after running flatpak start com.ranfdev.Geopard:

com.ranfdev.Geopard
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/widgets/window.rs:618:80
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Looks like it's this line:

.set_link_color(&self.style_context().lookup_color("accent_color").unwrap());

I am looking forward on this project since i quite like the minimalism of the gemini protocol. On version 1.1.0 I got a similar issue but it also said something about xdg.desktop.portal.Settings.

Request: link URL tooltip

I often prefer to know where a link leads to before I may want to click it. I'd like to suggest adding a visual cue to help a user understand whither an active/focused link points.

For example, Firefox, Chromium, Liferea, etc. provide a link URL in a status bar upon hovering over a link. Alternatively it may be a tooltip. Here is a (partly contrived) example:

url-tooltip

Version: 1.1.0.

Automatically build and publish to flathub-beta from master

Is your feature request related to a problem? Please describe.
I (like others) want to test new changes before a new release has been published.

Describe the solution you'd like
I would suggest expanding the workflow to automatically publish each commit to flathub-beta to make testing easier.

Move renderer to WebKitGtk

Description

The current solution of using TextView for rendering Gemini documents is quite ingenious I must say, but it also limits things that can be done in Geopard. For example images can't be rendered in normal TextView and long text in preformatted mode makes whole webview horizontally longer (which could be resolved in WebKit by adding a frame to preformatted text with horizontal scrollbar).

WebKitGtk has a broad range of functions and classes which allow for complete customization to make it as integrated in Gtk apps as possible. WebKit has built-in TLS certificates support (access to website's TLS information available in this function) which would resolve issue #19. It has find controller for implementing text search in WebView (possibly resolves #42). There is also an extensive Settings class which allows to modify or disable almost every feature of WebKit.

For possible implementation, Dev Toolbox and Apostrophe uses WebViewGtk for rendering Markdown preview. For Dev Toolbox implementation, you can look here, and here on how it converts Markdown to HTML. For Apostrophe, you can look here and here.

Prepare for translation

Describe the solution you'd like
I'd like to help contribute a German translation file. If you prepare the application to accept translation files and provide templates with instructions, I'll do the German translation for you

Certificate support

Going to a Gemini website that requires a certificate (e.g. gemini://feeds.drewdevault.com) currently just shows "Error: A certificate is required to access this page".

Is there a way to provide a certificate?

Some links are displayed as text

Describe the bug
When there is not a space between the => and the link direction, Geopard does not view it as a link.

To Reproduce
Steps to reproduce the behavior:

  1. Go to a capsule that does this, for example: gemini://station.martinrue.com/

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
image
image

Software info (please complete the following information):

  • OS: Fedora Silverblue 36
  • Geopard's Version: 1.3.0

Using a monospaced font

There are a lot of gemini pages which used ascii arts. For example:
نماگرفت از 2022-05-23 13-33-50

‌But in Geopard is completely unreadable:
نماگرفت از 2022-05-23 13-33-59

This can be fixed with a monospaced font like DejaVu Sanse Mono Book and also less distance between lines.

Support mouse back and forward buttons

I have two buttons on my mouse that on other browsers would when pressed move one page back or forward, depending on the button pressed.

Currently Geopard does not seem to implemented it and it would be cool to see it being supported.

Beautiful client btw!

Images not shown?

Hi there. Thanks for this fine piece of software. Just discovered Gemini and Geopard makes it a fine experience. I have installed it through flatpak (from https://flathub.org/apps/details/com.ranfdev.Geopard) on Fedora (36) and noticed that images aren't shown. When clinking an image-link the screen blanks and a "load bar" will show at the top of the view, but no matter how long I wait, no image is shown. I am not really sure if this is a bug, a problem with the flatpak or just not implemented yet. I'd thought I'd let you know. I have tried it amongst others with the image links on: gemini://caolan.uk/workshop/2020-10-25_bramley_buttons.gmi

regards,
Rolf

Being able to change font

The default font is very nice, but I would really like to be able to change to a different font.

I guess two options are enough, one for proportional fonts, and one for monospace.

Remove bookmark

Is your feature request related to a problem? Please describe.
It seems there's no easy way via the GUI to remove a bookmark

Describe the solution you'd like
There's a few ways of doing this, one would be on the bookmark page you'd have an X next to every bookmark. You'd have to do some finicky stuff since this bookmark page is just gemini/markdown itself.

Describe alternatives you've considered
Otherwise a less user friendly yet easy solution would be to change the context menu's "add to bookmarks" to "remove from bookmarks." Ideally you'd have both

Dark theme

Do you plan to implement a dark theme?
Thanks

tab problem

Hi
Look at this:
نماگرفت از 2022-05-23 13-00-41

When The window became a bit smaller and page title can't fit in it (Look at the left tab):
نماگرفت از 2022-05-23 13-00-54

URL in this screenshot: gemini://gemini.circumlunar.space/news/atom.xml
(It is Right-To-Left because my system language is RTL.)

Selecting text messes with the styling

Describe the bug
When selecting text over multiple lines with different styling, the styling of the "normal" text will change.

To Reproduce
Steps to reproduce the behavior:

  1. Drag to select text on heading
  2. Move the mouse cursor
  3. The selected text will get the wrong styling

Expected behavior
The text shouldn't be messing up

Screenshots
https://user-images.githubusercontent.com/33233376/173638773-4f704e91-2198-43fd-b437-11c8efc257ed.mp4

Software info (please complete the following information):

  • OS: Fedora 36
  • Geopard's Version: git master compiled with Builder

Page Source if you're interested

# Title

this is a paragraph
this is line 2

* First item
* Second item
* Thrid item

Missing symbolic logo

Symbolic versions of application logos are recommended by GNOME HIG, as they are used to represent the app icon at smaller sizes (eg. in a focused window controls in GNOME panel) and in high-contrast theme. Currently Geopard doesn't have its own symbolic logo, so the fallback desaturated version of logo is used, which just looks like a circle.

Current Geopard desaturated logo:
Screenshot from 2023-03-25 20-06-42

Example symbolic logo:
Screenshot from 2023-03-25 19-30-54

Unable to build

I'm trying to build the project to test the mouse buttons, however I seem to be unable to get the build working with gnome-builder. Log:

flatpak build --env=TERM=xterm-256color --env=V=0 --env=CCACHE_DIR=/home/sebastian/.var/app/org.gnome.Builder/cache/gnome-builder/flatpak-builder/ccache --env=FLATPAK_CONFIG_DIR=/home/sebastian/.var/app/org.gnome.Builder/data/gnome-builder/flatpak/etc --env=PATH=/app/bin:/usr/bin:/usr/lib/sdk/rust-stable/bin --env=G_MESSAGES_DEBUG= --env=XDG_RUNTIME_DIR=/run/user/1000 --build-dir=/home/sebastian/Projects/Geopard/_build --share=network --nofilesystem=host --filesystem=/home/sebastian/.var/app/org.gnome.Builder/cache/gnome-builder --filesystem=/home/sebastian/Projects/Geopard --filesystem=/home/sebastian/Projects/Geopard/_build --env=RUST_LOG=info --env=NOCONFIGURE=1 /home/sebastian/.var/app/org.gnome.Builder/cache/gnome-builder/projects/Geopard/flatpak/staging/x86_64-master ninja
[0/1] Generating cargo-build with a custom command
    Updating git repository `https://github.com/ranfdev/gtk-rs-core.git`
error: failed to load source for dependency `gio`

Caused by:
  Unable to update https://github.com/ranfdev/gtk-rs-core.git?branch=props_macro#ba2dadf7

Caused by:
  object not found - no match for id (ba2dadf7c1e19d23f54eab9d6fbc94dcf1a0fb82); class=Odb (9); code=NotFound (-3)
FAILED: src/geopard 
/usr/bin/env CARGO_HOME=/home/sebastian/Projects/Geopard/_build/cargo-home /usr/lib/sdk/rust-stable/bin/cargo build --manifest-path /home/sebastian/Projects/Geopard/Cargo.toml --target-dir /home/sebastian/Projects/Geopard/_build/src && cp src/debug/geopard src/geopard
ninja: build stopped: subcommand failed.

System: Fedora 36
I have gtk4-devel, glib-devel- rust, cargo, rust-pkg-config-devel, meson, openssl-devel installed.

Current URL for input not updated after redirect

Describe the bug

  1. You access a URL, say example.com/path. It returns a code 10 for input.
  2. Geopard submits that input as example.com/path?input. The server returns a code 30 for redirect to example.com/new-path
  3. Geopard accesses the URL at example.com/new-path. It returns another code 10 for input.
  4. Geopard submits that input not to example.com/new-path?new-input, but to example.com/path?new-input.
  5. Explosions ensue.

To Reproduce
See above.

Expected behavior
Geopard should submit the second input to example.com/new-path?new-input.

Screenshots
None.

Software info (please complete the following information):

  • OS: Arch Linux
  • Geopard's Version [e.g. 1.3.0] (you can retrieve the current version with flatpak info com.ranfdev.Geopard )

Additional context
None.

Handle data urls?

See this post: gemini://skyjake.fi/gemlog/2022-02_our-old-friend-the-data-url.gmi

Download not working on Flatpak

I've installed Geopard Flatpak on flathub and downloads won't start.
If you click a link (Konpeito's tape (gemini://konpeito.media/index.gmi), for example) the page will change for a never ending loading and nothing happens.

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.