-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
swaybar: disallow left and right position and print error on default #2879
Conversation
@ianyfan We could also exit instead of defaulting to bottom, I decided to keep the existing behaviour here. What is your opinion on that? |
7782563
to
57bd457
Compare
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 check should really occur in commands/bar/position.c
, and default to bottom on error. Then, there should be no chance of swaybar starting with an invalid position. So really, the else block shouldn't be needed, but for sanity, you could keep this. But use wlr_log
instead of fprintf
.
I think both should be removed. I'll add the |
It's also available in clients. But it makes clients link with wlroots, which is not great. |
Swaybar does currently not link against wlroots, so i'd like to avoid that dependency. |
dd810e8
to
d434d0e
Compare
I removed the allowed positions from sways command. The command already returns an error for invalid positions, so imo no change is needed there. Should be ready for review. |
I don't know where you're getting your information from. It's linked in |
d434d0e
to
a4c70a5
Compare
I did I replaced the |
The positions "left" and "right" are not allowed by the man page, remove them from the allowed positions. Also print an error to stderr if we default to the bottom position. Fixes swaywm#2878
"left" and "right" are not allowed positions for swaybar, remove them.
a4c70a5
to
17fb3b6
Compare
Thanks! |
The positions "left" and "right" are not allowed by the man page, remove them
from the allowed positions. Also print an error to stderr if we default to the
bottom position.
Fixes #2878