@kecan0406/ttheme 1.2.17 → 1.2.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -14
- package/bin/ttheme.js +229 -219
- package/bin/ttheme.js.map +1 -1
- package/dist/manifest.json +1 -1
- package/package.json +1 -1
- package/shell/adapters/_bg.zsh +5 -5
- package/shell/preview.zsh +184 -96
- package/shell/ttheme.zsh +84 -27
package/dist/manifest.json
CHANGED
package/package.json
CHANGED
package/shell/adapters/_bg.zsh
CHANGED
|
@@ -620,7 +620,7 @@ __tt_pv_bg_recolor() {
|
|
|
620
620
|
}
|
|
621
621
|
|
|
622
622
|
__tt_pv_bg_panel() {
|
|
623
|
-
local name=$1 z=$
|
|
623
|
+
local name=$1 z=$TTHEME_SGR[reset] b=$TTHEME_SGR[bold] d=$TTHEME_SGR[dim] c=$ac val sty mark choice REPLY
|
|
624
624
|
local -a labs=(Size Position Opacity Colors) at=(1 4 7 0) def=(${=bgdef[$1]})
|
|
625
625
|
local -i r0=$2 col=$3 end=$4 off=${bgoff[$1]} T=$(( $4 - $3 - 21 )) lo=100 hi=100 k i r knob pos=${bgpos[$1]} o tuned
|
|
626
626
|
(( color )) || z= b= d= c=
|
|
@@ -650,7 +650,7 @@ __tt_pv_bg_panel() {
|
|
|
650
650
|
elif [[ $choice != $val ]]; then
|
|
651
651
|
out+=$d" $choice "$z" "
|
|
652
652
|
elif (( tf == k && ! off )); then
|
|
653
|
-
out+=$
|
|
653
|
+
out+=$pl" $choice "$z" "
|
|
654
654
|
else
|
|
655
655
|
out+=$sty" $choice "$z" "
|
|
656
656
|
fi
|
|
@@ -710,7 +710,7 @@ __tt_pv_bg_panel() {
|
|
|
710
710
|
}
|
|
711
711
|
|
|
712
712
|
__tt_pv_bg_strip() {
|
|
713
|
-
local pal=$tune dir=${TTHEME_CONFIG:h}/backgrounds cur fill want sty top side bot cmd buf="" z=$
|
|
713
|
+
local pal=$tune dir=${TTHEME_CONFIG:h}/backgrounds cur fill want sty top side bot cmd buf="" z=$TTHEME_SGR[reset] d=$TTHEME_SGR[dim] REPLY
|
|
714
714
|
local -a keys=(${=bgpics[$tune]}) wh pd
|
|
715
715
|
local -i r0=$1 col=$2 end=$3 n=${#keys} at show tc tr=3 i k x r id slot first
|
|
716
716
|
if (( n < 1 )); then
|
|
@@ -741,7 +741,7 @@ __tt_pv_bg_strip() {
|
|
|
741
741
|
x=$(( col + i * (tc + 3) ))
|
|
742
742
|
slot=$(( i + 1 ))
|
|
743
743
|
if (( k == at )); then
|
|
744
|
-
sty=$
|
|
744
|
+
sty=$TTHEME_SGR[bold]$ac top="┏${(l:tc::━:)}┓" side="┃" bot="┗${(l:tc::━:)}┛"
|
|
745
745
|
else
|
|
746
746
|
sty=$d top="╭${(l:tc::─:)}╮" side="│" bot="╰${(l:tc::─:)}╯"
|
|
747
747
|
fi
|
|
@@ -816,7 +816,7 @@ __tt_pv_bg_save() {
|
|
|
816
816
|
note="Background · $name $REPLY"
|
|
817
817
|
fi
|
|
818
818
|
if __tt_color; then
|
|
819
|
-
printf
|
|
819
|
+
printf "${TTHEME_SGR[dim]}%s${TTHEME_SGR[reset]}\n" "$note"
|
|
820
820
|
else
|
|
821
821
|
print -r -- "$note"
|
|
822
822
|
fi
|