jtheoof / swappy

A Wayland native snapshot editing tool, inspired by Snappy on macOS
MIT License
1k stars 40 forks source link

Add a custom_color config option #135

Open DriesOlbrechts opened 1 year ago

DriesOlbrechts commented 1 year ago

This PR adds a config option to set the default color for the custom color option. This way, if you often use the same color, you can set it as a config option.

It uses the gdk function gdk_rgba_parse which supports hex, rgb(),rgba() aswell as a standard name.

Docs:

The string can be either one of: - A standard name (Taken from the X11 rgb.txt file). - A hexadecimal value in the form “#rgb”, “#rrggbb”, “#rrrgggbbb” or ”#rrrrggggbbbb” - A RGB color in the form “rgb(r,g,b)” (In this case the color will have full opacity) - A RGBA color in the form “rgba(r,g,b,a)”

As for the changes in application.c. I was not sure where I should put the code to initialize this color. If you can tell me where it should go I will change it.

voronind-com commented 4 days ago

Bump @jtheoof