https://github.com/epilys/rlr
interactive pixel screen ruler and protractor
https://github.com/epilys/rlr
design graphic-design gtk ruler rust rust-gtk screen-ruler
Last synced: 30 days ago
JSON representation
interactive pixel screen ruler and protractor
- Host: GitHub
- URL: https://github.com/epilys/rlr
- Owner: epilys
- License: gpl-3.0
- Created: 2021-12-12T09:03:40.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-12-01T16:01:32.000Z (5 months ago)
- Last Synced: 2025-03-29T13:08:55.438Z (about 1 month ago)
- Topics: design, graphic-design, gtk, ruler, rust, rust-gtk, screen-ruler
- Language: Rust
- Homepage: https://crates.io/crates/rlr-gtk
- Size: 3.27 MB
- Stars: 63
- Watchers: 3
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# `rlr`: a pixel screen ruler
 [](https://github.com/epilys/rlr/blob/master/LICENSE) [](https://crates.io/crates/rlr-gtk)

Rust + GTK interactive pixel screen ruler with protractor mode.
```shell
cargo install rlr-gtk
```Alternatively, a flatpak manifest file is included so that you can build and install as a flatpak bundle.
## Demo



## Use
To use application settings, the app's settings schema but be installed in your system.
It is possible to attempt to do this automatically via the Settings menu, which will install the schema to `${HOME}/.local/share/glib-2.0/schemas/` and subsequently attempt to compile it; but the directory must exist beforehand, it won't be created.`rlr` includes a command-line argument `--install-gsettings-schema` that creates the settings schema at the given directory.
If directory is `-`, it will be printed to standard output instead.*Note*: The directory values should probably be one of: `${HOME}/.local/share/glib-2.0/schemas/`, `/usr/share/glib-2.0/schemas/` or similar.
For the settings schema to be discoverable, it must be compiled with `glib-compile-schemas`.
An example usage:
```shell
rlr --install-gsettings-schema "${HOME}/.local/share/glib-2.0/schemas/"
```and then:
```shell
glib-compile-schemas "${HOME}/.local/share/glib-2.0/schemas/"
```### Shortcuts
If you are on macOS, use ⌘ (Command) key instead of Ctrl.
- **Quit** with q or Ctrl + Q.
- Click to **drag**.
- Press ? or F1 to **open the About and Help window**.
- Press s or F2 to **open the Settings window**.
- Press r to **rotate** 90 degrees. Press Shift + r to **flip (mirror)** the marks without rotation.
- Press p to toggle **protractor mode**.
- Press f or Space to toggle **freezing the measurements**.
- Press Ctrl and drag the angle base side to **rotate it while in protractor mode**.
- Press Ctrl continuously to **disable precision** (measurements will snap to nearest integer).
- Press + to **increase size**. Press - to **decrease size**.
- Press Ctrl + +, Ctrl + + to **increase font size**. Press Ctrl + -, Ctrl + - to **decrease font size**.
- Press Up, Down, Left, Right to **move window position by 10 pixels**. Also hold down Ctrl to **move by 1 pixel**.## Build
```shell
cargo build --release
```Build as flatpak and install:
```shell
flatpak-builder --install repo com.github.epilys.rlr.json --force-clean --user -y
```Afterwards you can run from your desktop's application menu (under category "Graphics") or from the terminal with:
```shell
flatpak run com.github.epilys.rlr
```## Packaging
To help packagers in OSes that support the XDG Desktop standards, a `.desktop`
app launcher filer, an application icon and a symbolic application icon are
included.- `data/com.github.epilys.rlr.desktop` should be installed in any of the following:
`/usr/share/applications/`, `/usr/local/share/applications/` or
`$HOME/.local/share/applications/`.
- `data/com.github.epilys.rlr.svg` should be installed in
`/usr/share/icons/hicolor/scalable/apps/com.github.epilys.rlr.svg`.
- `data/com.github.epilys.rlr.symbolic.svg` should be installed in
`/usr/share/icons/hicolor/symbolic/apps/com.github.epilys.rlr.svg`.The files have been contributed by .