Giter VIP home page Giter VIP logo

inkscape-manager's Introduction

Inkscape Manager

Attempts to create an overlay for inkscape that allows quickly applying commonly used styles.

In this example, ab sets a colour (fill) to black, av sets it to white. s alone creates a stroke style, but it can be paired with a colour (sb) to create a black stroke.

Example.mp4

Dependencies

Clipboard management to apply styles uses xclip.

Written for X11 and only tested using one window manager: i3. A rewrite for Wayland might happen eventually.

Keybinds

A style consists of a list of property:value pairs. If a property or value is missing in a style, pressing that key will wait for another key before doing anything.

In this example, stroke is missing a value. Pressing s alone would do nothing until it was paired with b. It would then create stroke:#ffffff.

- key: s
  style: stroke;stroke-width:2.6;
- key: b
  style: :#ffffff

Creating your own

If you want to change default values, modify config.yaml.

Keybinds are either styles or rebinds. Rebinds are really straightforward, but styles require you to know what SVG styles look like.

The examples/ folder contains some examples. You might find useful to either use the XML inspector in inkscape or save an image as .svg, then find the section that says styles: to create exactly what you need.

keybinds:
- key: a
  style: fill
- key: d # Solid line
  style: stroke;stroke-dasharray:none;-inkscape-stroke:none
- key: s # Stroked line
  style: stroke;stroke-dasharray:22.67720315,3.77952756;stroke-opacity:1;
- key: v # Paint white
  style: :#ffffff
- key: b # Paint black
  style: :#000000
- key: c # Removes fill, for example.
  style: :none
- key: g # Add an arrow header. #ConcaveTriangle is hardcoded in the styler.
  style: marker-end:url(#ConcaveTriangle);

# Rebinds
- key: w
  rebind_to: e
- key: e
  rebind_to: w

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.