-
Notifications
You must be signed in to change notification settings - Fork 599
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[RFC] Implement wibox.widget.template for the awful.widget.layoutbox #3521
Draft
Aire-One
wants to merge
24
commits into
awesomeWM:master
Choose a base branch
from
Aire-One:feature/widget_template/layoutbox
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
[RFC] Implement wibox.widget.template for the awful.widget.layoutbox #3521
Aire-One
wants to merge
24
commits into
awesomeWM:master
from
Aire-One:feature/widget_template/layoutbox
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is a needed property from the awesome global object to allow unit tests to be checked now that widget.base implements different features based on the current API level.
Suggested by @sclu1034
Suggested by @sclu1034
Suggested by @sclu1034
Suggested by @sclu1034
The previous implementation for these methods was a naive attempt at making the base widget working. We need to make sure computing the widget's sizes is more robust for complex widget_template definition.
The draw method exists only for widgets. When dealing with more complex widget, this method is not necessary implemented (i.e. with layouts). We need to check the method is defined by the child before calling it.
This is a small cleanup to not keep in memory a value we don't need. After the update_callback callback is called, we don't need to remember it happens this callback was queued before. (It also prevents a possible memory leak (of a boolean value) when widgets are destroyed)
Containers and layouts don't allow to build a widget from a callback, so there is no reason to have this feature here.
5 tasks
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello,
With my other PR (#3421) being ready for review, here is the implementation of the template widget for the
awful.widget.layoutbox
. This branch is based on the other PR, only the last commit (eba12a0) is relevant.With the current implementation, an end-user can use/copypast this code example in the
awesomerc.lua
to customize the layoutbox:I open this PR in draft mode, waiting for the other one to be merged. After the merge, I'll rebase this branch, and it'll be ready.