dylanaraps / pywal

🎨 Generate and change color-schemes on the fly.
MIT License
8.34k stars 325 forks source link

Pywal doesn't change background of alacritty #580

Open pepijno opened 3 years ago

pepijno commented 3 years ago

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 commented 3 years ago

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?

doonoo commented 3 years ago

Just install pywal as usual and use this program linked in this thread

zBumblB commented 3 years ago

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

dwskme commented 2 years ago

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.

nipunravisara commented 2 years ago

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