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
  • 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.
    • Uses toasts to indicate moves/deletions, renames, and modifications (with a button for reloading).
      • Updates the output file and unsaved changes flag accordingly.
    • Refactors toasts and adds toasts with buttons.
    • It makes special treatment for file row actions redundant, which is why it partially reverts #347 and fully reverts #343.

    (For more details, see discussion below.)

    opened by Kneemund 35
  • CI: add cargo cache, use meson, rename steps

    CI: add cargo cache, use meson, rename steps

    • Adds caching like described in the first half of #393.
      • A cache is invalidated as soon as (the hash of) Cargo.lock changes. If that happens, the latest cache is restored anyway, but the cache is rebuilt at the end of the build process.
    • Renames most of the steps, or adds names if they were missing.

    Things to consider:

    • rustfmt is already included in the used toolchain, and the step that's supposed to install it (rustup component add rustfmt) only logs that it's up to date. It could be safely removed as far as I can tell, but there would be no benefit in terms of time.
    opened by Kneemund 23
  • 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
  • Sine/Cosine/Tan functions as shapes under shape builder

    Sine/Cosine/Tan functions as shapes under shape builder

    There is an option for a 2d coordinate system under the "shape builders" menu, but it is quite difficult to use the axes to sketch any of the common functions by hand. It would be useful if you could create sine/cosine/tan functions as shapes that you can put on top of the 2d coordinate system shape. There doesn't need to be any customisation for the functions, as if you're doing a sketch you won't mind getting an approximation by just dragging the functions along the axes, and if you're doing anything other than a sketch, you should probably just use actual graphing software and import a vector graphic from that.

    enhancement good first issue 
    opened by wiryfuture 0
  • Import PDF pages are not aligned with rnote pages

    Import PDF pages are not aligned with rnote pages

    Describe the bug When I open a PDF through rnote, the pages are not aligned with rnote pages.

    To Reproduce Steps to reproduce the behavior:

    1. Right click on pdf
    2. Choose "Open Width"
    3. Choose "rnote"
    4. See error

    (same happens when importing the pdf from a new rnote window)

    Expected behavior The pages to be aligned.

    ** Console Output ** There was no output.

    Screenshots Screenshot from 2023-01-02 11-07-57 Screenshot from 2023-01-02 11-07-18 Screenshot from 2023-01-02 11-07-27 Screenshot from 2023-01-02 11-07-33

    Desktop (please complete the following information):

    • OS: EndeavourOS (rolling distro and kept up-to-date)
    • Version: Rnote: 0.5.12
    • Installation source: flatpak
    • Desktop Environment: Gnome 43.2
    opened by romanovzky 3
  • Download icon used for save button instead of a save icon

    Download icon used for save button instead of a save icon

    Describe the bug The save button in the top left uses a download icon instead of the normal floppy diskette to represent saving, which just isn't intuitive and is confusing.

    To Reproduce Steps to reproduce the behavior:

    1. Look at the top left save icon
    2. It's a download icon

    Expected behavior The save button should use a save icon.

    Screenshots image

    Desktop (please complete the following information):

    • OS: Fedora
    • Version: 37
    • Installation source: Flatpak
    • Desktop Environment: Gnome 43.2
    UX 
    opened by wiryfuture 1
  • add an option to export strokes within user-defined, arbitrary bounds

    add an option to export strokes within user-defined, arbitrary bounds

    Is your feature request related to a problem? Please describe. Currently it is only possible to export the selection, which has automatic, fixed bounds.

    Describe the solution you'd like It would be nice to be able to export all strokes that are inside a user defined rectangle.

    Describe alternatives you've considered Currently the only way to do that is either through a screenshot tool for bitmap images or for SVG's editing through an external program like inkscape after export.

    enhancement 
    opened by flxzt 0
  • Incorrect color of text when exporting selection as raster image

    Incorrect color of text when exporting selection as raster image

    Describe the bug When exporting selected elements that contain text pieces as raster images (jpg/png), the exported text color is incorrect (black instead of selected red). The text color is correct when exporting as pdf or svg (red). Included example problematic rnote file in attachment below.

    The interesting thing is that when selection contains text elements with 2 different colors it works correctly (sometimes).

    To Reproduce Steps to reproduce the behavior:

    1. Open new rnote document.
    2. Select "Typewriter"
    3. Change color to red
    4. Create some text
    5. Pick "Selector" and select text
    6. Menu -> Export -> Export selection
    7. Set export format to png or jpg
    8. Save file
    9. The color of the text on the exported image is black

    Expected behavior The color of the text on the exported image is red

    ** Console Output ** Only a few instances of

    (rnote:2): Gtk-CRITICAL **: 15:14:16.460: The layout manager of type GtkBoxLayout 0x7fbdc8003200 does not create GtkLayoutChild instances
    

    Screenshots N/A

    Desktop (please complete the following information):

    • OS: Debian
    • Version: Sid
    • Installation source: Flatpak
    • Desktop Environment: Gnome 43.1

    Additional context test.zip contains the test rnote file, exported png with wrong color, and exported svg with correct color.

    bug 
    opened by p2004a 1
Releases(v0.5.12)
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 70 Dec 13, 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 77 Jan 9, 2023
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 198 Dec 24, 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 722 Dec 31, 2022
Unsafe bindings and a safe wrapper for gtk4-layer-shell, automatically generated from a .gir file

gtk4-layer-shell: gtk4-layer-shell-sys: gtk4-layer-shell This is the safe wrapper for gtk4-layer-shell, automatically generated from its .gir file. Fo

null 3 Apr 30, 2023
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 12 Dec 28, 2022
A simple Iced application that I wrote as a learning activity, which allows you to browse the full list of regular Material Icons.

Iced Material Icon Browser Iced Material Icon Browser is a simple Iced application that I wrote as a learning activity, which allows you to browse the

BB-301 4 Sep 18, 2023
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. 102 Dec 20, 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 22 Dec 31, 2022
Crate for simple implementation of Component for Native API 1C:Enterprise written in rust

Гайд по использованию на русском языке можно посмотреть здесь и задать вопросы по использованию, но не оставляйте там комментарии об ошибках, т.к. там

Maxim Kozlov 40 Sep 30, 2023
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 4 Dec 20, 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 Dec 31, 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 649 Dec 28, 2022
Highly customizable finder with high performance. Written in Rust and uses GTK

Findex Highly customizable finder with high performance. Written in Rust and uses GTK Installation Automatic Binary Clone from https://aur.archlinux.o

MD Gaziur Rahman Noor 442 Jan 1, 2023