A simple note taking application written in Rust and GTK4

Overview




Rnote

A simple note taking application written in Rust and GTK4.

Rnote aims to be a simple but functional note taking application for freehand drawing or annotating pictures or documents. It eventually should be able to import / export various media file formats.
One main consideration is that it is vector based, which should make it very flexible in editing and altering the contents.

Disclaimer
This is my first Rust and GTK project and I am learning as I go along. It might blow up your computer. ;)

Installation

Rnote is available as a flatpak on Flathub:


Download on Flathub


Feature Ideas:

  • Stroke history list widget
    • with the ability to move them up and down the history / layers
  • Stroke trash restorer
    • with a preview of the deleted strokes
  • Stylus buttons configuration to map them to different actions or switch to different pens

To-Do

  • switch geometry to nalgebra wherever possible. It can operate on f64 and has much more features than graphene.
  • template deduplication when loading in .rnote save files.
  • printing / PDF export
  • PDF import
  • picture import
  • export as bitmap picture
  • implement bezier curve stroke with variable stroke width (see Quadratic bezier offsetting with selective subdivision, Precise offsetting of bezier curves)
  • (implemented: lines, rectangles, ellipses) drawing rough shapes by porting rough.js to Rust (see ./src/rough-rs)
  • make as much as possible parallel, especially rendering and actions which affect many strokes.
  • implement text fields

Screenshots

If you have drawn something beautiful in Rnote and want to share it, let me know so I can include it as a screenshot. :)

main_window_dark main_window_light multiple_pages selection

Building with Flatpak

There is a flatpak manifest in build-aux/com.github.flxzt.rnote.Devel.json.

Use Gnome Builder or vscode with the flatpak extension to build and run the application for you. This is the easiest and recommended way.

Bugs and workarounds

  • If you encounter bwrap: Can't find source path /run/user/1000/doc/by-app/com.github.flxzt.rnote: No such file or directory when trying to run the flatpak, xdg-document-portal did not start yet. Starting it manually with systemctl start --user xdg-document-portal should fix it.

If you don't have an IDE or extension to handle building flatpaks, you can also do it manually:

First the Gnome 41 SDK is needed:

flatpak install org.gnome.Sdk//41 org.freedesktop.Sdk.Extension.rust-stable//21.08 org.gnome.Platform//41

Build
Building the app with flatpak is done with:

flatpak-builder --user flatpak-app build-aux/com.github.flxzt.rnote.Devel.json

Creating a repo:

flatpak-builder --user --repo=flatpak-repo flatpak-app build-aux/com.github.flxzt.rnote.Devel.json

Install
Install to the system as user with:

flatpak-builder --user --install flatpak-app build-aux/com.github.flxzt.rnote.Devel.json

Run
Then it can be run. From the build directory:

flatpak-builder --run flatpak-app build-aux/com.github.flxzt.rnote.Devel.json rnote

Or if it is installed:

flatpak run com.github.flxzt.rnote

Build with Meson

The flatpak manifest calls the meson build system to build the application. If a native build is wanted, meson can be called directly.

Make sure rustc and cargo are installed. Then run:

meson setup --prefix=/usr _mesonbuild

Meson will ask for the user password when needed.

To enable the development profile, set -Dprofile=devel as a parameter. Else the default profile will be set. ( This can be reconfigured later )

Compile
Once the project is configured, it can be compiled with:

meson compile -C _mesonbuild

The compiled binary should now be here: ./_mesonbuild/target/release/rnote.

Install
Installing the binary into the system can be done with:

meson install -C _mesonbuild

Test
Meson has some tests to validate the desktop, gresources, ... files.

meson test -v -C _mesonbuild

This places the files in the specified prefix and their subpaths. The binary should now be in /usr/bin (and therefore in PATH)

Reconfigure
reconfiguring the meson build files can be done with:

meson configure -Dprofile=default _mesonbuild

For example if the profile needs to be changed.

Uninstall
If you don't like rnote, or decided that is not worth your precious disk space, you can always uninstall it with:

