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

feat(#11): custom border width for when smart gaps hides gaps #12

Merged
merged 16 commits into from
May 28, 2024

Conversation

senkowo
Copy link
Contributor

@senkowo senkowo commented May 25, 2024

issue #11

I've added a new cli argument --border-width-smart-gaps and did everything except generating the readme and man page using make doc (Running make doc results in lots of missing text in the readme, which I think is an issue with markdown-toc on my end and the hacky way I had to install it in...).

The new cli argument sets the border width for when smart gaps hides the gaps for all layouts except monocle, and has no effect if --no-smart-gaps.

Let me know what you think!

TODO:

  • make test pass all
  • generate readme and man doc

Extras: results from checks, probably negligible, haven't resolved:

  • Running make iwyu returned
src/cmd.c should remove these lines:
- #include <stddef.h>  // lines 2-2
  • and make cppcheck returned 21 unused function errors that look pretty similar to
pro/river-status-unstable-v1.h:416:0: style: The function 'zriver_seat_status_v1_get_version' is never used. [unusedFunction]
zriver_seat_status_v1_get_version(struct zriver_seat_status_v1 *zriver_seat_status_v1)
  • make test now passes all tests

@alex-courtis
Copy link
Owner

This is great - using a number instead of a boolean is far more flexible!

I'll review tomorrow and sort out the small nits; the readme/man building is fragile and needs a better solution.

@alex-courtis
Copy link
Owner

Works beautifully, can't break it, valgrind OK.

Would you mind if we moved this new param down, underneath monocle?

  --(no-)smart-gaps
  --inner-gaps                    pixels                                0           0 <= gap size
  --outer-gaps                    pixels                                0           0 <= gap size

  --border-width                  pixels                                2           0 <= width
  --border-width-monocle          pixels                                0           0 <= width
  --border-width-smart-gaps       pixels                                0           0 <= gap width

We could also add a note to perhaps the ## GAPS section, something like:

"For a seamless experience, set this to the same value as --border-width-monocle."

@alex-courtis
Copy link
Owner

and make cppcheck returned 21 unused function errors that look pretty similar to

Working fine on CI and my machine, don't stress, cppcheck can behave oddly in different environments.

@senkowo
Copy link
Contributor Author

senkowo commented May 27, 2024

Works beautifully, can't break it, valgrind OK.

Would you mind if we moved this new param down, underneath monocle?

  --(no-)smart-gaps
  --inner-gaps                    pixels                                0           0 <= gap size
  --outer-gaps                    pixels                                0           0 <= gap size

  --border-width                  pixels                                2           0 <= width
  --border-width-monocle          pixels                                0           0 <= width
  --border-width-smart-gaps       pixels                                0           0 <= gap width

We could also add a note to perhaps the ## GAPS section, something like:

"For a seamless experience, set this to the same value as --border-width-monocle."

Both sound good to me!

@alex-courtis alex-courtis merged commit a3a7f0c into alex-courtis:master May 28, 2024
1 check passed
@alex-courtis
Copy link
Owner

Many thanks for your contribution! I'm using this right now...

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.

None yet

2 participants