Skip to content
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

Criteria #43

Merged
merged 37 commits into from
Jun 13, 2018
Merged
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
1fe0e3b
Add criteria
vilhalmer May 20, 2018
ab93887
First pass at criteria string parser
vilhalmer Jun 9, 2018
7182f0e
Add missing mako_style_spec.ignore_timeout
vilhalmer Jun 10, 2018
5a59247
create_criteria takes a config instead of state
vilhalmer Jun 10, 2018
2f8c982
apply_criteria_field consumes the token
vilhalmer Jun 10, 2018
723593d
criteria are stored in a list on mako_config
vilhalmer Jun 10, 2018
1df70a5
Split apply_style_option from apply_config_option
vilhalmer Jun 10, 2018
a3a93b4
Clean up criteria when destroying config
vilhalmer Jun 10, 2018
6834e42
Apply style from matched criteria to notifications
vilhalmer Jun 10, 2018
028c6f6
hidden_format -> hidden_style
vilhalmer Jun 10, 2018
585479a
Use notification's style in render
vilhalmer Jun 10, 2018
53e7bb1
Use global criteria when sending capabilities
vilhalmer Jun 10, 2018
abfa95c
Use global criteria to set surface size
vilhalmer Jun 10, 2018
5f2e541
Only try to look at the section if it exists
vilhalmer Jun 10, 2018
5a0fa33
Only try config options if it wasn't a valid style
vilhalmer Jun 10, 2018
5ea01cd
Actually init the default style
vilhalmer Jun 10, 2018
b04b73e
Apply the final criteria field after loop exits
vilhalmer Jun 10, 2018
97a7d71
Properly calculate inner margin again
vilhalmer Jun 10, 2018
e6e0765
Print error for invalid criteria
vilhalmer Jun 10, 2018
29fc3c6
Don't make a criteria for hidden
vilhalmer Jun 10, 2018
bbe53be
Fix reporting of criteria parsing success
vilhalmer Jun 10, 2018
22878fc
Finish up error message TODOs in criteria
vilhalmer Jun 10, 2018
db75066
hidden TODO is already done
vilhalmer Jun 10, 2018
f71b620
Saving this for a future PR
vilhalmer Jun 10, 2018
d676406
This happens automatically, though could be nicer
vilhalmer Jun 10, 2018
8a13aad
Missed converting padding
vilhalmer Jun 10, 2018
8486d19
Fix up hidden_style correctly
vilhalmer Jun 10, 2018
36ef70c
Plug a few leaks
vilhalmer Jun 10, 2018
6119476
Fix double-free in hidden_style when reloading
vilhalmer Jun 11, 2018
fa7f9f8
Don't try to parse empty criteria field
vilhalmer Jun 11, 2018
ae22b95
Squish up all those elses
vilhalmer Jun 12, 2018
0840c93
Combine unnecessary case
vilhalmer Jun 12, 2018
fa26e3b
token_location is a size_t
vilhalmer Jun 12, 2018
172cb7d
apply_each_criteria returns ssize_t
vilhalmer Jun 12, 2018
93264c8
Flip order of arguments to apply_style
vilhalmer Jun 12, 2018
9c7fe47
Update man page
vilhalmer Jun 12, 2018
9d89ba2
Add hidden back to man page
vilhalmer Jun 13, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Saving this for a future PR
vilhalmer committed Jun 10, 2018
commit f71b620cd9b57952f6eb10925f6ee005542dce06
2 changes: 0 additions & 2 deletions config.c
Original file line number Diff line number Diff line change
@@ -313,7 +313,6 @@ static bool apply_style_option(struct mako_style *style, const char *name,
} else if (strcmp(name, "border-color") == 0) {
return spec->colors.border = parse_color(value, &style->colors.border);
} else if (strcmp(name, "markup") == 0) {
// TODO: Move parse_boolean somewhere accessible.
style->markup = strcmp(value, "1") == 0;
return spec->markup = style->markup || strcmp(value, "0") == 0;
} else if (strcmp(name, "format") == 0) {
@@ -323,7 +322,6 @@ static bool apply_style_option(struct mako_style *style, const char *name,
return spec->default_timeout =
parse_int(value, &style->default_timeout);
} else if (strcmp(name, "ignore-timeout") == 0) {
// TODO
style->ignore_timeout = strcmp(value, "1") == 0;
return spec->ignore_timeout = (
style->ignore_timeout || strcmp(value, "0") == 0);