Commit Graph

13 Commits

Author SHA1 Message Date
Ariadne Conill f88ba3a1dd parser: explicitly initialize key (kanshi_output_field) to 0
This warning is tripped by GCC 10.
2020-12-17 13:30:20 +01:00
Kenny Levinsen 9731ff9c79 Add 'include' directive to read additional configs 2020-10-13 14:42:03 +02:00
Simon Ser ef4c7f083d
Require profiles with a name to have a profile directive
Also make the syntax without a "profile" directive legacy by removing
docs for it.

Closes: https://github.com/emersion/kanshi/issues/75
2020-03-30 15:45:31 +02:00
Rikard Falkeborn dc9f4c8fc3 Fix parser_next_token return value
Returning a negative value in a function with bool as return value
is the same as returning true. Fix this by returning false to indicate
failure.
2020-02-22 21:24:07 +01:00
Bartosz Taczała c848893b23 Add support for comments in configuration file
Supported comments are:

    # here
    {
        # or here
        output eDP-1 mode 1920x1080 # or here
    }

Co-authored-by: Simon Ser <contact@emersion.fr>
2019-11-29 19:09:58 +01:00
Guillaume Maudoux 5a30abdf0b Add `exec` to execute commands when a configuration is matched 2019-09-20 12:59:04 +03:00
Guillaume Maudoux 15029bd28b Allow names to distinguish configurations 2019-09-20 12:59:04 +03:00
danieljampen d4a3c5ba15 convert refresh rate from Hz to mHz after parsing 2019-08-13 08:00:03 +02:00
Simon Ser ab89b56785 Parse quoted strings 2019-06-01 13:25:09 +03:00
Simon Ser 3de4464f23 Match profiles 2019-06-01 13:25:09 +03:00
Simon Ser 0ba4ad4951 Parse output values 2019-06-01 13:25:09 +03:00
Simon Ser 9d11810e44 Parse output keys 2019-06-01 13:25:09 +03:00
Simon Ser ddb8682b9e Add basic parser 2019-06-01 13:25:09 +03:00