pywal icon indicating copy to clipboard operation
pywal copied to clipboard

Pywal doesn't change background of alacritty

Open pepijno opened this issue 4 years ago • 5 comments

I use alacritty as a terminal and all colors in alacritty are correctly sourced when I run wal, except for the background which stays the same color throughout. Running cat ~/.cache/wal/sequences also doesn't change the background. I'm using i3 as window manager and have no color settings in my alacritty config. Is this an issue from pywal or an issue from alacritty?

pepijno avatar Jan 17 '21 22:01 pepijno

I think the problem is the -a option which I was still using from when I had URxvt. Then pywal tried to set the background of alacritty to '[94]#0d1018' instead of '#0d1018'. I know that -a should only work with URxvt but I didn't expect it to break for other terminals. Is this expected behaviour?

pepijno avatar Jan 23 '21 13:01 pepijno

Terminal solution doesn't work for me. Instead I just created a new template and imported it. Add

import:
  - ~/.cache/wal/colors-alacritty.yml

to your alacritty.yml and create a new template file ~/.config/wal/templates/colors-alacritty.yml. Here's my template file. The only thing is, if you omit alpha when setting a new colorscheme, the terminal background will be transparent.

background_opacity: 0.{alpha}

# Colors (Gruvbox dark)
colors:
  primary:
    background:        '{background}'
    foreground:        '{foreground}'
  cursor:
    text:   CellForeground
    cursor: '{cursor}'
  bright:
    black:   '{color0}'
    red:     '{color1}'
    green:   '{color2}'
    yellow:  '{color3}'
    blue:    '{color4}'
    magenta: '{color5}'
    cyan:    '{color6}'
    white:   '{color7}'
  normal:
    black:   '{color8}'
    red:     '{color9}'
    green:   '{color10}'
    yellow:  '{color11}'
    blue:    '{color12}'
    magenta: '{color13}'
    cyan:    '{color14}'
    white:   '{color15}'

I created a pull request #611

zBumblB avatar Jul 23 '21 09:07 zBumblB

Terminal solution doesn't work for me. Instead I just created a new template and imported it. Add

import:
  - ~/.cache/wal/colors-alacritty.yml

to your alacritty.yml and create a new template file ~/.config/wal/templates/colors-alacritty.yml. Here's my template file. The only thing is, if you omit alpha when setting a new colorscheme, the terminal background will be transparent.

background_opacity: 0.{alpha}

# Colors (Gruvbox dark)
colors:
  primary:
    background:        '{background}'
    foreground:        '{foreground}'
  cursor:
    text:   CellForeground
    cursor: '{cursor}'
  bright:
    black:   '{color0}'
    red:     '{color1}'
    green:   '{color2}'
    yellow:  '{color3}'
    blue:    '{color4}'
    magenta: '{color5}'
    cyan:    '{color6}'
    white:   '{color7}'
  normal:
    black:   '{color8}'
    red:     '{color9}'
    green:   '{color10}'
    yellow:  '{color11}'
    blue:    '{color12}'
    magenta: '{color13}'
    cyan:    '{color14}'
    white:   '{color15}'

I created a pull request #611

Hey can you tell me how to create template , add transparency and add to alacritty. Please can you explain properly. I am new to alacritty and dont know how can i import from external file.

dwskme avatar Nov 10 '21 02:11 dwskme

Terminal solution doesn't work for me. Instead I just created a new template and imported it. Add

import:
  - ~/.cache/wal/colors-alacritty.yml

to your alacritty.yml and create a new template file ~/.config/wal/templates/colors-alacritty.yml. Here's my template file. The only thing is, if you omit alpha when setting a new colorscheme, the terminal background will be transparent.

background_opacity: 0.{alpha}

# Colors (Gruvbox dark)
colors:
  primary:
    background:        '{background}'
    foreground:        '{foreground}'
  cursor:
    text:   CellForeground
    cursor: '{cursor}'
  bright:
    black:   '{color0}'
    red:     '{color1}'
    green:   '{color2}'
    yellow:  '{color3}'
    blue:    '{color4}'
    magenta: '{color5}'
    cyan:    '{color6}'
    white:   '{color7}'
  normal:
    black:   '{color8}'
    red:     '{color9}'
    green:   '{color10}'
    yellow:  '{color11}'
    blue:    '{color12}'
    magenta: '{color13}'
    cyan:    '{color14}'
    white:   '{color15}'

I created a pull request #611

Hey can you tell me how to create template , add transparency and add to alacritty. Please can you explain properly. I am new to alacritty and dont know how can i import from external file.

It's in pywal documentation https://github.com/dylanaraps/pywal/wiki/User-Template-Files

nipunravisara avatar Dec 09 '21 03:12 nipunravisara