Gfret enerates an svg image template of a stringed instrument fretboard.
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Go to file
Nathan Fisher 470a622655 Update deps, remove mistakenly committed file 7 days ago
.cargo Save preferences in background thread 1 year ago
.github Create FUNDING.yml 1 year ago
data Added to release notes 9 months ago
po Prepare Rust spources for translation and add .pot template 7 months ago
src Update deps; Fix warnings about deprecated interface (StyleContext) 1 week ago
xtask Make sure xtask creates directories with 0755 permissions 3 months ago
.gitignore Add custom error type 12 months ago
Cargo.lock Update deps, remove mistakenly committed file 7 days ago
Cargo.toml Update deps; Fix warnings about deprecated interface (StyleContext) 1 week ago Moved actions into module; 12 months ago
LICENSE Initial commit of working code 3 years ago Fix typos 7 months ago Update README with instructions for compiling gschemas when building 10 months ago
deny.toml Formatted, fixed `deny.toml` 7 months ago




Gfret renders an svg image template of a fretboard for a stringed instrument. It has a Gtk interface as well as a command line interface and can produce templates for instruments ranging from a piccolo mandolin to an upright bass. Multiscale designs are also supported. Currently, all measurements are expressed in metric units only.

Getting Gfret

Gfret is distributed primarily in source form. The main repo is at with mirrors at gitlab and Releases are recommended.


Gfret can be used from the command line or using the Gtk+ interface.

Running the command line interface


Output an svg without running the interface

   gfret cli [OPTIONS] [OUTPUT]

   <OUTPUT>    Name of the output file [default: output.svg]

   -b, --bridge <BRIDGE>
           Bridge spacing [default: 56]

   -c, --count <COUNT>
           Total fret count [default: 24]

   -e, --external <EXTERN>
           Open output file in external program [default: inkscape]

   -h, --help
           Print help information

   -l, --left
           Multiscale fretboard reversed (left handed)

   -m, --multi <MULTI>
           Creates a multiscale fretboard with <MULTI> as the treble scale. [default: 610]

   -n, --nut <NUT>
           Nut width [default: 43]

   -o, --output <OUTPUT>
           Name of the output file [default: output.svg]

   -p, --perpendicular <PERPENDICULAR>
           Set which fret is perpendicular to the centerline [default: 8]
   -s, --scale <SCALE>
           Scale length in mm [default: 648]

Running the gui

Calling the program by invoking gfret without any arguments will run the Gtk interface. Additionally, a .desktop file and icon are included and will be installed if the program is installed using the included Makefile, and can be used for launching the program from desktop menus or creating shortcuts.


Note: See for information on changing keybindings

Key Action
Ctrl/S save file
Ctrl/Shift/S save file as
Ctrl/E open with an external program
Ctrl/O load a template from file
Ctrl/Shift/P open the preferences dialog
Ctrl/A open the about dialog
Ctrl/Q quit the program


You will need a Rust toolchain installed, including cargo. Gtk+4x is also required.

cargo build --release

If desired, a release distribution can then be generated which will include the binary, svg and png icons, Unix man pages, XDG .desktop file, gschema.xml and shell completions.

cargo xtask dist

To install, copy the contents of target/dist to the appropriate prefix and compile the gschemas.

cp -Rv target/dist/* /usr/local
glib-compile-schemas /usr/local/share/glib-2.0/gschemas/


  • For the gui, it would be nice to save state and allow loading specs from and saving to templates. partial implementation 4/7/21 | completed 5/5/21
  • Port to Gtk4 completed 12/21
  • Support changing from metric to imperial measurements completed 12/21
  • Support left handed multiscale fretboards completed 12/21
  • Orient left handed output with bass strings on top completed 1/22


  • Subclass application window from AdwApplicationWindow
  • Subclass GfretApplication from AdwApplication
  • Create a gio::Settings object and store application state in it
  • Move Config into GfretApplication
  • Provide theme switcher
  • Subclass preferences window from AdwPreferencesWindow
  • Make a property action and menu entry for Units
  • Add AdwToastOverlay and set toast when a file is saved
  • Replace gfret::File type for glib::File
  • Make a changed boolean property of GfretWindow to track saved state
  • Create all dialogs as needed instead of persisting for the program lifespan
  • Replace templates with the ability to re-open svg files created by this application
  • Prepare for FlatPak packaging and distribution