@kecan0406/ttheme 1.2.28 → 1.2.29

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.28",
3
+ "version": "1.2.29",
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.28",
3
+ "version": "1.2.29",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "ttheme": "bin/ttheme.js"
@@ -145,12 +145,21 @@ __tt_ghostty_take() {
145
145
  rec=(${=${"$(<$TTHEME_GHOSTTY_TABS/$key)"}})
146
146
  [[ $rec[1] == "$ans[3]" ]] || TTHEME_GHOSTTY_IDLE=0
147
147
  pal=${rec[3]#-}
148
- [[ $rec[2] != - && -z $TTHEME_STARTUP ]] && pal=""
148
+ if [[ $rec[2] != - && -z $TTHEME_STARTUP ]]; then
149
+ pal=""
150
+ (( TTHEME_GHOSTTY_IDLE )) || __tt_ghostty_unpaint $key $rec[1] $rec[4]
151
+ fi
149
152
  [[ -n $pal && -n ${TTHEME_PALETTE[$pal]} ]] || return 0
150
153
  __tt_shown "$pal" force && __tt_reload_ghostty
151
154
  return 0
152
155
  }
153
156
 
157
+ __tt_ghostty_unpaint() {
158
+ [[ $3 == /dev/* && -w $3 ]] || return 0
159
+ { print -rn -- $'\e]104\e\\\e]110\e\\\e]111\e\\\e]112\e\\\e]117\e\\' >| $3 } 2>/dev/null || return 0
160
+ __tt_put $TTHEME_GHOSTTY_TABS/$1 "$2 - - $3" 2>/dev/null
161
+ }
162
+
154
163
  __tt_ghostty_tick() {
155
164
  local f key
156
165
  local -a at rec