@kecan0406/ttheme 1.1.4 → 1.1.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kecan0406/ttheme",
3
- "version": "1.1.4",
3
+ "version": "1.1.5",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "ttheme": "bin/ttheme.js"
@@ -80,31 +80,50 @@ __tt_bg_path() {
80
80
  }
81
81
 
82
82
  __tt_bg_load() {
83
- local name=$1 file=${${1/@/--}/\//--} dir=${TTHEME_CONFIG:h}/backgrounds img="" fit=contain op=1 pos=center f line stem="" size=100 REPLY
84
- local -i at=5
85
- local -a fills lines
83
+ local name=$1 pal=${1%:*} key="" file dir=${TTHEME_CONFIG:h}/backgrounds img="" fit=contain op=1 pos=center line stem="" size=100 REPLY
84
+ local -i at=5 pass
85
+ local -a fills lines src pics pd
86
86
  (( ${+bgsrc[$name]} )) && return 0
87
- bgfrom[$name]="" bgtunef[$name]=$file.tune.conf bgofff[$name]=$file.off.conf bgimages[$name]=1
88
- [[ -r $dir/$file.conf ]] && lines=("${(@f)$(<$dir/$file.conf)}")
87
+ [[ $name == *:* ]] && key=${name##*:}
88
+ file=${${pal/@/--}/\//--}
89
+ bgfrom[$name]="" bgurl[$name]="" bgby[$name]="" bgtunef[$name]=$file.tune.conf bgofff[$name]=$file.off.conf bgimages[$name]=1
90
+ if [[ -n $key ]]; then
91
+ pd=(${=bgpic[$pal:$key]})
92
+ lines=("# from ${pd[5,-1]}" "background-image = $pd[2]" "background-image-fit = cover" "background-image-position = top-right" "background-image-opacity = $pd[3]" "config-file = ?$pd[1].tune.conf" "config-file = ?$pd[1].off.conf")
93
+ [[ $pd[4] == - ]] || lines+=("# by $pd[4]")
94
+ bgimages[$name]=${bgimages[$pal]:-1}
95
+ elif [[ -r $dir/$file.conf ]]; then
96
+ lines=("${(@f)$(<$dir/$file.conf)}")
97
+ fi
89
98
  for line in $lines; do
90
99
  case $line in
91
100
  'config-file = ?'*.tune.conf) bgtunef[$name]=${line#config-file = \?} ;;
92
101
  'config-file = ?'*.off.conf) bgofff[$name]=${line#config-file = \?} ;;
93
- '# image '*/<->) bgimages[$name]=${line##*/} ;;
102
+ '# image '*/<->) bgimages[$name]=${line##*/} bgact[$pal]=${${line#\# image }%% *} ;;
103
+ '# picture '*)
104
+ pd=(${=line#\# picture })
105
+ bgpic[$pal:$pd[1]]=${(j: :)pd[2,-1]}
106
+ pics+=($pd[1])
107
+ ;;
94
108
  esac
95
109
  done
96
- for f in $dir/$file.conf $dir/${bgtunef[$name]}; do
97
- if [[ -r $f ]]; then
98
- for line in "${(@f)$(<$f)}"; do
99
- case $line in
100
- '# from '*) [[ $f == *.tune.conf ]] || bgfrom[$name]=${(j: :)${${=line#\# from }[1,2]}} ;;
101
- 'background-image = '*|'background-image='*) img=${${line#*=}# } ;;
102
- 'background-image-fit = '*|'background-image-fit='*) fit=${${line#*=}# } ;;
103
- 'background-image-opacity = '*|'background-image-opacity='*) op=${${line#*=}# } ;;
104
- 'background-image-position = '*|'background-image-position='*) pos=${${line#*=}# } ;;
105
- esac
106
- done
110
+ [[ -n $key ]] || bgpics[$pal]=${(j: :)pics}
111
+ for pass in 1 2; do
112
+ src=("${lines[@]}")
113
+ if (( pass == 2 )); then
114
+ src=()
115
+ [[ -r $dir/${bgtunef[$name]} ]] && src=("${(@f)$(<$dir/${bgtunef[$name]})}")
107
116
  fi
117
+ for line in "${src[@]}"; do
118
+ case $line in
119
+ '# from '*) (( pass == 1 )) && bgfrom[$name]=${(j: :)${${=line#\# from }[1,2]}} bgurl[$name]=${${=line#\# from }[3]} ;;
120
+ '# by '*) (( pass == 1 )) && bgby[$name]=${${line#\# by }//,/, } ;;
121
+ 'background-image = '*|'background-image='*) img=${${line#*=}# } ;;
122
+ 'background-image-fit = '*|'background-image-fit='*) fit=${${line#*=}# } ;;
123
+ 'background-image-opacity = '*|'background-image-opacity='*) op=${${line#*=}# } ;;
124
+ 'background-image-position = '*|'background-image-position='*) pos=${${line#*=}# } ;;
125
+ esac
126
+ done
108
127
  [[ $op == <->(|.<->) ]] || op=1
109
128
  [[ $pos == center-center ]] && pos=center
110
129
  at=${TTHEME_BG_POSITIONS[(Ie)$pos]}
@@ -116,7 +135,7 @@ __tt_bg_load() {
116
135
  *@<20-999>-*-<->x<->.png|*@<20-99>-*.png) stem=${REPLY%@*} size=${${REPLY##*@}%%-*} ;;
117
136
  *.png) stem=${REPLY%.png}; [[ $fit == cover ]] && size=fill ;;
118
137
  esac
119
- [[ $f == *.tune.conf ]] || bgdef[$name]="$size $at $op" bgbase[$name]=$REPLY
138
+ (( pass == 1 )) && bgdef[$name]="$size $at $op" bgbase[$name]=$REPLY
120
139
  done
121
140
  bgsize[$name]=$size bgpos[$name]=$at bgop[$name]=$op bgoff[$name]=0 bgshot[$name]="" bgshotkey[$name]="" bgfocus[$name]=50
122
141
  [[ -e $dir/${bgofff[$name]} ]] && bgoff[$name]=1
@@ -200,12 +219,12 @@ __tt_bg_include() {
200
219
  }
201
220
 
202
221
  __tt_bg_write() {
203
- local name=$1 dir=${TTHEME_CONFIG:h}/backgrounds src=${bgsrc[$1]} size=${bgsize[$1]} shape img="" fit=contain f REPLY
222
+ local name=$1 pal=${1%:*} dir=${TTHEME_CONFIG:h}/backgrounds src=${bgsrc[$1]} size=${bgsize[$1]} shape img="" fit=contain f REPLY
204
223
  local pos=${TTHEME_BG_POSITIONS[${bgpos[$1]}]}
205
224
  local -i W=$(( (pw + 2 * bgmx) * bgcw )) H=$(( (ph + 2 * bgmy) * bgch ))
206
225
  local -a wh fr
207
- [[ -r $dir/${${name/@/--}/\//--}.conf ]] || return 0
208
- __tt_bg_include $name || return 1
226
+ [[ -r $dir/${${pal/@/--}/\//--}.conf ]] || return 0
227
+ [[ $name == *:* ]] || __tt_bg_include $name || return 1
209
228
  if [[ "$size ${bgpos[$1]} ${bgop[$1]}" == "${bgdef[$1]}" ]]; then
210
229
  rm -f -- $dir/${bgtunef[$1]}
211
230
  else
@@ -262,7 +281,7 @@ __tt_pv_bg_open() {
262
281
  __tt_pv_bg_show() {
263
282
  (( bgcw )) || return 0
264
283
  local name=$1 img="" op size fit=contain focus=-1 REPLY
265
- local -a p=(${=TTHEME_PALETTE[$name]}) wh at
284
+ local -a p=(${=TTHEME_PALETTE[${name%:*}]}) wh at
266
285
  local -i cols=$(( pw + 2 * bgmx )) rows=$(( ph + 2 * bgmy ))
267
286
  (( ${#p} >= 20 )) || return 0
268
287
  (( $2 )) && { __tt_bg_forget; bgshown="" bganchor=0 }
@@ -336,7 +355,7 @@ __tt_bg_forget() {
336
355
  for id in $bgsent; do
337
356
  printf '\e_Ga=d,d=I,i=%d,q=2\e\\' $id
338
357
  done
339
- bgsent=() bgcost=() bgorder=() bgbytes=0
358
+ bgsent=() bgcost=() bgorder=() bgbytes=0 bgthumb=()
340
359
  }
341
360
 
342
361
  __tt_pv_bg_fs() {
@@ -353,8 +372,8 @@ __tt_pv_bg_fs() {
353
372
  }
354
373
 
355
374
  __tt_pv_bg_adjust() {
356
- (( bgcw )) && [[ -n $tune ]] || return 0
357
- local name=$tune REPLY
375
+ (( bgcw )) && [[ -n $tpick ]] || return 0
376
+ local name=$tpick REPLY
358
377
  __tt_bg_load $name
359
378
  __tt_bg_image $name
360
379
  __tt_bg_dim "$REPLY" || return 0
@@ -364,7 +383,14 @@ __tt_pv_bg_adjust() {
364
383
  __tt_pv_bg_fs $name && fs=$REPLY
365
384
  case $1 in
366
385
  on) off=$(( ! off )) ;;
367
- def) size=$def[1] at=$def[2] op=$def[3] off=0 ;;
386
+ def)
387
+ case $n in
388
+ 1) size=$def[1] ;;
389
+ 2) at=$def[2] ;;
390
+ 3) op=$def[3] ;;
391
+ *) size=$def[1] at=$def[2] op=$def[3] off=0 ;;
392
+ esac
393
+ ;;
368
394
  *)
369
395
  (( off )) && return 0
370
396
  case $1 in
@@ -425,8 +451,12 @@ __tt_pv_bg_findable() {
425
451
 
426
452
  __tt_pv_bg_find() {
427
453
  local name=$1 err var
428
- local -i rc
454
+ local -i rc n=${#TTHEME_SCENES}
455
+ local -x TTHEME_SCENE="" TTHEME_BG_MARGIN=""
456
+ (( n )) && TTHEME_SCENE=${(L)TTHEME_SCENES[(scene % n + n) % n + 1]}
457
+ (( bgrel )) && TTHEME_BG_MARGIN="$bgmx $bgmy"
429
458
  [[ $applied == "$painted" ]] || { __tt_apply "$applied" && painted=$applied }
459
+ __tt_pv_bg_commit $name
430
460
  __tt_pv_bg_close
431
461
  err=$(__tt_cli find $name 2>&1 >/dev/tty)
432
462
  rc=$?
@@ -440,44 +470,91 @@ __tt_pv_bg_find() {
440
470
  msg=${err:-"Find failed for $name"} msgt=300
441
471
  fi
442
472
  (( rc == 0 )) || return 1
443
- unset "bgsrc[$name]"
473
+ __tt_pv_bg_reset $name
444
474
  __tt_bg_load $name
445
475
  bgload[$name]="" bgedit[$name]=1
446
476
  msg=${err:-"Background · $name"} msgt=200
447
477
  return 0
448
478
  }
449
479
 
480
+ __tt_pv_bg_commit() {
481
+ local img
482
+ for img in ${(k)bgedit[(I)${(b)1}(|:*)]}; do
483
+ __tt_bg_write $img
484
+ unset "bgedit[$img]"
485
+ done
486
+ unset "bgview[$1]" "bgswap[$1]"
487
+ }
488
+
489
+ __tt_pv_bg_reset() {
490
+ local img
491
+ for img in ${(k)bgsrc[(I)${(b)1}(|:*)]}; do
492
+ unset "bgsrc[$img]"
493
+ done
494
+ unset "bgview[$1]" "bgswap[$1]"
495
+ }
496
+
450
497
  __tt_pv_bg_images() {
451
498
  __tt_bg_load $1
452
499
  REPLY=${bgimages[$1]:-1}
453
500
  }
454
501
 
455
- __tt_pv_bg_image() {
456
- local name=$tune act=$1 err REPLY
457
- local -i rc
458
- if [[ $act != drop ]]; then
459
- __tt_pv_bg_images $name
460
- (( REPLY > 1 )) || { msg="$name has one image" msgt=200; return 0 }
461
- [[ "${bgsize[$name]} ${bgpos[$name]} ${bgop[$name]} ${bgoff[$name]}" == "$tsnap" ]] || __tt_bg_write $name
502
+ __tt_pv_img() {
503
+ REPLY=$1
504
+ [[ -z $2 || $2 == "${bgact[$1]}" ]] || REPLY=$1:$2
505
+ }
506
+
507
+ __tt_pv_tune_open() {
508
+ local REPLY
509
+ __tt_bg_load $1
510
+ __tt_pv_shows $1
511
+ tpick=$REPLY tune=$1 tf=1 tsnaps=()
512
+ __tt_bg_load $tpick
513
+ tsnaps[$tpick]="${bgsize[$tpick]} ${bgpos[$tpick]} ${bgop[$tpick]} ${bgoff[$tpick]}"
514
+ }
515
+
516
+ __tt_pv_bg_pick() {
517
+ local -a keys=(${=bgpics[$tune]})
518
+ local cur=${tpick##*:} REPLY
519
+ local -i n=${#keys} at
520
+ if (( n < 2 )); then
521
+ msg="$tune has one image" msgt=200
522
+ return 0
462
523
  fi
463
- bgname="" tune=""
524
+ [[ $tpick == *:* ]] || cur=${bgact[$tune]}
525
+ at=${keys[(Ie)$cur]}
526
+ (( at )) || at=1
527
+ at=$(( (at - 1 + $1 + n) % n + 1 ))
528
+ __tt_pv_img $tune $keys[at]
529
+ tpick=$REPLY
530
+ __tt_bg_load $tpick
531
+ (( ${+tsnaps[$tpick]} )) || tsnaps[$tpick]="${bgsize[$tpick]} ${bgpos[$tpick]} ${bgop[$tpick]} ${bgoff[$tpick]}"
532
+ bgname=""
533
+ }
534
+
535
+ __tt_pv_bg_drop() {
536
+ local name=$tune key=${tpick##*:} err
537
+ local -i rc
538
+ [[ $tpick == *:* ]] || key=${bgact[$name]}
539
+ __tt_pv_untune
540
+ __tt_pv_bg_commit $name
464
541
  __tt_pv_bg_close
465
- err=$(__tt_cli image $name $act 2>&1)
542
+ err=$(__tt_cli image $name drop ${key:+$key} 2>&1)
466
543
  rc=$?
467
544
  err=${${err//$'\n'/ }## #}
468
545
  resized=1 bgname="" bgshown="" bgdim=()
469
- unset "bgsrc[$name]"
546
+ __tt_pv_bg_reset $name
470
547
  __tt_bg_load $name
471
548
  bgload[$name]="" bgedit[$name]=1
472
549
  msg=${err:-"Background · $name"} msgt=$(( rc ? 300 : 200 ))
473
550
  [[ -r ${TTHEME_CONFIG:h}/backgrounds/${${name/@/--}/\//--}.conf ]] || return 0
474
- tune=$name tf=1 tsnap="${bgsize[$name]} ${bgpos[$name]} ${bgop[$name]} ${bgoff[$name]}"
551
+ __tt_pv_tune_open $name
475
552
  }
476
553
 
477
554
  __tt_pv_bg_panel() {
478
- local name=$1 z=$'\e[0m' b=$'\e[1m' d=$'\e[2m' c=$ac val sty REPLY
479
- local -a labs=(Size Position Opacity) at=(0 3 6)
480
- local -i r0=$2 col=$3 end=$4 off=${bgoff[$1]} T=$(( $4 - $3 - 19 )) lo=100 hi=100 k i r knob pos=${bgpos[$1]} o
555
+ local name=$1 z=$'\e[0m' b=$'\e[1m' d=$'\e[2m' c=$ac val sty mark REPLY
556
+ local -a labs=(Size Position Opacity) at=(0 3 6) def=(${=bgdef[$1]})
557
+ 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
481
558
  (( color )) || z= b= d= c=
482
559
  (( T < 8 )) && T=8
483
560
  (( $+commands[sips] )) && lo=20
@@ -507,6 +584,7 @@ __tt_pv_bg_panel() {
507
584
  fi
508
585
  done
509
586
  val=${TTHEME_BG_POSITIONS[pos]}
587
+ tuned=$(( pos != def[2] ))
510
588
  else
511
589
  if (( k == 1 )); then
512
590
  if [[ ${bgsize[$name]} == fill ]]; then
@@ -514,9 +592,12 @@ __tt_pv_bg_panel() {
514
592
  else
515
593
  knob=$(( (${bgsize[$name]} - lo) * (T - 1) / (hi - lo + 1) )) val=${bgsize[$name]}%
516
594
  fi
595
+ tuned=0
596
+ [[ ${bgsize[$name]} == "$def[1]" ]] || tuned=1
517
597
  else
518
598
  o=$(( ${bgop[$name]} * 100 + 0.5 ))
519
599
  knob=$(( o * (T - 1) / 100 )) val=${bgop[$name]}
600
+ tuned=$(( ${bgop[$name]} * 1000 + 0.5 != ${def[3]:-1} * 1000 + 0.5 ))
520
601
  fi
521
602
  (( knob < 0 )) && knob=0
522
603
  (( knob > T - 1 )) && knob=$(( T - 1 ))
@@ -529,8 +610,88 @@ __tt_pv_bg_panel() {
529
610
  out+=$c${(l:knob::━:)}$b"●"$z$d${(l:$(( T - 1 - knob ))::─:)}$z
530
611
  fi
531
612
  fi
532
- out+=$'\e['$r';'$(( end - ${#val} + 1 ))'H'$sty$val$z
613
+ out+=$'\e['$r';'$(( end - ${#val} - 1 ))'H'$sty$val$z
614
+ if (( tuned )); then
615
+ mark=$d
616
+ (( tf == k )) && mark=$b$c
617
+ out+=$'\e['$r';'$end'H'$mark"↺"$z
618
+ fi
533
619
  done
620
+ (( split )) && bgstrip="$(( r0 + 8 )) $col $end"
621
+ }
622
+
623
+ __tt_pv_bg_strip() {
624
+ local pal=$tune dir=${TTHEME_CONFIG:h}/backgrounds cur fill want sty top side bot cmd buf="" z=$'\e[0m' d=$'\e[2m' REPLY
625
+ local -a keys=(${=bgpics[$tune]}) wh pd
626
+ local -i r0=$1 col=$2 end=$3 n=${#keys} at show tc tr=3 i k x r id slot first
627
+ if (( n < 2 )); then
628
+ __tt_pv_bg_strip_off
629
+ return 0
630
+ fi
631
+ cur=${tpick##*:}
632
+ [[ $tpick == *:* ]] || cur=${bgact[$pal]}
633
+ at=${keys[(Ie)$cur]}
634
+ (( at )) || at=1
635
+ buf+=$'\e['$r0';'$(( col + 2 ))'H'$d"Images"$z$'\e['$r0';'$(( end - ${#at} - ${#n} ))'H'$d"$at/$n"$z
636
+ pd=(${=bgpic[$pal:$keys[at]]})
637
+ if (( r0 + tr + 3 >= ph )) || ! __tt_bg_dim $dir/$pd[2]; then
638
+ print -rn -- "$buf"
639
+ __tt_pv_bg_strip_off
640
+ return 0
641
+ fi
642
+ wh=(${=bgdim[$dir/$pd[2]]})
643
+ tc=$(( (2 * tr * bgch * wh[1] + wh[2] * bgcw) / (2 * wh[2] * bgcw) ))
644
+ (( tc < 4 )) && tc=4
645
+ (( tc > 16 )) && tc=16
646
+ show=$(( n < 5 ? n : 5 ))
647
+ while (( show > 1 && show * (tc + 3) - 1 > end - col )); do
648
+ (( show-- ))
649
+ done
650
+ first=1
651
+ (( n > show )) && first=$(( ((at - 1 - show / 2) % n + n) % n + 1 ))
652
+ for (( i = 0; i < show; i++ )); do
653
+ k=$(( (first - 1 + i) % n + 1 ))
654
+ x=$(( col + i * (tc + 3) ))
655
+ slot=$(( i + 1 ))
656
+ if (( k == at )); then
657
+ sty=$'\e[1m'$ac top="┏${(l:tc::━:)}┓" side="┃" bot="┗${(l:tc::━:)}┛"
658
+ else
659
+ sty=$d top="╭${(l:tc::─:)}╮" side="│" bot="╰${(l:tc::─:)}╯"
660
+ fi
661
+ buf+=$'\e['$(( r0 + 1 ))';'$x'H'$sty$top$z$'\e['$(( r0 + tr + 2 ))';'$x'H'$sty$bot$z
662
+ for (( r = 0; r < tr; r++ )); do
663
+ buf+=$'\e['$(( r0 + 2 + r ))';'$x'H'$sty$side$z$'\e['$(( r0 + 2 + r ))';'$(( x + tc + 1 ))'H'$sty$side$z
664
+ done
665
+ pd=(${=bgpic[$pal:$keys[k]]})
666
+ fill=$dir/$pd[2]
667
+ [[ -r $fill ]] || continue
668
+ __tt_bg_send $fill
669
+ id=$REPLY
670
+ want="$id $(( r0 + 2 )) $(( x + 1 )) $tc $tr"
671
+ [[ ${bgthumb[$slot]} == "$want" ]] && continue
672
+ if [[ -n ${bgthumb[$slot]} ]]; then
673
+ printf -v cmd '\e_Ga=d,d=i,i=%d,p=%d,q=2\e\\' ${${=bgthumb[$slot]}[1]} $(( 700000 + slot ))
674
+ buf+=$cmd
675
+ fi
676
+ printf -v cmd '\e[%d;%dH\e_Ga=p,i=%d,p=%d,c=%d,r=%d,C=1,z=-1,q=2\e\\' $(( r0 + 2 )) $(( x + 1 )) $id $(( 700000 + slot )) $tc $tr
677
+ buf+=$cmd
678
+ bgthumb[$slot]=$want
679
+ done
680
+ for slot in ${(k)bgthumb}; do
681
+ (( slot > show )) || continue
682
+ printf -v cmd '\e_Ga=d,d=i,i=%d,p=%d,q=2\e\\' ${${=bgthumb[$slot]}[1]} $(( 700000 + slot ))
683
+ buf+=$cmd
684
+ unset "bgthumb[$slot]"
685
+ done
686
+ print -rn -- "$buf"
687
+ }
688
+
689
+ __tt_pv_bg_strip_off() {
690
+ local slot
691
+ for slot in ${(k)bgthumb}; do
692
+ printf '\e_Ga=d,d=i,i=%d,p=%d,q=2\e\\' ${${=bgthumb[$slot]}[1]} $(( 700000 + slot ))
693
+ done
694
+ bgthumb=()
534
695
  }
535
696
 
536
697
  __tt_pv_bg_close() {
@@ -539,27 +700,38 @@ __tt_pv_bg_close() {
539
700
  }
540
701
 
541
702
  __tt_pv_bg_save() {
542
- local name msg REPLY
703
+ local img name note err REPLY
543
704
  local -a saved=()
544
- (( ${#bgedit} )) || return 0
545
- for name in ${(ok)bgedit}; do
546
- if ! __tt_bg_write $name; then
547
- print -u2 "ttheme: could not save the background of $name"
705
+ (( ${#bgedit} + ${#bgswap} )) || return 0
706
+ for img in ${(ok)bgedit}; do
707
+ if ! __tt_bg_write $img; then
708
+ print -u2 "ttheme: could not save the background of ${img%:*}"
548
709
  continue
549
710
  fi
550
- saved+=($name)
711
+ (( ${saved[(Ie)${img%:*}]} )) || saved+=(${img%:*})
712
+ done
713
+ for name in ${(ok)bgswap}; do
714
+ if ! err=$(__tt_cli image $name show ${bgswap[$name]} 2>&1); then
715
+ print -u2 -r -- "$err"
716
+ continue
717
+ fi
718
+ (( ${saved[(Ie)$name]} )) || saved+=($name)
719
+ done
720
+ for name in $saved; do
721
+ __tt_pv_shows $name
722
+ img=$REPLY
551
723
  if [[ ! -r ${TTHEME_CONFIG:h}/backgrounds/${${name/@/--}/\//--}.conf ]]; then
552
- msg="Background · $name none"
553
- elif (( bgoff[$name] )); then
554
- msg="Background · $name off"
724
+ note="Background · $name none"
725
+ elif (( bgoff[$img] )); then
726
+ note="Background · $name off"
555
727
  else
556
- __tt_bg_label $name
557
- msg="Background · $name $REPLY"
728
+ __tt_bg_label $img
729
+ note="Background · $name $REPLY"
558
730
  fi
559
731
  if __tt_color; then
560
- printf '\033[2m%s\033[0m\n' "$msg"
732
+ printf '\033[2m%s\033[0m\n' "$note"
561
733
  else
562
- print -r -- "$msg"
734
+ print -r -- "$note"
563
735
  fi
564
736
  done
565
737
  (( ${#saved} )) && __tt_bg_saved $saved
@@ -71,10 +71,18 @@ __tt_pv_bg_find() { return 1 }
71
71
 
72
72
  __tt_pv_bg_images() { REPLY=1 }
73
73
 
74
- __tt_pv_bg_image() { : }
74
+ __tt_pv_tune_open() { : }
75
+
76
+ __tt_pv_bg_pick() { : }
77
+
78
+ __tt_pv_bg_drop() { : }
75
79
 
76
80
  __tt_pv_bg_panel() { : }
77
81
 
82
+ __tt_pv_bg_strip() { : }
83
+
84
+ __tt_pv_bg_strip_off() { : }
85
+
78
86
  __tt_pv_bg_close() { : }
79
87
 
80
88
  __tt_pv_bg_save() { : }