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 padding to strength bars #144

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

lazyprop
Copy link

Pad strength bars with spaces to the left.

@firecat53
Copy link
Owner

This throws a TypeError when wifi_chars is unset.

@firecat53
Copy link
Owner

After looking at this some more, I don't understand why we need to do this when you can just add spaces to the format string?

@lazyprop
Copy link
Author

After looking at this some more, I don't understand why we need to do this when you can just add spaces to the format string?

is there a way to add padding spaces dynamically depending on the length of the string, using format strings? i did this because in dmenu vertical mode, the indentation at which each Wi-Fi name starts varies based on the signal strength, which in my opinion looks bad.

i would understand if you think this is unnecessary and close the PR. on the other hand, if you think it would be useful to have proper tabular formatting in the output, perhaps enabled by an option, let me know. i intend to modify my own installation to do the same, and would be happy to push changes upstream.

This throws a TypeError when wifi_chars is unset.

Apologies, I'll add some typechecking in case you want to go ahead with this PR.

@firecat53
Copy link
Owner

Would you be able to attach screenshots of what you're describing (before and after the patch)? I'm having a hard time visualizing what you describe, sorry!

@lazyprop
Copy link
Author

image
image

After and before adding padding. Note how the networks with different signal strengths have their names misaligned.

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