Added option to draw straight lines, without arrow head#193
Added option to draw straight lines, without arrow head#193mallo-m wants to merge 1 commit intojtheoof:masterfrom
Conversation
|
Thanks. Closely relates to #165. Can you update the README and man file please ? |
|
Also please make only one commit that respects conventional commit convention |
There was a problem hiding this comment.
Can you update the README and man file please ?
539e43a to
7f9aabe
Compare
|
All done |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
| - `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 |
There was a problem hiding this comment.
| - *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; |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
If you want it removed from this PR I'm 100% OK with it, just say and I'll remove it from the commit.
There was a problem hiding this comment.
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
|
Up :) |
|
Thanks @mallo-m I will take a look in the next few days |
|
Up n°2 :) |
l: switch to Straight Lines modeButton 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.