Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a custom_color config option #135

Merged
merged 1 commit into from
Oct 29, 2024
Merged

Conversation

DriesOlbrechts
Copy link
Contributor

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.

@jtheoof jtheoof force-pushed the master branch 2 times, most recently from 1c3eaa2 to 3083bb7 Compare November 20, 2022 21:48
@voronind-com
Copy link

voronind-com commented Sep 14, 2024

Bump @jtheoof

@jtheoof
Copy link
Owner

jtheoof commented Oct 26, 2024

A bit of late review ;) Please rebase and look at: /~https://github.com/jtheoof/swappy?tab=readme-ov-file#contributing

@DriesOlbrechts
Copy link
Contributor Author

@jtheoof No worries, still using the tool years later 😄

Rebased and changed my commit message!
Let me know what you think!

@jtheoof jtheoof merged commit 726159d into jtheoof:master Oct 29, 2024
3 checks passed
@jtheoof
Copy link
Owner

jtheoof commented Oct 29, 2024

Thanks for your contribution.

@@ -79,6 +80,7 @@ The following lines can be used as swappy's default:
- *early_exit* is used to make the application exit after saving the picture or copying it to the clipboard
- *fill_shape* is used to toggle shape filling (for the rectangle and ellipsis tools) on or off upon startup
- *auto_save* is used to toggle auto saving of final buffer to *save_dir* upon exit
- *custom_color* is used to set a default value for the custom color
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DriesOlbrechts do you think you could add a bit more to the man page? Kind of repeating what format is supported as you did in the description of the MR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants