GithubHelp home page GithubHelp logo

epilys / rlr Goto Github PK

View Code? Open in Web Editor NEW
56.0 3.0 2.0 3.25 MB

interactive pixel screen ruler and protractor

Home Page: https://crates.io/crates/rlr-gtk

License: GNU General Public License v3.0

Rust 99.42% Shell 0.58%
rust gtk screen-ruler ruler design graphic-design rust-gtk

rlr's Introduction

rlr: a pixel screen ruler

./rlr.png

Rust + GTK interactive pixel screen ruler with protractor mode.

demo

./demo.png

./demo.gif

./demo_move.gif

use

  • Quit with q or Ctrl-Q.
  • Click to drag.
  • 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 Control_L and drag the angle base side to rotate it in protractor mode.
  • Press Control_L continuously to disable precision (measurements will snap to nearest integer).
  • Press + to increase size.
  • Press - to decrease size.
  • Press Up, Down, Left, Right to move window position by 10 pixels. Also hold down Control_L to move by 1 pixel.

build

cargo build --release

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.

  • rlr.desktop should be installed in any of the following: /usr/share/applications/, /usr/local/share/applications/ or $HOME/.local/share/applications/.
  • rlr.svg should be installed in /usr/share/icons/hicolor/scalable/apps/rlr.svg.
  • rlr.symbolic.svg should be installed in /usr/share/icons/hicolor/symbolic/apps/rlr.svg.

The files have been contributed by https://github.com/somepaulo.

rlr's People

Contributors

epilys 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

Watchers

 avatar  avatar  avatar

rlr's Issues

[Feature request] add option to change ruler colour

It's often visually difficult working with the white ruler when developing white backgrounded websites (which most of them are these days). I find it that the dark yellow used by KRuler works best for most circumstances. ScreenRuler allows to customize colours and fonts, which is an excellent option to have.
Any chance you could implement this in some way? Maybe a simple text config file, if not a GUI settings panel?

Arrows not working on Wayland

In my case (Arch/Gnome latest) the arrow keys don't move the ruler (with or without Ctrl).
All other shortcuts seem to work.

Question: about developing rlr

Hey! While looking around for an on-screen ruler, I found nothing suitable for my system. A quick GitHub search brought me here. I was very curious to see how GTK was used and I have to say this may be some of the cleanest Rust-GTK code I've seen. I really want to ask: how did you figure out what to use, and how everything was used together? Are you very familiar with GTK?

Thank you for a great tool :) I've going to use it for making sure UI components are aligned

Disable system beep

Every time I move the cursor onto the ruler I get a system beep. Is there any way to disable that?

App launcher & icon missing

Please consider adding a .desktop launcher file.
Here's an example referencing an icon named rlr. (but kruler or screenruler can be used instead as they're available in many icon themes):

GenericName=Screen Ruler
GenericName[af]=Skerm Liniaal
GenericName[ar]=مسطرة الشاشة
GenericName[bg]=Линийка за екрана
GenericName[bs]=Ekranski lenjir
GenericName[ca]=Regle de la pantalla
GenericName[ca@valencia]=Regle de la pantalla
GenericName[cs]=Obrazovkové pravítko
GenericName[cy]=Mesurydd Sgrîn
GenericName[da]=Skærmlineal
GenericName[de]=Bildschirmlineal
GenericName[el]=Κανόνας οθόνης
GenericName[en_GB]=Screen Ruler
GenericName[eo]=Ekrana liniilo
GenericName[es]=Regla para la pantalla
GenericName[et]=Ekraani joonlaud
GenericName[eu]=Pantailaren erregela
GenericName[fa]=خط‌کش پرده
GenericName[fi]=Näyttöviivain
GenericName[fr]=Règle d'écran
GenericName[ga]=Rialóir Scáileáin
GenericName[gl]=Regra de pantalla
GenericName[he]=סרגל מסך
GenericName[hi]=स्क्रीन मापनी
GenericName[hne]=स्क्रीन मापनी
GenericName[hr]=Ravnalo
GenericName[hu]=Képernyővonalzó
GenericName[ia]=Regula de schermo
GenericName[id]=Penggaris Layar
GenericName[is]=Reglustika
GenericName[it]=Righello per lo schermo
GenericName[ja]=スクリーンルーラー
GenericName[kk]=Экран өлшегіші
GenericName[km]=បន្ទាត់​អេក្រង់
GenericName[ko]=화면 
GenericName[ku]=Rastekê Dîmenderê
GenericName[lt]=Ekrano liniuotė
GenericName[lv]=Ekrāna mērlenta
GenericName[mr]=स्क्रीन मोजपट्टी
GenericName[ms]=Pembaris Skrin
GenericName[nb]=Skjermlinjal
GenericName[nds]=Schirmlineaal
GenericName[ne]=पर्दा रूलर
GenericName[nl]=Schermliniaal
GenericName[nn]=Skjermlinjal
GenericName[pa]=ਸਕਰੀਨ ਰੀਡਰ
GenericName[pl]=Linijka ekranowa
GenericName[pt]=Régua do Ecrã
GenericName[pt_BR]=Régua de tela
GenericName[ro]=Riglă de ecran
GenericName[ru]=Экранная линейка
GenericName[se]=Šearpmalinjála
GenericName[si]=තිරයේ කෝදුව
GenericName[sk]=Pravítko obrazovky
GenericName[sl]=Zaslonsko ravnilo
GenericName[sr]=Екрански лењир
GenericName[sr@ijekavian]=Екрански лењир
GenericName[sr@ijekavianlatin]=Ekranski lenjir
GenericName[sr@latin]=Ekranski lenjir
GenericName[sv]=Skärmlinjal
GenericName[ta]=திரை உருளை
GenericName[tg]=Ҷадвали экрании
GenericName[th]=ไม้บรรทัดบนหน้าจอ
GenericName[tr]=Ekran Cetveli
GenericName[ug]=ئېكران باشقۇرغۇ
GenericName[uk]=Лінійка екрана
GenericName[uz]=Ekran lineykasi
GenericName[uz@cyrillic]=Экран линейкаси
GenericName[vi]=Thước đo màn hình
GenericName[xh]=Screen Ruler
GenericName[x-test]=xxScreen Rulerxx
GenericName[zh_CN]=屏幕标尺工具
GenericName[zh_HK]=螢幕尺規
GenericName[zh_TW]=螢幕尺規
Name=rlr
Exec=rlr
Type=Application
Icon=rlr
Terminal=false
StartupWMClass=rlr
StartupNotify=true
Categories=Gnome;GTK;Graphics;Utilities;

[Feature request] different units

Here are some useful units:

  • Percent, ruler should be 100% length. Maybe a way to freeze percent and to extend the ruler beyond 100%
  • Inch/cm. Requires reading out monitor dpi. Very useful when using LaTeX and having to position stuff on a pdf.

Two small icon issues

The .png icon you're using on the main page has a white background, which looks weird on GitHub in night mode.

The name of the symbolic icon should have a dash instead of a dot after rlr like so: rlr-symbolic.svg.

Screenshot from 2022-10-07 16-46-55

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.