- 
                Notifications
    You must be signed in to change notification settings 
- Fork 49
Added option to draw straight lines, without arrow head #193
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
base: master
Are you sure you want to change the base?
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.
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 ?
539e43a    to
    7f9aabe      
    Compare
  
    | All done | 
There was a problem hiding this 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 | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - `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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - *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.
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 ?
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it ! PR fixed :)
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.