• 2019.01.16.1 e1139041c3

    FUNCADELIC Stable

    budRich released this 2019-01-16 15:59:29 +00:00 | 4 commits to master since this release

    Major refactoring to make use of the bashbud framework.

    color functions

    Added some color manipulation functions that can be used both in themes and templates and the commandline:

    MONDO_DIR/themes/muh-theme

    bg          #FFFFFF
    fg          #000000
    red         #FF0000
    
    comment     %%mix bg fg 0.6%%
    darkred     %%darker red 0.465%%
    bg2         %%less bg 0.33%%
    green       %%more #00FF00 0.3%%
    

    less and more works like this:
    First mondo determines whether target color is dark or light.
    If the color is light and the command is more,
    the result will be more light
    (same results as if the command was lighter).
    If the color is dark and the command is more,
    the result will be more dark
    (same results as if the command was darker).

    It is also possible to use the functions on the commandline:
    mondo --call|-c FUNCTION [THEME]

    $ mondo --call "mix #FFFFFF #000000 0.6"
    #666666
    

    If the last argument is the name of an existing theme,
    the variables of that theme will be available:

    $ mondo --call "mix #FFFFFF darkred 0.123" muh-theme
    #F0DFDF
    

    colorformat

    A new setting is now available in template-setting files: colorformat.
    If set, all expanded variables in affected template will have that format.

    MONDO_DIR/generator/muh-generator/_mondo-settings

    # uncomment the colorformat below to use HEX (00-FF)
    # This is how fully opaque "white" would look like
    # with this format: #FFFFFFFF
    # colorformat="#%R%G%B%A"
    
    # uncomment the colorformat below to use RGB (0-255)
    # This is how fully opaque "white" would look like
    # with this format: 255,255,255,255
    # colorformat="%r,%g,%b,%a"
    

    fixes

    Various small bugfixes, f.i. to use the Inject template setting, it's value
    must be either True or true .

    When using the --list command, variables with values containing whitespace, now gets printed properly.

    Downloads