Skip to content

A Linux image preview application with basic editing

Notifications You must be signed in to change notification settings

rabfulton/preditor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

preditor

preditor is a minimal GTK3 image previewer in plain C with lightweight editing tools. It keeps the UI out of the way: no toolbar, fast keyboard and mouse workflows, and a focused right-click menu. The most basic common image edits such as rotating and flipping are just a keypress away. Croping is a simple drag to select and enter to save the result.

Preditor screenshot

Highlights

  • Open images at 100% when they fit, otherwise fit-to-window
  • Navigate images in the same folder (Left/Right, p/n)
  • Zoom with wheel and keys (=, +, -, _, 0)
  • Crop with left-drag, move selection by dragging inside the box
  • Export (s, Enter, right-click export...) and overwrite (Ctrl+s)
  • Rotate (r), flip horizontal (h), flip vertical (v)
  • Copy image (Ctrl+c or menu) and copy sampled color from right-click point
  • Open current image in external editor (e), quit (q/Esc)
  • Persistent settings and editable keybinds

Install

Arch Linux / AUR

AUR package page: preditor

Using an AUR helper (example with yay):

yay -S preditor

Debian / Ubuntu (.deb)

Install a release artifact:

sudo apt install ./preditor_<version>_<arch>.deb

Fedora / RHEL / openSUSE (.rpm)

Install a release artifact:

sudo dnf install ./preditor-<version>-1.<arch>.rpm

Usage

If installed from AUR/.deb/.rpm:

preditor /path/to/image.png

Set as default image viewer (Linux)

Packages and make install already install preditor.desktop. Set it as default for common image MIME types:

xdg-mime default preditor.desktop image/png
xdg-mime default preditor.desktop image/jpeg
xdg-mime default preditor.desktop image/webp
xdg-mime default preditor.desktop image/gif
xdg-mime default preditor.desktop image/bmp
xdg-mime default preditor.desktop image/tiff

Verify:

xdg-mime query default image/png

Controls (Default)

Navigation and view

  • Left, p: previous image
  • Right, n: next image
  • =, +: zoom in
  • -, _: zoom out
  • 0: zoom 100%

Editing and save

  • Left-click drag: create crop region
  • Left-drag inside crop: move crop region
  • s, Enter: export (file chooser)
  • Ctrl+s: overwrite current file
  • r: rotate 90° clockwise
  • h: flip horizontally
  • v: flip vertically

Clipboard and app

  • Ctrl+c: copy image to clipboard
  • Right-click copy color: copy color at click point
  • e: open in editor and exit
  • q, Esc: quit

Settings

Open right-click settings.

Available settings:

  • Remember window position
  • Remember window size (implies fit behavior on startup)
  • Startup zoom mode (auto, fit, 100%)
  • External editor command
  • Color copy format (hex, rgb, rgba, or template with {r}, {g}, {b}, {a}, {hex})
  • Custom keybind editor

Settings are stored in:

~/.config/preditor/config.ini

Dependencies

Runtime:

  • gtk3
  • gdk-pixbuf2

Build:

  • gcc (or cc)
  • make
  • pkg-config

Build

make

Debug build:

make debug

Release build:

make release

License

MIT

Other Useful Projects

  • A browser and launcher for locally stored films and tv shows ReelVault
  • A lightweight speech to text implementation Auriscribe
  • A full featured AI application ChatGTK
  • A Markdown notes application for your system tray TrayMD
  • Try my AI panel plugin for XFCE XFCE Ask