Open salahoued opened 1 week ago
I didn’t have plans to add it but I do see the value. I’ve tended towards doing things in the “hook” property via a shell script where possible to keep things simple, however I do see the value in having this built in.
Do you have any thoughts or suggestions on the api/settings properties for this or feel that copying the Flavours implementation is the best way to add to Tinty?
I'm not sure about the best
way to implement, but the flavours
is way is tested and working.
But in the end it all depends on tinty
and you maintainers in how to implement it if there are any plans to. (I don't have experience in developing and maintaining a project)
Would something like this work for you with tinty and allow you to stop using flavours?
[[items]]
path = "~/projects/tinted-theming/tinted-alacritty"
name = "tinted-alacritty"
hook = """
# Delete lines between the comments, keeping the comments intact
sed -i "/^# TINTY START$/,/^# TINTY END$/{//!d}" ~/.config/alacritty/colors.toml
# Insert the contents of %f (filepath) after # TINTY START
sed -i "/^# TINTY START$/r %f" ~/.config/alacritty/colors.toml
fi
"""
themes-dir = "colors-256"
supported-systems = ["base16", "base24"]
It didn't work,
I use Flavours
to theme starship
, swaylock
and satty
, but there were no modifications to their config files when using it.
Tried sed -i "/^# TINTY START$/,/^# TINTY END$/{//!d}" ~/.config/starship.toml
alone and got: bash: !d}: event not found
I'm not familiar with sed
, so sorry about this
Hmm I think bash is trying to expand the !
. Can you try that specific command with single quotes? sed -i '/^# TINTY START$/,/^# TINTY END$/{//!d}' ~/.config/starship.toml
It works 'the content is removed', with the following message (sed preserves permissions for "file": operation not allowed):
sed: préserve les permissions de « /home/salo/.config/swaylock/seddILZ9v »: Opération non permise
sed -i "/^# TINTY START$/r /home/salo/.local/share/tinted-theming/tinty/base16-swaylock-colors-file.config" ~/.config/swaylock/config
also works with the same message.
But when using tinty
to apply a scheme it doesn't work
sed: -e expression n°1, caractère 3: expression régulière d'adresse inachevée
sed: -e expression n°1, caractère 3: expression régulière d'adresse inachevée
What version of
tinty
are you using?tinty 0.22.0
Is there any plans to implement
flavours
option to inject code in a file, likeI still use flavours to inject code to
conf
files that does not supportimports
, like forstarship
andswaylock
. I usetinty
to generate schemes from wallpaper, and I have thisflavours
item in mytinty
config file:then use
flavours
to apply the generated scheme tostarship
for exampleHere is a script I use to to choose a wallpaper and apply generated scheme: