@kecan0406/ttheme 1.0.49 → 1.1.1

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.49",
2
+ "version": "1.1.1",
3
3
  "gate": [
4
4
  {
5
5
  "rule": "foreground",
@@ -1219,6 +1219,11 @@
1219
1219
  "order": 21,
1220
1220
  "ansiSource": "Rose Pine Dawn + Magica",
1221
1221
  "booru": "kyuubee",
1222
+ "booruSites": {
1223
+ "zerochan": [
1224
+ "kyubee"
1225
+ ]
1226
+ },
1222
1227
  "background": "#fff8f7",
1223
1228
  "foreground": "#1f1c39",
1224
1229
  "cursor": "#b83b64",
@@ -1676,6 +1681,9 @@
1676
1681
  ],
1677
1682
  "yande": [
1678
1683
  "gotou_hitori"
1684
+ ],
1685
+ "zerochan": [
1686
+ "gotou_hitori"
1679
1687
  ]
1680
1688
  },
1681
1689
  "background": "#201517",
@@ -2135,6 +2143,9 @@
2135
2143
  ],
2136
2144
  "yande": [
2137
2145
  "tsukino_usagi"
2146
+ ],
2147
+ "zerochan": [
2148
+ "sailor_moon_(character)"
2138
2149
  ]
2139
2150
  },
2140
2151
  "background": "#1f1518",
@@ -2475,6 +2486,11 @@
2475
2486
  "order": 43,
2476
2487
  "ansiSource": "TokyoNight",
2477
2488
  "booru": "jill_stingray",
2489
+ "booruSites": {
2490
+ "zerochan": [
2491
+ "julianne_stingray"
2492
+ ]
2493
+ },
2478
2494
  "background": "#15181e",
2479
2495
  "foreground": "#dee2f2",
2480
2496
  "cursor": "#7aa2f7",
@@ -2532,7 +2548,8 @@
2532
2548
  "ansiSource": "Cyberpunk + Glitch City",
2533
2549
  "booru": "dorothy_haze",
2534
2550
  "booruSites": {
2535
- "konachan": []
2551
+ "konachan": [],
2552
+ "zerochan": []
2536
2553
  },
2537
2554
  "background": "#201515",
2538
2555
  "foreground": "#fbdbdc",
@@ -3286,6 +3303,9 @@
3286
3303
  ],
3287
3304
  "yande": [
3288
3305
  "sans"
3306
+ ],
3307
+ "zerochan": [
3308
+ "sans"
3289
3309
  ]
3290
3310
  },
3291
3311
  "background": "#12181d",
@@ -3347,6 +3367,9 @@
3347
3367
  "booruSites": {
3348
3368
  "yande": [
3349
3369
  "papyrus"
3370
+ ],
3371
+ "zerochan": [
3372
+ "papyrus"
3350
3373
  ]
3351
3374
  },
3352
3375
  "background": "#201512",
@@ -3465,7 +3488,10 @@
3465
3488
  "ansiSource": "Laser",
3466
3489
  "booru": "mettaton",
3467
3490
  "booruSites": {
3468
- "yande": []
3491
+ "yande": [],
3492
+ "zerochan": [
3493
+ "mettaton_ex"
3494
+ ]
3469
3495
  },
3470
3496
  "background": "#1d151b",
3471
3497
  "foreground": "#f3dceb",
@@ -3586,6 +3612,9 @@
3586
3612
  ],
3587
3613
  "yande": [
3588
3614
  "nanakusa_nazuna"
3615
+ ],
3616
+ "zerochan": [
3617
+ "nanakusa_nazuna"
3589
3618
  ]
3590
3619
  },
3591
3620
  "background": "#1e151a",
@@ -3704,7 +3733,10 @@
3704
3733
  "ansiSource": "Birds Of Paradise",
3705
3734
  "booru": "kikyou_seri",
3706
3735
  "booruSites": {
3707
- "konachan": []
3736
+ "konachan": [],
3737
+ "zerochan": [
3738
+ "kikiyou_seri"
3739
+ ]
3708
3740
  },
3709
3741
  "background": "#1e160d",
3710
3742
  "foreground": "#f6dfc6",
@@ -4162,6 +4194,9 @@
4162
4194
  ],
