alacritty-colorscheme icon indicating copy to clipboard operation
alacritty-colorscheme copied to clipboard

Alacritty has changed to TOML format in it's config - so this does not work anymore!

Open emilBeBri opened this issue 1 year ago • 14 comments

As said :)

Here is info from the newest version (arch linux , fully updated)


Created log file at "/tmp/Alacritty-34233.log"
[0.000005726s] [INFO ] [alacritty] Welcome to Alacritty
[0.000069480s] [INFO ] [alacritty] Version 0.13.0 (78fa4d6f)
[0.000079388s] [INFO ] [alacritty] Running on X11
[0.000557672s] [INFO ] [alacritty] Configuration files loaded from:
                                     "/home/emil/.config/alacritty/alacritty.toml"
[0.012437660s] [INFO ] [alacritty] Using GLX 1.4

emilBeBri avatar Jan 04 '24 11:01 emilBeBri

Hey there. Just threw up a PR for this, let me know if that works okay (does the job for me).

You can install it 'from source' like so:

git clone -b feature/move-to-toml [email protected]:akiss-xyz/alacritty-colorscheme-toml.git
cd alacritty-colorscheme-toml
poetry build
cd dist
pip install alacritty_colorscheme-1.0.2-py3-none-any.whl --break-system-packages --force-reinstall

This should net you the new code. To check,

alacritty-colorscheme --version

Should now output 1.0.2.

akiss-xyz avatar Jan 05 '24 01:01 akiss-xyz

Hi, I tried the above approach, but the following error was raised: image

Hilton-Santana avatar Jan 09 '24 09:01 Hilton-Santana

Oo, yes. Thanks for catching that, I think it's still by default using a yml config unless you tell it otherwise. Will update in a couple hours!

akiss-xyz avatar Jan 09 '24 09:01 akiss-xyz

Ok! Let me know when you are done.

Hilton-Santana avatar Jan 09 '24 11:01 Hilton-Santana

Just updated #44.

Let me know if that works!

Seems ok to me:

image

akiss-xyz avatar Jan 09 '24 11:01 akiss-xyz

It's working!

Hilton-Santana avatar Jan 10 '24 12:01 Hilton-Santana

Awesome! Let me know if you need anything else.

I'm likely adding a yml->toml conversion tool as well, to help convert old color schemes over -- really don't want to do that manually for dozens of color schemes.

akiss-xyz avatar Jan 10 '24 12:01 akiss-xyz

Nice!! It would be nice to have a temporary menu to quickly test the schemes in real time.

Hilton-Santana avatar Jan 10 '24 13:01 Hilton-Santana

Hmm. Many people have scripts that do that for them.

Here's mine:

themes

'Unix philosophers' will say that that's not this project's job (e.g. this exact discussion in #30).

TLDR:

You can write a script to do that for you.

The one given here (https://github.com/toggle-corp/alacritty-colorscheme/pull/30#issuecomment-1150305617) works great!

akiss-xyz avatar Jan 10 '24 13:01 akiss-xyz

Sorry, just realized I did a pet peeve of mine and didn't actually answer your question.

Copy this into a file (say themes.sh) and run it (sh themes.sh).

#!/usr/bin/env bash
set -euo pipefail

alacritty-colorscheme list |\
    # List of colorscheme files
    fzf --preview "
        # Apply the current selection. fzf puts that 'into' {}.
        alacritty-colorscheme apply {};
        # Display the output of ls so we can check how it looks!
        ls --color=always -la ~"

Should work like so:

using-fzf

akiss-xyz avatar Jan 10 '24 14:01 akiss-xyz

Perfect! Thanks!

Hilton-Santana avatar Jan 10 '24 15:01 Hilton-Santana

Ok great thanks for being on this!

Hmm I get this when cloning:


emil@t1 ~/Downloads/git-clones % git clone -b feature/move-to-toml [email protected]:akiss-xyz/alacritty-colorscheme-toml.git
Cloning into 'alacritty-colorscheme-toml'...
ssh: connect to host github.com port 22: Connection timed out
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

But no matter if it works for someone else I'll just wait a bit and see

emilBeBri avatar Jan 18 '24 11:01 emilBeBri

We can try and debug your SSH connection to Github, or you can feel free to skip to the end and just download the code manually from the website (https://github.com/akiss-xyz/alacritty-colorscheme-toml/tree/feature/move-to-toml).

Debugging SSH

May be a connection issue on your network. Can you ping github.com? Can you access port 22 manually? To try...

telnet github.com 22

It should output something resembling:

Connected to www.github.com.
Escape character is '^]'.
SSH-2.0-xxxxxxxxxxx

You can then quit the telnet shell with Ctrl + ] (aka ^]) followed by Ctrl + D.

Generally, to try and fix your SSH config, first we can test your SSH connection to Github (https://docs.github.com/en/authentication/connecting-to-github-with-ssh/testing-your-ssh-connection):

ssh -T [email protected]

And then follow the SSH setup guide. https://docs.github.com/en/authentication/connecting-to-github-with-ssh

Just get the files!

If you don't care about SSH, we can just solve this problem by downloading the branch manually from https://github.com/akiss-xyz/alacritty-colorscheme-toml/tree/feature/move-to-toml.

You can download a ZIP file like so: image

akiss-xyz avatar Jan 18 '24 12:01 akiss-xyz

Hi thanks for the thorough explanation, sorry for not responding before know.

So I just ended up downloading v 1.0.2 manually. I then build it with:

cd alacritty-colorscheme-toml
poetry build

then, I can see I need pip to install it:

pip install alacritty_colorscheme-1.0.2-py3-none-any.whl --break-system-packages --force-reinstall

I'm on endeavour linux, an arch linux based distro. I have previosly messed up my system by using pip on Arch, so I'm weary about using it - I figure pipx is safer:

pipx install alacritty_colorscheme-1.0.2-py3-none-any.whl --break-system-packages --force-reinstall

however I'm not too happy about the --break-system-packages flag here. I know you probably don't know that, and of course I won't hold you responsible if anything happens, but the risk of breaking my system and spending time fixing it is not worth it. Perhaps I should just wait until it gets updated so I can install it from the main build. Or would you think that it's reasonably safe to install with pipx?

If this is too noob, then feel free to ignore, I respect your time.

emilBeBri avatar Feb 13 '24 11:02 emilBeBri

Ok I just downloaded it manually and installed it by cd'ing into the dir and running pip install -user. Now everything works again, thanks for fixing it

emilBeBri avatar Mar 26 '24 14:03 emilBeBri