Global colorscheme for all terminals and transperancy effects (#293)

This commit is contained in:
end-4 2024-02-29 22:31:36 +07:00 committed by GitHub
commit 189cbf92a7
5 changed files with 28 additions and 177 deletions

View file

@ -1,5 +1,6 @@
#!/usr/bin/env bash
term_alpha=100 #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,8 @@ 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_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
@ -116,11 +100,12 @@ apply_term() {
for i in "${!colorlist[@]}"; do
sed -i "s/${colorlist[$i]} #/${colorvalues[$i]#\#}/g" "$HOME"/.cache/ags/user/generated/terminal/sequences.txt
done
cp "$HOME"/.cache/ags/user/generated/terminal/sequences.txt "$HOME"/.config/fish/sequences.txt
sed -i "s/\$alpha/$term_alpha/g" "$HOME/.cache/ags/user/generated/terminal/sequences.txt"
for file in /dev/pts/*; do
if [[ $file =~ ^/dev/pts/[0-9]+$ ]]; then
cat "$HOME"/.config/fish/sequences.txt > "$file"
cat "$HOME"/.cache/ags/user/generated/terminal/sequences.txt > "$file"
fi
done
}
@ -197,7 +182,6 @@ apply_ags &
apply_hyprland &
apply_hyprlock &
apply_gtk &
apply_foot &
# apply_gtklock &
apply_fuzzel &
apply_term &

View file

@ -1,133 +0,0 @@
shell=fish
term=xterm-256color
title=foot
font=SpaceMono Nerd Font:size=11
letter-spacing=0
# horizontal-letter-offset=0
# vertical-letter-offset=0
# underline-offset=<font metrics>
# box-drawings-uses-font-glyphs=no
dpi-aware=no
# initial-window-size-pixels=700x500 # Or,
# initial-window-size-chars=<COLSxROWS>
# initial-window-mode=windowed
pad=25x25 # optionally append 'center'
# resize-delay-ms=100
# notify=notify-send -a ${app-id} -i ${app-id} ${title} ${body}
bold-text-in-bright=no
# word-delimiters=,│`|:"'()[]{}<>
# selection-target=primary
# workers=<number of logical CPUs>
[scrollback]
lines=10000
[url]
# launch=xdg-open ${url}
# label-letters=sadfjklewcmpgh
# osc8-underline=url-mode
# protocols=http, https, ftp, ftps, file, gemini, gopher
# uri-characters=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+="'
[cursor]
style=beam
color={{ $background }} {{ $onBackground }}
# blink=no
beam-thickness=1.5
# underline-thickness=<font underline thickness>
[colors]
alpha=1
background={{ $background }}
foreground={{ $onBackground }}
regular0={{ $background }}
regular1={{ $error }}
regular2={{ $inversePrimary }}
regular3={{ $onPrimaryContainer }}
regular4={{ $onPrimaryContainer }}
regular5={{ $onSecondaryContainer }}
regular6={{ $primary }}
regular7={{ $onSurfaceVariant }}
bright0={{ $background }}
bright1={{ $error }}
bright2={{ $inversePrimary }}
bright3={{ $onPrimaryContainer }}
bright4={{ $onPrimaryContainer }}
bright5={{ $onSecondaryContainer }}
bright6={{ $primary }}
bright7={{ $onSurfaceVariant }}
[csd]
# preferred=server
# size=26
# font=<primary font>
# color=<foreground color>
# button-width=26
# button-color=<background color>
# button-minimize-color=<regular4>
# button-maximize-color=<regular2>
# button-close-color=<regular1>
[key-bindings]
scrollback-up-page=Page_Up
# scrollback-up-half-page=none
# scrollback-up-line=none
scrollback-down-page=Page_Down
# scrollback-down-half-page=none
# scrollback-down-line=none
clipboard-copy=Control+c
clipboard-paste=Control+v
# primary-paste=Shift+Insert
search-start=Control+f
# font-increase=Control+plus Control+equal Control+KP_Add
# font-decrease=Control+minus Control+KP_Subtract
# font-reset=Control+0 Control+KP_0
# spawn-terminal=Control+Shift+n
# minimize=none
# maximize=none
# fullscreen=none
# pipe-visible=[sh -c "xurls | fuzzel | xargs -r firefox"] none
# pipe-scrollback=[sh -c "xurls | fuzzel | xargs -r firefox"] none
# pipe-selected=[xargs -r firefox] none
# show-urls-launch=Control+Shift+u
# show-urls-copy=none
[search-bindings]
cancel=Escape
find-prev=Shift+F3
find-next=F3 Control+G
# commit=Return
# cursor-left=Left Control+b
# cursor-left-word=Control+Left Mod1+b
# cursor-right=Right Control+f
# cursor-right-word=Control+Right Mod1+f
# cursor-home=Home Control+a
# cursor-end=End Control+e
# delete-prev=BackSpace
# delete-prev-word=Control+BackSpace
# delete-next=Delete
# delete-next-word=Mod1+d Control+Delete
# extend-to-word-boundary=Control+w
# extend-to-next-whitespace=Control+Shift+w
# clipboard-paste=Control+v Control+y
# primary-paste=Shift+Insert
[url-bindings]
# cancel=Control+g Control+c Control+d Escape
# toggle-url-visible=t
[mouse-bindings]
# primary-paste=BTN_MIDDLE
# select-begin=BTN_LEFT
# select-begin-block=Control+BTN_LEFT
# select-extend=BTN_RIGHT
# select-extend-character-wise=Control+BTN_RIGHT
# select-word=BTN_LEFT-2
# select-word-whitespace=Control+BTN_LEFT-2
# select-row=BTN_LEFT-3

View file

@ -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 #\

View file

@ -13,8 +13,8 @@ if status is-interactive
end
starship init fish | source
if test -f ~/.config/fish/sequences.txt
cat ~/.config/fish/sequences.txt
if test -f ~/.cache/ags/user/generated/terminal/sequences.txt
cat ~/.cache/ags/user/generated/terminal/sequences.txt
end
alias pamcan=pacman

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