From 73ca9abbe5b7a2f80a6805738978e96bebd9b25d Mon Sep 17 00:00:00 2001 From: midn8hustlr <4visekh@gmail.com> Date: Fri, 23 Feb 2024 02:59:03 +0530 Subject: [PATCH 1/4] Added transperency if required in apply_color.sh. Removed foot apply_color as it is handeled by terminal escape sequences. --- .../scripts/color_generation/applycolor.sh | 43 +++++++++++-------- .../scripts/templates/terminal/sequences.txt | 2 +- .config/foot/foot.ini | 40 ++++++++--------- 3 files changed, 46 insertions(+), 39 deletions(-) diff --git a/.config/ags/scripts/color_generation/applycolor.sh b/.config/ags/scripts/color_generation/applycolor.sh index 006361b1..d6d16b50 100755 --- a/.config/ags/scripts/color_generation/applycolor.sh +++ b/.config/ags/scripts/color_generation/applycolor.sh @@ -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 & diff --git a/.config/ags/scripts/templates/terminal/sequences.txt b/.config/ags/scripts/templates/terminal/sequences.txt index 907eb9f2..1d41c4a0 100644 --- a/.config/ags/scripts/templates/terminal/sequences.txt +++ b/.config/ags/scripts/templates/terminal/sequences.txt @@ -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 #\ \ No newline at end of file +]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 #\ diff --git a/.config/foot/foot.ini b/.config/foot/foot.ini index cd0dcda3..f2fb2f57 100644 --- a/.config/foot/foot.ini +++ b/.config/foot/foot.ini @@ -36,32 +36,32 @@ lines=10000 [cursor] style=beam -color=111012 e7e0e5 +# color=111012 e7e0e5 # blink=no beam-thickness=1.5 # 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 From 27839977b073892e7b1097453c7cc1900c0438cc Mon Sep 17 00:00:00 2001 From: midn8hustlr <4visekh@gmail.com> Date: Thu, 29 Feb 2024 18:42:54 +0530 Subject: [PATCH 2/4] Set terminal trsperancy to 100 (for end-4) and remove apply_foot --- .../scripts/color_generation/applycolor.sh | 20 +------------------ 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/.config/ags/scripts/color_generation/applycolor.sh b/.config/ags/scripts/color_generation/applycolor.sh index a8304abe..c99e6ff0 100755 --- a/.config/ags/scripts/color_generation/applycolor.sh +++ b/.config/ags/scripts/color_generation/applycolor.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -term_alpha=80 #Set this to < 100 make all your terminals transparent +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 @@ -87,23 +87,6 @@ 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 terminal escape sequence template exists if [ ! -f "scripts/templates/terminal/sequences.txt" ]; then @@ -204,7 +187,6 @@ apply_ags & apply_hyprland & apply_hyprlock & apply_gtk & -# apply_foot & # apply_gtklock & apply_fuzzel & apply_term & From afcbd2c7923e8eb8d060ca749cd6638c8bddeb42 Mon Sep 17 00:00:00 2001 From: midn8hustlr <4visekh@gmail.com> Date: Thu, 29 Feb 2024 18:58:42 +0530 Subject: [PATCH 3/4] Removed fish/sequences.txt --- .config/ags/scripts/color_generation/applycolor.sh | 9 ++------- .config/fish/config.fish | 4 ++-- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.config/ags/scripts/color_generation/applycolor.sh b/.config/ags/scripts/color_generation/applycolor.sh index c99e6ff0..f5aad6a0 100755 --- a/.config/ags/scripts/color_generation/applycolor.sh +++ b/.config/ags/scripts/color_generation/applycolor.sh @@ -100,17 +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 - 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 + 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 } diff --git a/.config/fish/config.fish b/.config/fish/config.fish index 5d385534..2eab1b48 100755 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -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 From e1b81d6d30da0c5968bac135c8e1c7087d8539c2 Mon Sep 17 00:00:00 2001 From: midn8hustlr <4visekh@gmail.com> Date: Thu, 29 Feb 2024 19:06:09 +0530 Subject: [PATCH 4/4] Removed foot color generation template --- .config/ags/scripts/templates/foot/foot.ini | 133 -------------------- 1 file changed, 133 deletions(-) delete mode 100644 .config/ags/scripts/templates/foot/foot.ini diff --git a/.config/ags/scripts/templates/foot/foot.ini b/.config/ags/scripts/templates/foot/foot.ini deleted file mode 100644 index 045a3b17..00000000 --- a/.config/ags/scripts/templates/foot/foot.ini +++ /dev/null @@ -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= -# box-drawings-uses-font-glyphs=no -dpi-aware=no - -# initial-window-size-pixels=700x500 # Or, -# initial-window-size-chars= -# 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= - -[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= - - -[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= -# color= -# button-width=26 -# button-color= -# button-minimize-color= -# button-maximize-color= -# button-close-color= - -[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