wpgtk icon indicating copy to clipboard operation
wpgtk copied to clipboard

Custom Background Color

Open margaretjoanmiller opened this issue 2 years ago • 12 comments

I'd like to be able to set a custom background color for all themes generated by wpgtk like how pywal allows you to do with the -b flag. I tried setting "background-color" under keywords in the config file to my desired background color to no avail.

margaretjoanmiller avatar Mar 10 '22 07:03 margaretjoanmiller

use the user keywords feature to redefine color0, most wpgtk templates use color0 instead of the background

key value {color0} #customcolor

this should do the trick

-- Fernando Vásquez

On Thu, Mar 10, 2022 at 1:25 AM Mae @.***> wrote:

I'd like to be able to set a custom background color for all themes generated by wpgtk like how pywal allows you to do with the -b flag. I tried setting "background-color" under keywords in the config file to my desired background color to no avail.

— Reply to this email directly, view it on GitHub https://github.com/deviantfero/wpgtk/issues/257, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACVCGSMC2IUFO34QA5B74DTU7GPU5ANCNFSM5QLYI4TA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

deviantfero avatar Mar 11 '22 14:03 deviantfero

Perhaps I'm using the keywords feature wrong because that's still not working. Here is my ~/.config/wpg/wpg.conf

[settings]
set_wallpaper = true
gtk = true
active = 0
light_theme = false
editor = kitty -e vim
execute_cmd = false
command = urxvt -e echo hi
backend = colorz
alpha = 100
smart_sort = true
auto_adjust = true
reload = true
keywords = default
vte = true

[keywords]
color0 = #2D2D2D

Changing the last line in the config to {color0} = #2D2D2D also doesn't work.

margaretjoanmiller avatar Mar 12 '22 00:03 margaretjoanmiller

that is deprecated you should have a ~/.config/wpg/keywords.conf where you can add that

[default]
color0 = #202020

deviantfero avatar Mar 12 '22 00:03 deviantfero

That still doesn't work, even if I use:

[default]
{color0} = #2D2D2D

instead of

[default]
color0 = #2D2D2D

both don't work.

margaretjoanmiller avatar Mar 12 '22 00:03 margaretjoanmiller

what version of wpgtk are you using? wpg --version

deviantfero avatar Mar 12 '22 00:03 deviantfero

6.5.5

margaretjoanmiller avatar Mar 12 '22 00:03 margaretjoanmiller

well override both color0 and background doesn't affect even your terminal? remember to reapply the theme after that, and paste logs if possible

[default]
color0 = #2D2D2D
background = #2D2D2D

deviantfero avatar Mar 12 '22 00:03 deviantfero

Still no. Here are the logs for running wpg -nm

[i] image         Using image f05xueq6qwogypdu1n1f.jpg.
[i] colors        Generating a colorscheme.
[i] colors        Using colorz backend.
[i] colors        Generation complete.
[i] sequences     Set terminal colors.
[i] export        Exported all files.
[i] export        Exported all user files.
[e] color         icons - base file does not exist
[i] color         wrote: bspwm_colors
[e] color         /home/maeday/.config/wpg/templates/dunstrc - base file does not exist
[i] color         wrote: gtk3.0
[i] color         wrote: gtk2
[i] color         wrote: gtk3.20
[i] color         wrote: wpg.rasi
[i] reload        reloaded Breeze from settings.ini using xsettingsd

And here is the colorscheme generated with that wallpaper

{
    "wallpaper": "/home/maeday/.config/wpg/wallpapers/f05xueq6qwogypdu1n1f.jpg",
    "alpha": "100",
    "special": {
        "background": "#121422",
        "foreground": "#c3c4c7",
        "cursor": "#c3c4c7"
    },
    "colors": {
        "color0": "#121422",
        "color1": "#5b65ac",
        "color2": "#8365ab",
        "color3": "#a48ac0",
        "color4": "#a778a2",
        "color5": "#b3707d",
        "color6": "#c58f91",
        "color7": "#c3c4c7",
        "color8": "#4d4e59",
        "color9": "#5b65ac",
        "color10": "#8365ab",
        "color11": "#a48ac0",
        "color12": "#a778a2",
        "color13": "#b3707d",
        "color14": "#c58f91",
        "color15": "#c3c4c7"
    }
}

margaretjoanmiller avatar Mar 12 '22 00:03 margaretjoanmiller

could you please share the base file you wish to affect with this change, I think that might be the problem, what terminal are you using?

deviantfero avatar Mar 12 '22 10:03 deviantfero

I’m not sure I understand the question. I’d like this to apply to all templates (if I understand correctly .base files are templates) and I’m only using built in ones, no custom ones. I’m using konsole.

margaretjoanmiller avatar Mar 12 '22 19:03 margaretjoanmiller

https://github.com/dylanaraps/pywal/blob/master/pywal/templates/colors-konsole.colorscheme

this is what you're trying to override, so instead of overriding color0, override color0.rgb with a comma separated rgb value 42,42,42

so:

[default]
color0 = #2D2D2D
background = #2D2D2D
color0.rgb = 45,45,45
background.rgb = 45,45,45

deviantfero avatar Mar 12 '22 19:03 deviantfero

I thought the .json files in the schemes folder were supposed to apply to every .base file? Those .json files aren’t updating. I will try to add those two other lines to see if I can at least get the konsole scheme to change but it seems like since the .json files in ~/.config/wpg/schemes aren’t updating its a broader issue.

margaretjoanmiller avatar Mar 12 '22 22:03 margaretjoanmiller