@kecan0406/ttheme 1.0.49 → 1.1.2

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.2",
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.2",
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"