Skip to content

Conversation

@mallo-m
Copy link

@mallo-m mallo-m commented Jan 10, 2025

l: switch to Straight Lines mode
Button has been added to visually enable this mode with the mouse.

Allows to draw straight lines without the pointy end of the arrows. Arrow mode left untouched.

new-swappy

@jtheoof
Copy link
Owner

jtheoof commented Aug 19, 2025

Thanks. Closely relates to #165.

Can you update the README and man file please ?

@jtheoof
Copy link
Owner

jtheoof commented Aug 19, 2025

Also please make only one commit that respects conventional commit convention

@jtheoof jtheoof self-requested a review August 19, 2025 00:34
Copy link
Owner

@jtheoof jtheoof left a comment

Choose a reason for hiding this comment

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

Can you update the README and man file please ?

@jtheoof jtheoof self-assigned this Aug 19, 2025
@mallo-m mallo-m force-pushed the master branch 2 times, most recently from 539e43a to 7f9aabe Compare August 21, 2025 22:33
@mallo-m
Copy link
Author

mallo-m commented Aug 21, 2025

All done

@mallo-m mallo-m requested a review from jtheoof August 21, 2025 22:36
Copy link
Owner

@jtheoof jtheoof left a comment

Choose a reason for hiding this comment

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

some typos and concerns about the exit code rework

README.md Outdated
- `r`: Switch to Rectangle
- `o`: Switch to Ellipse
- `a`: Switch to Arrow
- `l`: Switch to Arrow
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
- `l`: Switch to Arrow
- `l`: Switch to Line

swappy.1.scd Outdated
- *r*: Switch to Rectangle
- *o*: Switch to Ellipse
- *a*: Switch to Arrow
- *l*: Switch to Arrow
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
- *l*: Switch to Arrow
- *l*: Switch to Line

src/main.c Outdated
state.argc = argc;
state.argv = argv;
state.mode = SWAPPY_PAINT_MODE_BRUSH;
state.exit_code = 0;
Copy link
Owner

Choose a reason for hiding this comment

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

The exit code update here should be part of a different commit. It has nothing to do with adding line tool.

But I'm having trouble to understand why it's needed. Why a different exit code for Q press? Is it standard within linux apps ?

Copy link
Author

Choose a reason for hiding this comment

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

Actually you're right, it can 100% be part of another commit.
However I still feel like it's needed, because it's always better to know how/why the app has exited.

Say you are using the output of swappy in a script or a piped command line. How would you know if the app has exited correctly, or that there is even data to process to begin with, if the exit code remains the same in all cases ?

Of course I'm open to a better suggestion, that's just the solution I came up with :)

Copy link
Author

Choose a reason for hiding this comment

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

If you want it removed from this PR I'm 100% OK with it, just say and I'll remove it from the commit.

Copy link
Owner

Choose a reason for hiding this comment

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

I would prefer to have a separate MR just for that so spin the discussion there. Can you point to other open source projects that do that? my understanding was that Linux consider non-0 exit code as errors

Copy link
Author

Choose a reason for hiding this comment

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

Got it ! PR fixed :)

This was referenced Aug 22, 2025
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.

2 participants