archcraft-os / archcraft

// Source : ISO
https://archcraft.io
GNU General Public License v3.0
3.01k stars 103 forks source link

Alacritty TOML Config Files #388

Closed Wiian16 closed 7 months ago

Wiian16 commented 7 months ago

Detailed Description

Recently when opening the alacritty terminal, a warning message has appeared about migrating current YAML config files to TOML. Alacritty has provided a tool to convert your config files, but it does not go into the folders for each wm. After running alacritty migrate, I still have a warning about my config file. Alacritty has said that they will be dropping support for YAML files soon, as they don't want to maintain support for both.

Feature request

I do not yet have a good understanding of either YAML or TOML, so I don't know how to translate between the two. On top of that, Archcraft adds some complexity by changing theme colors with your background. I would like to either have a tool to convert these files for me, or perhaps there could be new config files provided here.

MattyPixels commented 7 months ago

To fix this, here is what I did until the developer does something (this is for the Wayfire WM, your alacritty and theme folders might be located somewhere else under ~/.config but the process will be similar):

Now, you will need to fix the theme.sh script as well, otherwise running it will recreate a .yml file. Here is the part that needs to be changed, my file is located under ~/.config/wayfire/theme:


## Alacritty ---------------------------------
apply_alacritty() {
    # alacritty : colors
    cat > ${PATH_ALAC}/colors.toml <<- _EOF_
      ## Colors configuration
      # Default colors
        [colors.primary]
            background = '${background}'
            foreground = '${foreground}'

      # Normal colors
        [colors.normal]
            black =   '${color0}'
            red =     '${color1}'
            green =   '${color2}'
            yellow =  '${color3}'
            blue =    '${color4}'
            magenta = '${color5}'
            cyan =    '${color6}'
            white =   '${color7}'

      # Bright colors
        [colors.bright]
            black =   '${color8}'
            red =     '${color9}'
            green =   '${color10}'
            yellow =  '${color11}'
            blue =    '${color12}'
            magenta = '${color13}'
            cyan =    '${color14}'
            white =   '${color15}'
    _EOF_
}

You should be good to go, however, the window doesn't seem to respect the line where the window size is declared (at least on Wayfire it doesn't, it just bugs out the window decoration). See screenshot:

Screenshot_2024-01-01-19-01-14_

Hope it helps! If you need help, let me know.

adi1090x commented 7 months ago

Already updated everything, you can get the wayfire update from ko-fi for free.

New alacritty version has some issue with geometry on floating windows in (some) wayland compositors (like sway and wayfire) To solve this, just edit the config file (~/.config/wayfire/alacritty/alacritty.toml) and comment out these lines:

[window.dimensions]
columns = 82
lines = 24

A PR fixing this issue has been merged to alacritty, wait for the new alacritty update.