4163
4195
  "yande": [
4164
4196
  "sayori_(doki_doki_literature_club!)"
4197
+ ],
4198
+ "zerochan": [
4199
+ "sayori_(doki_doki_literature_club!)"
4165
4200
  ]
4166
4201
  },
4167
4202
  "background": "#211512",
@@ -4226,6 +4261,9 @@
4226
4261
  ],
4227
4262
  "yande": [
4228
4263
  "natsuki_(doki_doki_literature_club!)"
4264
+ ],
4265
+ "zerochan": [
4266
+ "natsuki_(doki_doki_literature_club!)"
4229
4267
  ]
4230
4268
  },
4231
4269
  "background": "#1f1518",
@@ -4290,6 +4328,9 @@
4290
4328
  ],
4291
4329
  "yande": [
4292
4330
  "yuri_(doki_doki_literature_club!)"
4331
+ ],
4332
+ "zerochan": [
4333
+ "yuri_(doki_doki_literature_club!)"
4293
4334
  ]
4294
4335
  },
4295
4336
  "background": "#1b161d",
@@ -4355,6 +4396,9 @@
4355
4396
  ],
4356
4397
  "yande": [
4357
4398
  "monika_(doki_doki_literature_club!)"
4399
+ ],
4400
+ "zerochan": [
4401
+ "monika_(doki_doki_literature_club!)"
4358
4402
  ]
4359
4403
  },
4360
4404
  "background": "#141911",
@@ -4531,6 +4575,9 @@
4531
4575
  ],
4532
4576
  "yande": [
4533
4577
  "beatrice"
4578
+ ],
4579
+ "zerochan": [
4580
+ "beatrice_(umineko_no_naku_koro_ni)"
4534
4581
  ]
4535
4582
  },
4536
4583
  "background": "#19180d",
@@ -5094,6 +5141,11 @@
5094
5141
  "order": 88,
5095
5142
  "ansiSource": "Mellow",
5096
5143
  "booru": "lucy_(cyberpunk)",
5144
+ "booruSites": {
5145
+ "zerochan": [
5146
+ "lucyna_kushinada"
5147
+ ]
5148
+ },
5097
5149
  "background": "#1e151a",
5098
5150
  "foreground": "#e3e1eb",
5099
5151
  "cursor": "#e29eca",
@@ -5150,6 +5202,11 @@
5150
5202
  "order": 89,
5151
5203
  "ansiSource": "Emerald Synth",
5152
5204
  "booru": "rebecca_(cyberpunk)",
5205
+ "booruSites": {
5206
+ "zerochan": [
5207
+ "rebecca_(cyberpunk:_edgerunners)"
5208
+ ]
5209
+ },
5153
5210
  "background": "#201516",
5154
5211
  "foreground": "#fbdbde",
5155
5212
  "cursor": "#99dfd0",
@@ -6221,7 +6278,10 @@
6221
6278
  "booru": "ryoumen_sukuna_(jujutsu_kaisen)",
6222
6279
  "booruSites": {
6223
6280
  "konachan": [],
6224
- "yande": []
6281
+ "yande": [],
6282
+ "zerochan": [
6283
+ "sukuna"
6284
+ ]
6225
6285
  },
6226
6286
  "background": "#211513",
6227
6287
  "foreground": "#e0e3e6",
@@ -7293,6 +7353,9 @@
7293
7353
  "booruSites": {
7294
7354
  "konachan": [
7295
7355
  "kirigaya_kazuto"
7356
+ ],
7357
+ "zerochan": [
7358
+ "kirigaya_kazuto"
7296
7359
  ]
7297
7360
  },
7298
7361
  "background": "#16171f",
@@ -7357,6 +7420,9 @@
7357
7420
  ],
7358
7421
  "yande": [
7359
7422
  "asuna_(sword_art_online)"
7423
+ ],
7424
+ "zerochan": [
7425
+ "yuuki_asuna"
7360
7426
  ]
7361
7427
  },
7362
7428
  "background": "#1f160d",
@@ -7419,6 +7485,9 @@
7419
7485
  "booruSites": {
7420
7486
  "konachan": [
7421
7487
  "shinon_(sao)"
7488
+ ],
7489
+ "zerochan": [
7490
+ "sinon_(ggo)"
7422
7491
  ]
7423
7492
  },
7424
7493
  "background": "#111916",
@@ -7483,6 +7552,9 @@
7483
7552
  ],
7484
7553
  "yande": [
7485
7554
  "leafa"
7555
+ ],
7556
+ "zerochan": [
7557
+ "lyfa_(alo)"
7486
7558
  ]
7487
7559
  },
7488
7560
  "background": "#141911",
@@ -7541,6 +7613,11 @@
7541
7613
  "order": 131,
7542
7614
  "ansiSource": "Cobalt Next Dark + Aincrad",
7543
7615
  "booru": "alice_zuberg",
7616
+ "booruSites": {
7617
+ "zerochan": [
7618
+ "alice_schuberg"
7619
+ ]
7620
+ },
7544
7621
  "background": "#1b170c",
7545
7622
  "foreground": "#ede2c6",
7546
7623
  "cursor": "#e8d082",
@@ -7603,6 +7680,9 @@
7603
7680
  ],
7604
7681
  "yande": [
7605
7682
  "konno_yuuki"
7683
+ ],
7684
+ "zerochan": [
7685
+ "konno_yuuki"
7606
7686
  ]
7607
7687
  },
7608
7688
  "background": "#1b161d",
@@ -7890,6 +7970,9 @@
7890
7970
  "konachan": [
7891
7971
  "hanzou_urushihara",
7892
7972
  "urushihara_hanzo"
7973
+ ],
7974
+ "zerochan": [
7975
+ "urushihara_hanzo"
7893
7976
  ]
7894
7977
  },
7895
7978
  "background": "#1a161e",
@@ -8299,6 +8382,9 @@
8299
8382
  ],
8300
8383
  "yande": [
8301
8384
  "tet_(no_game_no_life)"
8385
+ ],
8386
+ "zerochan": [
8387
+ "tet_(no_game_no_life)"
8302
8388
  ]
8303
8389
  },
8304
8390
  "background": "#131913",
@@ -8592,6 +8678,9 @@
8592
8678
  ],
8593
8679
  "yande": [
8594
8680
  "hakase"
8681
+ ],
8682
+ "zerochan": [
8683
+ "shinonome_hakase"
8595
8684
  ]
8596
8685
  },
8597
8686
  "background": "#1f160d",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kecan0406/ttheme",
3
- "version": "1.0.49",
3
+ "version": "1.1.1",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "ttheme": "bin/ttheme.js"
@@ -36,6 +36,7 @@
36
36
  "@material/material-color-utilities": "^0.4.0",
37
37
  "@types/bun": "^1.3.0",
38
38
  "@types/pngjs": "6.0.5",
39
+ "fast-string-width": "^3.0.2",
39
40
  "jpeg-js": "^0.4.4",
40
41
  "pngjs": "7.0.0",
41
42
  "smol-toml": "^1.9.0",
@@ -437,13 +437,13 @@ __tt_pv_bg_find() {
437
437
  err=${${err//$'\n'/ }## #}
438
438
  resized=1 bgname="" bgshown="" bgdim=()
439
439
  if (( rc == 1 )); then
440
- msg=${err:-"find failed for $name"} msgt=300
440
+ msg=${err:-"Find failed for $name"} msgt=300
441
441
  fi
442
442
  (( rc == 0 )) || return 1
443
443
  unset "bgsrc[$name]"
444
444
  __tt_bg_load $name
445
445
  bgload[$name]="" bgedit[$name]=1
446
- msg=${err:-"background · $name"} msgt=200
446
+ msg=${err:-"Background · $name"} msgt=200
447
447
  return 0
448
448
  }
449
449
 
@@ -469,14 +469,14 @@ __tt_pv_bg_image() {
469
469
  unset "bgsrc[$name]"
470
470
  __tt_bg_load $name
471
471
  bgload[$name]="" bgedit[$name]=1
472
- msg=${err:-"background · $name"} msgt=$(( rc ? 300 : 200 ))
472
+ msg=${err:-"Background · $name"} msgt=$(( rc ? 300 : 200 ))
473
473
  [[ -r ${TTHEME_CONFIG:h}/backgrounds/${${name/@/--}/\//--}.conf ]] || return 0
474
474
  tune=$name tf=1 tsnap="${bgsize[$name]} ${bgpos[$name]} ${bgop[$name]} ${bgoff[$name]}"
475
475
  }
476
476
 
477
477
  __tt_pv_bg_panel() {
478
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)
479
+ local -a labs=(Size Position Opacity) at=(0 3 6)
480
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
481
481
  (( color )) || z= b= d= c=
482
482
  (( T < 8 )) && T=8
@@ -510,7 +510,7 @@ __tt_pv_bg_panel() {
510
510
  else
511
511
  if (( k == 1 )); then
512
512
  if [[ ${bgsize[$name]} == fill ]]; then
513
- knob=$(( T - 1 )) val=FILL
513
+ knob=$(( T - 1 )) val=fill
514
514
  else
515
515
  knob=$(( (${bgsize[$name]} - lo) * (T - 1) / (hi - lo + 1) )) val=${bgsize[$name]}%
516
516
  fi
@@ -549,12 +549,12 @@ __tt_pv_bg_save() {
549
549
  fi
550
550
  saved+=($name)
551
551
  if [[ ! -r ${TTHEME_CONFIG:h}/backgrounds/${${name/@/--}/\//--}.conf ]]; then
552
- msg="background · $name none"
552
+ msg="Background · $name none"
553
553
  elif (( bgoff[$name] )); then
554
- msg="background · $name off"
554
+ msg="Background · $name off"
555
555
  else
556
556
  __tt_bg_label $name
557
- msg="background · $name $REPLY"
557
+ msg="Background · $name $REPLY"
558
558
  fi
559
559
  if __tt_color; then
560
560
  printf '\033[2m%s\033[0m\n' "$msg"
package/shell/ttheme.zsh CHANGED
@@ -402,9 +402,9 @@ __tt_pin_save() {
402
402
  TTHEME_PIN=$key TTHEME_PIN_SPEC=${TTHEME_PALETTE[$name]}
403
403
  __tt_tilde "$key"
404
404
  if __tt_color; then
405
- printf '\033[2mpinned · %s → %s\033[0m\n' "$REPLY" "$name"
405
+ printf '\033[2mPinned · %s → %s\033[0m\n' "$REPLY" "$name"
406
406
  else
407
- print -r -- "pinned · $REPLY → $name"
407
+ print -r -- "Pinned · $REPLY → $name"
408
408
  fi
409
409
  }
410
410
 
@@ -420,9 +420,9 @@ __tt_unpin() {
420
420
  __tt_dir_sync
421
421
  __tt_tilde "$key"
422
422
  if __tt_color; then
423
- printf '\033[2munpinned · %s\033[0m\n' "$REPLY"
423
+ printf '\033[2mUnpinned · %s\033[0m\n' "$REPLY"
424
424
  else
425
- print -r -- "unpinned · $REPLY"
425
+ print -r -- "Unpinned · $REPLY"
426
426
  fi
427
427
  return 0
428
428
  done
@@ -474,7 +474,7 @@ __tt_menu() {
474
474
  for k in $reply; do
475
475
  grp=${TTHEME_GROUP[$k]:-Other}
476
476
  if [[ $grp != $last_grp ]]; then
477
- [[ $grp == *@* && $last_grp != *@* && -n $last_grp ]] && printf ' \033[2m── markets ──────────\033[0m\n'
477
+ [[ $grp == *@* && $last_grp != *@* && -n $last_grp ]] && printf ' \033[2m── Markets ──────────\033[0m\n'
478
478
  printf ' \033[1m%s\033[0m' "$grp"
479
479
  [[ -n ${TTHEME_NATIVE[$k]} ]] && printf ' \033[2m%s\033[0m' "${TTHEME_NATIVE[$k]}"
480
480
  printf '\n'
@@ -537,7 +537,7 @@ __tt_cli() {
537
537
  __tt_catalog() {
538
538
  local was
539
539
  __tt_cli "$@" || return
540
- [[ $1 == (list|share|market) ]] && return 0
540
+ [[ $1 == (list|share) ]] && return 0
541
541
  [[ -r $TTHEME_HOME/palettes.zsh ]] || return 0
542
542
  was="$TTHEME_STARTUP ${TTHEME_PALETTE[$TTHEME_STARTUP]}"
543
543
  __tt_palettes_load && __tt_reloaded
@@ -572,7 +572,7 @@ __tt_config() {
572
572
  blur=${(M)${(@f)"$(<$TTHEME_CONFIG)"}:#': ${TTHEME_BG_BLUR:='*}
573
573
  ${=${VISUAL:-${EDITOR:-vi}}} $TTHEME_CONFIG || return
574
574
  [[ ${(M)${(@f)"$(<$TTHEME_CONFIG)"}:#': ${TTHEME_BG_BLUR:='*} == "$blur" ]] || __tt_redraw
575
- print -r -- "settings apply in new tabs — $TTHEME_CONFIG"
575
+ print -r -- "Settings apply in new tabs — $TTHEME_CONFIG"
576
576
  }
577
577
 
578
578
  __tt_redraw() {
@@ -639,11 +639,11 @@ __tt_resolve() {
639
639
  return 0
640
640
  elif (( ${#m} > 1 )); then
641
641
  m=(${(o)m})
642
- print -u2 "multiple palettes start with '$name': $m"
642
+ print -u2 "ttheme: multiple palettes start with '$name': $m"
643
643
  elif m=(${(o)${(M)${(k)TTHEME_PALETTE}:#*$name*}}) && (( ${#m} )); then
644
- print -u2 "unknown palette '$name' — did you mean: ${(j:, :)m[1,3]}?"
644
+ print -u2 "ttheme: unknown palette '$name' — did you mean: ${(j:, :)m[1,3]}?"
645
645
  else
646
- print -u2 "unknown palette '$name' — run \`ttheme\` to list palettes"
646
+ print -u2 "ttheme: unknown palette '$name' — run \`ttheme\` to list palettes"
647
647
  fi
648
648
  return 1
649
649
  }
@@ -823,7 +823,7 @@ __tt_pv_row() {
823
823
  (( color )) && on=$sb
824
824
  fi
825
825
  if [[ ${rtype[$1]} == rule ]]; then
826
- name='── markets '
826
+ name='── Markets '
827
827
  REPLY=" "$d$name${(l:lw - 4 - ${#name}::─:)}$z
828
828
  return 0
829
829
  fi
@@ -893,9 +893,9 @@ __tt_pv_foot() {
893
893
  note=$REPLY
894
894
  (( pk == 2 )) && note+="/**"
895
895
  elif (( pk == 1 )); then
896
- note="until this tab closes"
896
+ note="Until this tab closes"
897
897
  else
898
- note="new tabs · the default palette"
898
+ note="New tabs · the default palette"
899
899
  fi
900
900
  kk=(enter) kl=(confirm)
901
901
  right=$b"esc"$z$d" back"$z
@@ -992,19 +992,19 @@ __tt_pv_foot() {
992
992
  __tt_pv_help() {
993
993
  local back="the tab" z=$'\e[0m' b=$'\e[1m' blank
994
994
  [[ -n ${TTHEME_PALETTE[$cn]} ]] && back=$cn
995
- local -a hk=(move series filter apply) hv=(
995
+ local -a hk=(Move Series Filter Apply) hv=(
996
996
  "↑↓ home end pgup pgdn"
997
997
  "←→ · enter or space on a series"
998
998
  "a-z 0-9 - · bksp · ctrl-u clears"
999
999
  "enter · esc restores $back"
1000
1000
  )
1001
1001
  if (( bgcw )); then
1002
- hk+=("tune bg" "" "" "" "")
1002
+ hk+=("Tune bg" "" "" "" "")
1003
1003
  hv+=("tab · finds one on the boorus, or takes your own, if none" "↑↓ field ←→ step ⇧←→ ×10 1-9 place" "space hides · = default · f adds one from the boorus or your own" "enter keeps · esc undoes" ", . other saved images · D removes this one")
1004
1004
  fi
1005
- hk+=(config "")
1005
+ hk+=(Config "")
1006
1006
  hv+=("alt-c · ↑↓ setting ←→ value" "enter saves · esc undoes")
1007
- hk+=(close)
1007
+ hk+=(Close)
1008
1008
  hv+=("? esc")
1009
1009
  (( color )) || z= b=
1010
1010
  local -i i r x y w hh
@@ -1020,7 +1020,7 @@ __tt_pv_help() {
1020
1020
  x=$(( (pw - w) / 2 + 1 )) y=$(( (ph - hh) / 2 ))
1021
1021
  (( y < 4 )) && y=4
1022
1022
  blank=${(l:w:: :)}
1023
- out+=$'\e['$y';'$x'H'"╭─ keys ${(l:$(( w - 9 ))::─:)}╮"
1023
+ out+=$'\e['$y';'$x'H'"╭─ Keys ${(l:$(( w - 9 ))::─:)}╮"
1024
1024
  for (( r = y + 1; r < y + hh - 1; r++ )); do
1025
1025
  out+=$'\e['$r';'$x'H'$blank$'\e['$r';'$x'H│'$'\e['$r';'$(( x + w - 1 ))'H│'
1026
1026
  done
@@ -1104,7 +1104,7 @@ __tt_pv_tune() {
1104
1104
  ;;
1105
1105
  $'\r'|$'\n')
1106
1106
  if [[ "${bgsize[$tune]} ${bgpos[$tune]} ${bgop[$tune]} ${bgoff[$tune]}" != "$tsnap" ]]; then
1107
- bgedit[$tune]=1 msg="kept · saved when preview closes" msgt=200
1107
+ bgedit[$tune]=1 msg="Kept · saved when preview closes" msgt=200
1108
1108
  fi
1109
1109
  tune=""
1110
1110
  ;;
@@ -1184,11 +1184,11 @@ __tt_pv_conf_save() {
1184
1184
  fi
1185
1185
  __tt_tilde "$TTHEME_CONFIG"
1186
1186
  if __tt_config_write "${pairs[@]}"; then
1187
- conf=0 msg="saved · $REPLY" msgt=200
1187
+ conf=0 msg="Saved · $REPLY" msgt=200
1188
1188
  (( ${pairs[(Ie)TTHEME_BG_BLUR]} )) && __tt_pv_redraw
1189
1189
  else
1190
1190
  __tt_pv_unconf
1191
- msg="could not write $REPLY" msgt=200
1191
+ msg="Could not write $REPLY" msgt=200
1192
1192
  fi
1193
1193
  }
1194
1194
 
@@ -1200,7 +1200,7 @@ __tt_pv_redraw() {
1200
1200
  done
1201
1201
  fi
1202
1202
  bgedit=()
1203
- msg="drawing the background pictures again" msgt=300
1203
+ msg="Drawing the background pictures again" msgt=300
1204
1204
  printf '\e[?2026h'
1205
1205
  __tt_pv_draw
1206
1206
  __tt_pv_bg_close
@@ -1208,7 +1208,7 @@ __tt_pv_redraw() {
1208
1208
  bgsrc=() resized=1 bgname="" bgshown="" bgdim=()
1209
1209
  __tt_reload
1210
1210
  (( $+functions[__tt_bg_refresh] )) && __tt_bg_refresh $TTHEME_ORDER
1211
- msg=${${out//$'\n'/ }:-"saved · no background pictures to draw"} msgt=300
1211
+ msg=${${out//$'\n'/ }:-"Saved · no background pictures to draw"} msgt=300
1212
1212
  }
1213
1213
 
1214
1214
  __tt_pv_conf_panel() {
@@ -1307,7 +1307,7 @@ __tt_pv_draw() {
1307
1307
  if (( pw < 40 || ph < 12 )); then
1308
1308
  line="ttheme preview"
1309
1309
  (( color )) && line=$'\e[1m'$ac$line$'\e[0m'
1310
- out+=$line$'\e[K\n'"needs 40×12 — now ${pw}×${ph}"$'\e[K\n'
1310
+ out+=$line$'\e[K\n'"Needs 40×12 — now ${pw}×${ph}"$'\e[K\n'
1311
1311
  line="esc quits"
1312
1312
  (( color )) && line=$'\e[2m'$line$'\e[0m'
1313
1313
  out+=$line$'\e[K\e[J'
@@ -1340,7 +1340,7 @@ __tt_pv_draw() {
1340
1340
  ex="${ex[1,gkeep]}▏"
1341
1341
  fi
1342
1342
  fi
1343
- line=" "$dd"search… e.g. $ex"$zz
1343
+ line=" "$dd"Search… e.g. $ex"$zz
1344
1344
  fi
1345
1345
  local tail=$'\e['$(( lw - ${#cnt} ))'G'$dd$cnt$zz
1346
1346
  [[ -n $flt ]] && tail=$'\e['$(( lw - ${#cnt} ))'G'$cnt
@@ -1357,7 +1357,7 @@ __tt_pv_draw() {
1357
1357
  line=""
1358
1358
  if (( k < h )); then
1359
1359
  if (( ! N )); then
1360
- (( k == 0 )) && line=" ${dd}no palettes match '$flt'$zz"
1360
+ (( k == 0 )) && line=" ${dd}No palettes match '$flt'$zz"
1361
1361
  elif (( i <= N )); then
1362
1362
  __tt_pv_row $i
1363
1363
  line=$REPLY
@@ -1370,20 +1370,20 @@ __tt_pv_draw() {
1370
1370
  __tt_pv_foot $(( split ? se : pw ))
1371
1371
  if (( split )); then
1372
1372
  if (( help && sw >= 48 )); then
1373
- __tt_pv_head 1 $sc $se keys
1373
+ __tt_pv_head 1 $sc $se Keys
1374
1374
  __tt_pv_help
1375
1375
  elif [[ -n $tune ]]; then
1376
1376
  (( bgoff[$tune] )) && state=off
1377
- src=background
1377
+ src=Background
1378
1378
  [[ -n ${bgfrom[$tune]} ]] && src+=" · ${bgfrom[$tune]}"
1379
- (( ${#tune} + ${#src} + 6 > sw )) && src=background
1379
+ (( ${#tune} + ${#src} + 6 > sw )) && src=Background
1380
1380
  __tt_pv_head 1 $sc $se $tune "$src" $state
1381
1381
  __tt_pv_bg_panel $tune 4 $sc $se
1382
1382
  elif (( conf )); then
1383
1383
  __tt_tilde "$TTHEME_CONFIG"
1384
1384
  src=$REPLY
1385
1385
  (( 8 + ${#src} > sw )) && src=""
1386
- __tt_pv_head 1 $sc $se config "" "$src"
1386
+ __tt_pv_head 1 $sc $se Config "" "$src"
1387
1387
  __tt_pv_conf_panel 4 $sc $se
1388
1388
  else
1389
1389
  [[ -n $an ]] && src=${TTHEME_SRC[$an]}
@@ -1395,13 +1395,13 @@ __tt_pv_draw() {
1395
1395
  else
1396
1396
  if [[ -n $tune ]]; then
1397
1397
  (( bgoff[$tune] )) && state=off
1398
- src=background
1398
+ src=Background
1399
1399
  [[ -n ${bgfrom[$tune]} ]] && src+=" · ${bgfrom[$tune]}"
1400
- (( ${#tune} + ${#src} + 6 > lw )) && src=background
1400
+ (( ${#tune} + ${#src} + 6 > lw )) && src=Background
1401
1401
  __tt_pv_head $(( ph - 9 )) 1 $lw $tune "$src" $state
1402
1402
  __tt_pv_bg_panel $tune $(( ph - 8 )) 1 $lw
1403
1403
  elif (( conf )); then
1404
- __tt_pv_head $(( ph - 7 )) 1 $lw config
1404
+ __tt_pv_head $(( ph - 7 )) 1 $lw Config
1405
1405
  __tt_pv_conf_panel $(( ph - 6 )) 1 $lw
1406
1406
  fi
1407
1407
  (( help )) && __tt_pv_help
@@ -1627,7 +1627,7 @@ __tt_pv_handle() {
1627
1627
  elif __tt_pv_bg_findable $name; then
1628
1628
  :
1629
1629
  elif (( bgcw )); then
1630
- msg="no background image for $name" msgt=200
1630
+ msg="No background image for $name" msgt=200
1631
1631
  fi
1632
1632
  ;;
1633
1633
  altc)
@@ -1672,19 +1672,19 @@ __tt_preview() {
1672
1672
  local -a bgorder=()
1673
1673
  local -A bgfrom=() bgsent=() bgcost=() bgdim=() bgsrc=() bgfill=() bgfocus=() bgsize=() bgpos=() bgop=() bgdef=() bgoff=() bgbase=() bgload=() bgshot=() bgshotkey=() bgedit=() bgtunef=() bgofff=() bgimages=()
1674
1674
  local conf=0 cf=1
1675
- local -a plabel=(" this tab " " default ") csnap=()
1676
- local -a cvars=(TTHEME_TAB_PALETTE TTHEME_ANNOUNCE TTHEME_FX TTHEME_SORT TTHEME_BG_BLUR) clabel=("new tabs" announce "search fx" sort blur)
1675
+ local -a plabel=(" This tab " " Default ") csnap=()
1676
+ local -a cvars=(TTHEME_TAB_PALETTE TTHEME_ANNOUNCE TTHEME_FX TTHEME_SORT TTHEME_BG_BLUR) clabel=("New tabs" Announce "Search fx" Sort Blur)
1677
1677
  local -a cchoice=("off seq" "1 0" "typewriter decode glitch" "abc series" "0 1 2 3 4") cshow=("off seq" "on off" "typewriter decode glitch" "abc series" "off 1px 2px 3px 4px")
1678
1678
  local -A cnote=(
1679
- TTHEME_TAB_PALETTE:seq "new tabs rotate through palettes" TTHEME_TAB_PALETTE:off "new tabs keep the terminal theme"
1680
- TTHEME_ANNOUNCE:1 "shows the palette notice" TTHEME_ANNOUNCE:0 "silences the palette notice"
1681
- TTHEME_FX:typewriter "the search hint types itself" TTHEME_FX:decode "the search hint decodes" TTHEME_FX:glitch "the search hint glitches in"
1682
- TTHEME_SORT:abc "series and palettes by name" TTHEME_SORT:series "series in the order added"
1683
- TTHEME_BG_BLUR:0 "pictures stay sharp" TTHEME_BG_BLUR:1 "pictures soften a little behind the text"
1684
- TTHEME_BG_BLUR:2 "pictures soften behind the text" TTHEME_BG_BLUR:3 "pictures blur behind the text"
1685
- TTHEME_BG_BLUR:4 "pictures blur well behind the text"
1679
+ TTHEME_TAB_PALETTE:seq "New tabs rotate through palettes" TTHEME_TAB_PALETTE:off "New tabs keep the terminal theme"
1680
+ TTHEME_ANNOUNCE:1 "Shows the palette notice" TTHEME_ANNOUNCE:0 "Silences the palette notice"
1681
+ TTHEME_FX:typewriter "The search hint types itself" TTHEME_FX:decode "The search hint decodes" TTHEME_FX:glitch "The search hint glitches in"
1682
+ TTHEME_SORT:abc "Series and palettes by name" TTHEME_SORT:series "Series in the order added"
1683
+ TTHEME_BG_BLUR:0 "Pictures stay sharp" TTHEME_BG_BLUR:1 "Pictures soften a little behind the text"
1684
+ TTHEME_BG_BLUR:2 "Pictures soften behind the text" TTHEME_BG_BLUR:3 "Pictures blur behind the text"
1685
+ TTHEME_BG_BLUR:4 "Pictures blur well behind the text"
1686
1686
  )
1687
- [[ $mode == pin ]] && pkdef=2 plabel=(" this directory " " and below ")
1687
+ [[ $mode == pin ]] && pkdef=2 plabel=(" This directory " " And below ")
1688
1688
  [[ $mode == init ]] && pkdef=2
1689
1689
  __tt_pv_canpick
1690
1690
  __tt_pv_size
@@ -1829,9 +1829,11 @@ if (( $+functions[compdef] )); then
1829
1829
  compadd -- add remove search init
1830
1830
  elif [[ $words[2] == market && $words[3] == (add|init) && CURRENT == 4 ]]; then
1831
1831
  _files -/
1832
+ elif [[ $words[2] == add && $words[CURRENT-1] == --market ]]; then
1833
+ _files -/
1832
1834
  elif [[ $words[2] == add ]]; then
1833
1835
  reply=(${${${(M)${(f)"$(__tt_cli list --json 2>/dev/null)"}:#*\"name\": *}#*\"name\": \"}%%\"*})
1834
- compadd -- ${reply:|TTHEME_ORDER}
1836
+ compadd -- --market ${reply:|TTHEME_ORDER}
1835
1837
  fi
1836
1838
  }
1837
1839
  compdef __tt_complete ttheme