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

awful.widget.common: Use a template for the default template #2735

Merged
merged 1 commit into from
Apr 1, 2019

Conversation

psychon
Copy link
Member

@psychon psychon commented Mar 28, 2019

Instead of having the default template hardcoded as code, this turns the
template into a descriptive version. This makes it easier to come up
with own templates: Just copy the default template and make a slight
change to it.

No functional changes are intended, but I cannot rule out that I did no
mistakes.

Signed-off-by: Uli Schlachter psychon@znc.in


@Elv13 Can you check if I converted this correctly? Are there any downsides to this conversion that I do not know about?

Instead of having the default template hardcoded as code, this turns the
template into a descriptive version. This makes it easier to come up
with own templates: Just copy the default template and make a slight
change to it.

No functional changes are intended, but I cannot rule out that I did no
mistakes.

Signed-off-by: Uli Schlachter <psychon@znc.in>
@codecov
Copy link

codecov bot commented Mar 28, 2019

Codecov Report

Merging #2735 into master will decrease coverage by 0.02%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #2735      +/-   ##
==========================================
- Coverage   86.25%   86.23%   -0.03%     
==========================================
  Files         529      529              
  Lines       36447    36450       +3     
==========================================
- Hits        31439    31434       -5     
- Misses       5008     5016       +8
Flag Coverage Δ
#gcov 75.65% <ø> (-0.11%) ⬇️
#luacov 89.04% <100%> (ø) ⬆️
Impacted Files Coverage Δ
lib/awful/widget/common.lua 93.25% <100%> (+0.23%) ⬆️
spawn.c 82.79% <0%> (-3.73%) ⬇️

Copy link
Member

@Elv13 Elv13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Elv13 Can you check if I converted this correctly? Are there any downsides to this conversion that I do not know about?

The conversion looks good. The downside is mostly that #2726 is not being reviewed... Anyhow I would not have the time to fix all the review suggestions. #2726 uses a template for the tasklist and improve the template system to make the declaration more compact. #2508 improve all widgets to allow templates to be used directly everywhere. #2244 allows "creation time logic" to be part of the template (rather than lua expressions that are executed during the initial evaluation).

@mergify mergify bot merged commit c02ad71 into awesomeWM:master Apr 1, 2019
@psychon psychon deleted the common_default_template branch April 2, 2019 16:30
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.

3 participants