sudo ninja uninstall -C _mesonbuild
Comments
  • New icon?

    New icon?

    The current icon doesn't quite fit the HIG, would you be interested in help with a new one?

    Here's a first idea I had, but I'd be happy to try something else:

    image

    UX 
    opened by bertob 23
  • Stylus eraser mode

    Stylus eraser mode "sticks" for one more stroke

    Describe the bug Instead of immediately switching to pen eraser stays for one more stroke after I let go of the eraser button on the stylus.

    To Reproduce Steps to reproduce the behavior:

    1. Press and hold the eraser button on the stylus
    2. Let go of it
    3. Try to draw something with a "pen"
    4. See that the tool for the current stroke is still eraser

    Expected behavior I expect to be able to draw immediately after letting go of the eraser button.

    ** Console Output ** None

    Desktop (please complete the following information):

    • OS: Gentoo GNU/Linux
    • Installation source: build from source commit 2b8248e60f010c3bf5df91f0ed849cbb47fcf367
    • Desktop Environment: KDE Plasma 5.23

    Additional context Wacom in-screen sensor & Wacom Bamboo Ink stylus, the issue is reproducible with other styluses

    bug 
    opened by pavel-the-best 13
  • Suggestions for menu strings

    Suggestions for menu strings

    Hi Felix. These are just some suggestions to potentially clarify menus in the app.

    What I found

    • The use of "Sheet" everywhere. When the user has "show format option" active, the user is exposed to, in a way, multiple sheets. Therefore, options such as clear sheet, save sheet and so on could infer saving only the active "sheet". In this merged request, I changed "sheet" to "document" where necessary, while keeping "sheet" for "Sheet format", "Zoom to fit sheet width" etc.

    • "Expand mode" to "Layout"

    • "Endless vertical" to "Continuous vertical"

    • "Export .." to "Export…"

    Tell me what you think.

    opened by mbousq 13
  • Proportional shapes

    Proportional shapes

    Fixes #124 when closed. Currently this provides 1:1/3:2/golden ratio-based constraints for lines, rectangles and ellipses.

    Some problems:

    • I'm not sure the current way to pass ratio to Builders is readable... it could be a parameter for Shaper::handle_event, or could be put in PenEvent?
    • How Foci ellipses and bezier curves should be constrained?
    opened by sei0o 13
  • adjust setter_button CSS, closes #305

    adjust setter_button CSS, closes #305

    The PR improves the contrast of the border around color buttons by mixing the default border color with the current foreground color. This fixes the issue mentioned in the first part of #305 - if you look closely, you can see that there is a border around the first button, but it is nearly identical to the current background color, making it look like an indentation issue.

    dark theme | light theme :-------------------------:|:-------------------------: |

    The PR also adds 1px of margin to the bottom of each button. This improves/fixes (?) the second issue mentioned in #305.

    0px | 1px | 2px :-------------------------:|:-------------------------:|:-------------------------: | |

    EDIT: The PR also fixes the border radius and brightness transitions when switching between or hovering over/clicking on colors.


    TLDR:

    • Closes #305.
    • Fixes transition when hovering over & switching colors.
    opened by Kneemund 12
  • add three coordinate system shape builders

    add three coordinate system shape builders

    Adds "2D coordinate system", "3D coordinate system", "2D single quadrant coordinate system".

    Things to consider/discuss:

    1. Each shape builder currently emits 2 line shapes per axis, making it possible to only delete the positive/negative part.
    2. The 3D coordinate system is very simplified (the X axis is at an 45° angle), making it simple to use but not suitable for accurate representations.
    3. There is no 3D single octant coordinate system at the moment, and I don't think that's necessary either.
    4. The boundary of the shape builders is currently computed by merging the AABBs of all the lines that are involved; this could be heavily simplified by creating a single AABB using the axes as half extends, but doing so wouldn't take the shape style into account. Realistically, the loosened operation should take care of minor differences due to the shape style, but I went for the most accurate and "future-proof" solution for now.
    5. The 3D coordinate system builder could be turned into a two step builder (like the ellipse builder), allowing you to "define" your own X axis length.
    6. (These builders should be grouped and collapsible, but that should probably be done in a separate PR/commit.)
    7. (Rename some of the shapes? Improve some of the symbols?)
    opened by Kneemund 11
  • feature: clipboard paste from screenshot for png, jp(e)g, bmp and tiff mime types

    feature: clipboard paste from screenshot for png, jp(e)g, bmp and tiff mime types

    Extending https://github.com/flxzt/rnote/issues/17 and follow up on https://github.com/flxzt/rnote/discussions/177, I implemented paste from a direct screenshot save. Not sure if it's the way to go, but it works. The branching is getting a little too big though.

    opened by RickStanley 11
  • UI: Tool icons are off-style

    UI: Tool icons are off-style

    Many of the tool icons are not hinted to the pixel grid, have too much detail, or are using an older, smaller/less geometric GNOME symbolic style.

    I'd recommend switching them to the following icons from Icon Library:

    • Brush: paintbrush paintbrush-symbolic
    • Shaper: shapes shapes-symbolic
    • Typewriter: text3 text3-symbolic
    • Eraser: eraser4 eraser4-symbolic
    • Selector: edit-select-all edit-select-all-symbolic
    • Tools: wrench-wide wrench-wide-symbolic

    image

    UX 
    opened by bertob 10
  • Can not import pdf files

    Can not import pdf files

    Specs

    Rnote version: 0.3.1

    Current behavior

    When I open or import a pdf with rnote it just crashes.

    Below is the cli output when I launch rnote and import a pdf.

    $ flatpak run com.github.flxzt.rnote
    
    (rnote:2): Gtk-CRITICAL **: 16:35:41.552: gtk_widget_set_parent: assertion '_gtk_widget_get_parent (widget) == NULL' failed
    
    (rnote:2): Gtk-CRITICAL **: 16:35:41.553: gtk_widget_set_parent: assertion '_gtk_widget_get_parent (widget) == NULL' failed
    
    (rnote:2): Gtk-CRITICAL **: 16:35:41.597: gtk_widget_set_parent: assertion '_gtk_widget_get_parent (widget) == NULL' failed
    
    (rnote:2): Gtk-CRITICAL **: 16:35:41.597: gtk_widget_set_parent: assertion '_gtk_widget_get_parent (widget) == NULL' failed
    
    (rnote:2): Gtk-CRITICAL **: 16:35:41.628: gtk_widget_set_parent: assertion '_gtk_widget_get_parent (widget) == NULL' failed
    
    (rnote:2): GStreamer-WARNING **: 16:35:41.680: loop detected in the graph of bin 'marker_pipeline'!!
    
    (rnote:2): Gdk-CRITICAL **: 16:35:53.507: gdk_memory_texture_new_subtexture: assertion 'x < 0 || x >= GDK_TEXTURE (source)->width' failed
    
    (rnote:2): Gdk-CRITICAL **: 16:35:53.507: gdk_texture_get_width: assertion 'GDK_IS_TEXTURE (texture)' failed
    
    (rnote:2): Gdk-CRITICAL **: 16:35:53.507: gdk_texture_get_height: assertion 'GDK_IS_TEXTURE (texture)' failed
    
    

    Expected behavior

    Previously (v0.2.5 or so) it was able to open pdfs without issues.

    bug 
    opened by alexpattyn 10
  • Add basic file context menu for the workspace browser

    Add basic file context menu for the workspace browser

    The file browser needs a basic context menu to manipulate the files. It doesn't need to be as extensive as nautilus, but I think at least "open", "rename", "delete", "duplicate" should be implemented.

    The UI for it should similar to spots context menu, meaning as a menu button in the list item (for stylus users). filebrowser-contextmenu-ui

    Inspiration for the implementation can be taken from here: https://gitlab.gnome.org/World/Fragments/-/commit/af6c4f25645340638dacccac03d9a31af2fa348a (MenuButton with PopoverMenu and a MenuModel).
    The gio::File's can be exctracted from the listitem with an expression, just like its already done for the titles.

    enhancement good first issue 
    opened by flxzt 10
  • small fixes related to unsaved changes

    small fixes related to unsaved changes

    • Set unsaved changes to true after deleting a file or one of its parent directories.
    • Only show new file confirmation dialog if there are unsaved changes.
    opened by Kneemund 9
  • continuous vertical and horizontal layout implementation (#263)

    continuous vertical and horizontal layout implementation (#263)

    Implementation of the layout i described in this issue: https://github.com/flxzt/rnote/issues/263

    There is a bug that makes the layout menu overlap when selecting a layout and then reopening the menu.

    Also I am unsure about the naming of the layout. Some ideas i had:

    • Semi-infinite
    • Half-infinite
    • Continuous
    • Continuous xy
    • Continuous vertical and horizontal
    opened by D0V4HKIIN 0
  • Touch-drag a selection when holding selection pen button duplicates it

    Touch-drag a selection when holding selection pen button duplicates it

    Description

    there are some strokes selected if you hold the selection button on the pen and begin a pen input by touching the screen on the selection area, the selection gets duplicated and you can drag it around with the pen. this is very useful for fast duplication using pen only, without ever needing to touch the duplication button.

    Example

    here is an example, (xournal++)

    demonstration.webm

    opened by olbotta 0
  • stroke straightening when holding pen still after stroke

    stroke straightening when holding pen still after stroke

    Some note-taking apps have this cool feature to make really straight lines in a simple way:

    when you draw a stroke, and you stand still with the pen without lifting it from the screen, after ~1s a straight stroke is drawn from the stroke starting point to the point you are holding the pen (and the original stroke gets deleted).

    Usually this does not work when the initial stroke is too "wavy".

    opened by olbotta 0
  • copy and paste selections between open Rnote windows

    copy and paste selections between open Rnote windows

    For example, I'm writing finalexamprep.rnote and wanted to copy my written math formulas from week11workbook.rnote

    Currently it seems like this is not possible (yet?), so I have to start writing my math formulas all over again since "duplicate selection" only works in the same Rnote window.

    It would be great if we can copy/paste selections between 2 open Rnote windows.

    opened by SashaPGT 0
  • add file monitor to output file

    add file monitor to output file

    • This PR implements a file monitor for the current output file, as discussed in #347.
      • If the file's new destination is known (e.g. after renaming), the output file is updated accordingly.
      • If the file's new destination is unknown (e.g. after deleting it; sometimes after moving it), the output file is cleared and the unsaved changes flag is set.
    • It makes special treatment for file row actions redundant, which is why it partially reverts #347 and fully reverts #343.
    opened by Kneemund 3
  • Could not type Chinese in Linux version with Fcitx5

    Could not type Chinese in Linux version with Fcitx5

    Describe the bug Could not type Chinese in Linux version with IME. (I use Fcitx5)

    To Reproduce Steps to reproduce the behavior:

    1. Go to 'Typewriter' mode
    2. Create a textbox
    3. Try entering Chinese with IME
    4. Only letters get entered

    Expected behavior Chinese characters should get entered.

    ** Console Output ** No output.

    Screenshots Screenshot

    Desktop (please complete the following information):

    • OS: Ubuntu
    • Version: 22.10
    • Installation source: Flatpak, also tried build from source
    • Desktop Environment: KDE 5.26

    Additional context I can type in filename in "save file" dialog, so both the IME and GTK 4 configuration should have no problem.

    bug 
    opened by Jisu-Woniu 0
Releases(v0.5.8)
Owner
Felix Zwettler
Felix Zwettler
Neovim GUI written in Rust, using relm4 and gtk4-rs

Reovim Neovim GUI written in Rust, using relm4 and gtk4-rs. Thanks Neovide Configuration To setup font add next line to init.vim set guifont=Cascadia\

songww 66 Nov 20, 2022
An Anime Game Launcher variant written on Rust, GTK4 and libadwaita, using Anime Game Core library

An Anime Game Launcher GTK The launcher variant written on Rust, GTK4 and libadwaita, using Anime Game Core library You could also try the main branch

An Anime Team 56 Nov 27, 2022
Honkers Launcher variant written on Rust, GTK4 and libadwaita, using Anime Game Core library

You could also try the main branch Development Folder Description ui Blueprint UI files ui/.dist UI files compiled by the blueprint src Rust source co

An Anime Team 9 Nov 2, 2022
Unofficial Linux QQ client, based on GTK4 and libadwaita, developed with Rust and Relm4.

GTK QQ (WIP) Unofficial Linux QQ client, based on GTK4 and libadwaita, developed with Rust and Relm4. Screenshots Light Dark Note The two screenshots

Lomírus 185 Nov 14, 2022
An idiomatic GUI library inspired by Elm and based on gtk4-rs

An idiomatic GUI library inspired by Elm and based on gtk4-rs. Relm4 is a new version of relm that's built from scratch and is compatible with GTK4 an

Aaron Erhardt 677 Nov 30, 2022
A Modern, Open Source GTK4 ebook manager powered by Rust.

Bookx An MVP in progress: An ebook reader with .epub support Context menu for each book (delete, rename book, info) On click switch the carousal to th

Anurag Dhadse 11 Nov 18, 2022
ZeroTier Desktop Tray Application and UI

ZeroTier Desktop Tray Application and User Interface This is (as of ZeroTier 1.8) the system tray application and user interface for controlling a loc

ZeroTier, Inc. 100 Dec 3, 2022
A desktop application wrapper for CovidValidator.app

A desktop application wrapper for CovidValidator.app Check EU Digitial Covid Certificates with ease and validate them against local or country rules.

Timo Koenig 2 Mar 15, 2022
A lightweight cross-platform system-monitoring fltk gui application based on sysinfo

Sysinfo-gui A lightweight cross-platform system-monitoring fltk gui application based on sysinfo. The UI design is inspired by stacer. The svg icons a

Mohammed Alyousef 18 Dec 1, 2022
Deno is a simple, modern and secure runtime for JavaScript and TypeScript that uses V8 and is built in Rust.

Deno Deno is a simple, modern and secure runtime for JavaScript and TypeScript that uses V8 and is built in Rust. Features Secure by default. No file,

Derek Jones 2 Aug 13, 2022
A simple GUI version of the pH calibration tool written in egui, based on the eframe template.

caliphui A simple GUI version of the pH calibration tool written in egui, based on the eframe template. Usage Native binaries are provided under relea

Peter Dunne 0 Dec 29, 2021
A simple, clean, and beautiful WYSIWYG Markdown editor and content-management system

ScribeDown Current version: v0.0.1 Feature level: See the roadmap Beautiful, Clean, Writer-Oriented The goal of ScribeDown is to make Markdown the bes

Alex Dumas 2 Sep 1, 2022
Simple GTK Rust Fuzzer which aims to test all available classes and functions in GTK.

Gtk Rust Fuzzer Simple GTK Rust Fuzzer which aims to test all available classes and functions in GTK. It finds bugs inside GTK functions, GTK exported

Rafał Mikrut 8 Nov 19, 2022
Simple and portable (but not inflexible) GUI library in C that uses the native GUI technologies of each platform it supports.

libui: a portable GUI library for C This README is being written. Status It has come to my attention that I have not been particularly clear about how

Pietro Gagliardi 10.4k Nov 28, 2022
Szyszka is a simple but powerful and fast bulk file renamer.

Szyszka is a simple but powerful and fast bulk file renamer. Features Written in Rust Available for Linux, Mac and Windows Simple GUI created

Rafał Mikrut 648 Nov 19, 2022
A simple, cross-platform GUI automation module for Rust.

AutoPilot AutoPilot is a Rust port of the Python C extension AutoPy, a simple, cross-platform GUI automation library for Python. For more information,

null 267 Nov 25, 2022
A simple UI framework for Rust built on top of IUP (http://webserver2.tecgraf.puc-rio.br/iup/)

KISS-UI A UI framework for Rust based on the KISS (Keep It Simple, Stupid!) philosophy. Powered by the IUP GUI library for C by Tecgraf, via the bindi

null 342 Jul 11, 2022
A simple news reading GUI app built in Rust

Headlines [WIP] A native GUI app built with Rust using egui. Uses newsapi.org as the source to fetch news articles. This is a WIP and the current stat

creativcoder 83 Nov 26, 2022
A simple, efficient spring animation library for smooth, natural motion in Rust

Natura A simple, efficient spring animation library for smooth, natural motion in Rust Usage Natura is framework-agnostic and works well in 2D and 3D

O(ʒ) 57 Nov 14, 2022