Added transperency if required in apply_color.sh. Removed foot apply_color as it is handeled by terminal escape sequences.

This commit is contained in:
midn8hustlr
2024-02-23 02:59:03 +05:30
parent 3b4ced6591
commit 73ca9abbe5
3 changed files with 46 additions and 39 deletions
@@ -1,5 +1,6 @@
#!/usr/bin/env bash
term_alpha=80 #Set this to < 100 make all your terminals transparent
# sleep 0 # idk i wanted some delay or colors dont get applied properly
if [ ! -d "$HOME"/.cache/ags/user/generated ]; then
mkdir -p "$HOME"/.cache/ags/user/generated
@@ -86,25 +87,25 @@ apply_fuzzel() {
cp "$HOME"/.cache/ags/user/generated/fuzzel/fuzzel.ini "$HOME"/.config/fuzzel/fuzzel.ini
}
apply_foot() {
if [ ! -f "scripts/templates/foot/foot.ini" ]; then
echo "Template file not found for Foot. Skipping that."
return
fi
# Copy template
mkdir -p "$HOME"/.cache/ags/user/generated/foot
cp "scripts/templates/foot/foot.ini" "$HOME"/.cache/ags/user/generated/foot/foot.ini
# Apply colors
for i in "${!colorlist[@]}"; do
# sed -i "s/${colorlist[$i]} #/${colorvalues[$i]#\#}/g" "$HOME"/.cache/ags/user/generated/foot/foot.ini
sed -i "s/{{ ${colorlist[$i]} }}/${colorvalues[$i]#\#}/g" "$HOME"/.cache/ags/user/generated/foot/foot.ini
done
cp "$HOME"/.cache/ags/user/generated/foot/foot.ini "$HOME/.config/foot/foot.ini"
}
#apply_foot() {
# if [ ! -f "scripts/templates/foot/foot.ini" ]; then
# echo "Template file not found for Foot. Skipping that."
# return
# fi
# # Copy template
# mkdir -p "$HOME"/.cache/ags/user/generated/foot
# cp "scripts/templates/foot/foot.ini" "$HOME"/.cache/ags/user/generated/foot/foot.ini
# # Apply colors
# for i in "${!colorlist[@]}"; do
# # sed -i "s/${colorlist[$i]} #/${colorvalues[$i]#\#}/g" "$HOME"/.cache/ags/user/generated/foot/foot.ini
# sed -i "s/{{ ${colorlist[$i]} }}/${colorvalues[$i]#\#}/g" "$HOME"/.cache/ags/user/generated/foot/foot.ini
# done
#
# cp "$HOME"/.cache/ags/user/generated/foot/foot.ini "$HOME/.config/foot/foot.ini"
#}
apply_term() {
# Check if scripts/templates/foot/foot.ini exists
# Check if terminal escape sequence template exists
if [ ! -f "scripts/templates/terminal/sequences.txt" ]; then
echo "Template file not found for Terminal. Skipping that."
return
@@ -118,6 +119,12 @@ apply_term() {
done
cp "$HOME"/.cache/ags/user/generated/terminal/sequences.txt "$HOME"/.config/fish/sequences.txt
if [$term_alpha == 100]; then
sed -i "s/\[\$alpha\]//g" "$HOME/.cache/ags/user/generated/terminal/sequences.txt"
else
sed -i "s/\$alpha/$term_alpha/g" "$HOME/.cache/ags/user/generated/terminal/sequences.txt"
fi
for file in /dev/pts/*; do
if [[ $file =~ ^/dev/pts/[0-9]+$ ]]; then
cat "$HOME"/.config/fish/sequences.txt > "$file"
@@ -197,7 +204,7 @@ apply_ags &
apply_hyprland &
apply_hyprlock &
apply_gtk &
apply_foot &
# apply_foot &
# apply_gtklock &
apply_fuzzel &
apply_term &
@@ -1 +1 @@
]4;0;#$background #\]4;1;#$error #\]4;2;#$inversePrimary #\]4;3;#$onPrimaryContainer #\]4;4;#$onPrimaryContainer #\]4;5;#$onSecondaryContainer #\]4;6;#$primary #\]4;7;#$onSurfaceVariant #\]4;8;#$background #\]4;9;#$error #\]4;10;#$inversePrimary #\]4;11;#$onPrimaryContainer #\]4;12;#$onPrimaryContainer #\]4;13;#$onSecondaryContainer #\]4;14;#$primary #\]4;15;#$onSurfaceVariant #\]10;#$onSurfaceVariant #\]11;#$background #\]12;#$onSurfaceVariant #\]13;#$onSurfaceVariant #\]17;#$onSurfaceVariant #\]19;#$background #\]4;232;#$background #\]4;256;#$onSurfaceVariant #\]708;#$background #\
]4;0;#$background #\]4;1;#$error #\]4;2;#$inversePrimary #\]4;3;#$onPrimaryContainer #\]4;4;#$onPrimaryContainer #\]4;5;#$onSecondaryContainer #\]4;6;#$primary #\]4;7;#$onSurfaceVariant #\]4;8;#$background #\]4;9;#$error #\]4;10;#$inversePrimary #\]4;11;#$onPrimaryContainer #\]4;12;#$onPrimaryContainer #\]4;13;#$onSecondaryContainer #\]4;14;#$primary #\]4;15;#$onSurfaceVariant #\]10;#$onSurfaceVariant #\]11;[$alpha]#$background #\]12;#$onSurfaceVariant #\]13;#$onSurfaceVariant #\]17;#$onSurfaceVariant #\]19;#$background #\]4;232;#$background #\]4;256;#$onSurfaceVariant #\]708;[$alpha]#$background #\
+20 -20
View File
@@ -36,32 +36,32 @@ lines=10000
[cursor]
style=beam
color=111012 e7e0e5
# color=111012 e7e0e5
# blink=no
beam-thickness=1.5
# underline-thickness=<font underline thickness>
[colors]
alpha=1
background=111012
foreground=e7e0e5
regular0=111012
regular1=ffb4a9
regular2=784a9a
regular3=f4d9ff
regular4=f4d9ff
regular5=eedcf5
regular6=e4b5ff
regular7=cdc3ce
bright0=111012
bright1=ffb4a9
bright2=784a9a
bright3=f4d9ff
bright4=f4d9ff
bright5=eedcf5
bright6=e4b5ff
bright7=cdc3ce
# alpha=1
# background=111012
# foreground=e7e0e5
# regular0=111012
# regular1=ffb4a9
# regular2=784a9a
# regular3=f4d9ff
# regular4=f4d9ff
# regular5=eedcf5
# regular6=e4b5ff
# regular7=cdc3ce
# bright0=111012
# bright1=ffb4a9
# bright2=784a9a
# bright3=f4d9ff
# bright4=f4d9ff
# bright5=eedcf5
# bright6=e4b5ff
# bright7=cdc3ce
[csd]
# preferred=server