reimplement config dotfiles with templates

This commit is contained in:
SALVI Jérémie
2024-08-15 17:56:06 +02:00
parent 9ae4fdb609
commit d02841fd19
49 changed files with 2451 additions and 219 deletions

28
functions.sh Normal file
View File

@@ -0,0 +1,28 @@
function _template {
source ./templates/variables
sed -i "s|{{foreground}}|$foreground|" "$1"
sed -i "s|{{foreground_light}}|$foreground_light|" "$1"
sed -i "s|{{foreground_lighter}}|$foreground_lighter|" "$1"
sed -i "s|{{background}}|$background|" "$1"
sed -i "s|{{background_light}}|$background_light|" "$1"
sed -i "s|{{background_dark}}|$background_dark|" "$1"
sed -i "s|{{background_darker}}|$background_darker|" "$1"
sed -i "s|{{cursor_color}}|$cursor_color|" "$1"
sed -i "s|{{color0}}|$color0|" "$1"
sed -i "s|{{color8}}|$color8|" "$1"
sed -i "s|{{color1}}|$color1|" "$1"
sed -i "s|{{color9}}|$color9|" "$1"
sed -i "s|{{color2}}|$color2|" "$1"
sed -i "s|{{color10}}|$color10|" "$1"
sed -i "s|{{color3}}|$color3|" "$1"
sed -i "s|{{color11}}|$color11|" "$1"
sed -i "s|{{color4}}|$color4|" "$1"
sed -i "s|{{color12}}|$color12|" "$1"
sed -i "s|{{color5}}|$color5|" "$1"
sed -i "s|{{color13}}|$color13|" "$1"
sed -i "s|{{color6}}|$color6|" "$1"
sed -i "s|{{color14}}|$color14|" "$1"
sed -i "s|{{color7}}|$color7|" "$1"
sed -i "s|{{color15}}|$color15|" "$1"
}