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

How to enable transparent background? #83

Open
ghost opened this issue Sep 10, 2020 · 1 comment
Open

How to enable transparent background? #83

ghost opened this issue Sep 10, 2020 · 1 comment

Comments

@ghost
Copy link

ghost commented Sep 10, 2020

I try to add this to .bmonrc

layout colors {
    color default {
       color_pair  = {"white", "default"}
    }
    color statusbar {
        color_pair = {"blue", "default", "reverse"}
    }
    color header {
        color_pair = {"yellow", "default"}
    }
    color list {
        color_pair = {"white", "default"}
    }
    color selected {
        color_pair = {"white", "default", "reverse"}
    }
    color RX_graph {
        color_pair = {"green", "default"}
    }
    color TX_graph {
        color_pair = {"red", "default"}
    }
}

but i got this error when run bmon:

Unknown color [bg]: default

When I run bmon -ocurses:nocolors I got the transparent background but other text color is white.

If I modify layout.h here: https://github.com/tgraf/bmon/blob/master/include/bmon/layout.h#L126 to make bg_code = -1, I get the transparent. Not sure why there is a check to prevent bg_code = -1 at line 97.

@ghost ghost changed the title How to enable transparent back ground? How to enable transparent background? Sep 10, 2020
@akblakney
Copy link

I still have this issue. The fix is not to remove the check for bg_code = -1 though. That is there to ensure that a valid color was entered. The problem is that if you look at the valid colors, in parse_color on line 11 of the link you sent, "defualt" is not a valid color, despite the man pages saying that it should be. There seems to be a discrepancy between the man page that allows for "default" as the transparent/background color and the layout.h which does not.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant