@kecan0406/ttheme 1.2.25 → 1.2.27

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,6 +1,6 @@
1
1
  {
2
2
  "schema": 1,
3
- "version": "1.2.25",
3
+ "version": "1.2.27",
4
4
  "gate": [
5
5
  {
6
6
  "rule": "foreground",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kecan0406/ttheme",
3
- "version": "1.2.25",
3
+ "version": "1.2.27",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "ttheme": "bin/ttheme.js"
@@ -30,7 +30,12 @@
30
30
  "iterm2",
31
31
  "konsole",
32
32
  "warp",
33
- "windows-terminal"
33
+ "windows-terminal",
34
+ "color-scheme",
35
+ "terminal-theme",
36
+ "palette",
37
+ "anime",
38
+ "zsh"
34
39
  ],
35
40
  "devDependencies": {
36
41
  "@biomejs/biome": "^2.5.15",
package/shell/ttheme.zsh CHANGED
@@ -71,7 +71,7 @@ __tt_fresh() {
71
71
 
72
72
  __tt_prompt() {
73
73
  emulate -L zsh ${=${options[xtrace]:#off}:+-o xtrace}
74
- (( TTHEME_FRONT < 0 )) || TTHEME_FRONT=0
74
+ (( TTHEME_FRONT < 0 || ! TTHEME_RAN )) || TTHEME_FRONT=0
75
75
  [[ -n $TTHEME_SSH_SPEC ]] && __tt_ssh_back
76
76
  __tt_fresh
77
77
  }
@@ -98,7 +98,7 @@ __tt_gone() {
98
98
  __tt_off_here() {
99
99
  local bg=${TTHEME_SPEC%% *}
100
100
  TTHEME_SPEC=
101
- if __tt_shown "" || [[ $1 == reload ]]; then
101
+ if __tt_shown "" $1 || [[ $1 == force ]]; then
102
102
  __tt_reload
103
103
  fi
104
104
  __tt_unshown force
@@ -1379,7 +1379,7 @@ __tt_cli() {
1379
1379
  __tt_installs() {
1380
1380
  local was="$TTHEME_STARTUP ${TTHEME_PALETTE[$TTHEME_STARTUP]}"
1381
1381
  __tt_cli "$@" || return
1382
- [[ $1 == (list|share) ]] && return 0
1382
+ [[ $1 == share ]] && return 0
1383
1383
  __tt_installs_done "$was"
1384
1384
  }
1385
1385
 
@@ -1406,7 +1406,7 @@ __tt_switch() {
1406
1406
  return 0
1407
1407
  fi
1408
1408
  if [[ $1 == off ]]; then
1409
- __tt_off_here reload
1409
+ __tt_off_here force
1410
1410
  elif [[ -n $TTHEME_STARTUP ]]; then
1411
1411
  __tt_wear "${TTHEME_PALETTE[$TTHEME_STARTUP]}" "$TTHEME_STARTUP" force || __tt_reload
1412
1412
  fi
@@ -1568,7 +1568,7 @@ ttheme() {
1568
1568
  fi
1569
1569
 
1570
1570
  case $1 in
1571
- list|add|remove|update|marketplace|new) __tt_installs "$@"; return ;;
1571
+ add|update|marketplace|new) __tt_installs "$@"; return ;;
1572
1572
  edit|check|share)
1573
1573
  local REPLY
1574
1574
  __tt_name_of "$TTHEME_SPEC"
@@ -1614,7 +1614,7 @@ if (( ${+functions[compdef]} )); then
1614
1614
  local -a reply
1615
1615
  if (( CURRENT == 2 )); then
1616
1616
  compadd -- $TTHEME_VERBS help
1617
- elif [[ $words[2] == remove || ( $words[2] == (use|default|edit|check|share) && $CURRENT == 3 ) ]]; then
1617
+ elif [[ $words[2] == (use|default|edit|check|share) && $CURRENT == 3 ]]; then
1618
1618
  compadd -- $TTHEME_ORDER
1619
1619
  elif [[ $words[2] == new && $words[CURRENT-1] == --from ]]; then
1620
1620
  compadd -- $TTHEME_ORDER
@@ -1623,7 +1623,7 @@ if (( ${+functions[compdef]} )); then
1623
1623
  elif [[ $words[2] == new ]]; then
1624
1624
  compadd -- --from --in
1625
1625
  elif [[ $words[2] == marketplace && $CURRENT == 3 ]]; then
1626
- compadd -- add remove search init
1626
+ compadd -- add remove init
1627
1627
  elif [[ $words[2] == marketplace && $words[3] == (add|init) && $CURRENT == 4 ]]; then
1628
1628
  _files -/
1629
1629
  elif [[ $words[2] == (pin|unpin) && $CURRENT == 3 ]]; then
@@ -1638,11 +1638,6 @@ if (( ${+functions[compdef]} )); then
1638
1638
  _files -/
1639
1639
  [[ $words[2] == pin || ${#reply} -gt 0 ]] && compadd -S '' -- ssh:
1640
1640
  fi
1641
- elif [[ $words[2] == add && $words[CURRENT-1] == --marketplace ]]; then
1642
- _files -/
1643
- elif [[ $words[2] == add ]]; then
1644
- reply=(${${${(M)${(f)"$(__tt_cli list --json 2>/dev/null)"}:#*\"name\": *}#*\"name\": \"}%%\"*})
1645
- compadd -- --marketplace ${reply:|TTHEME_ORDER}
1646
1641
  fi
1647
1642
  }
1648
1643
  compdef __tt_complete ttheme