@kecan0406/ttheme 0.1.0 → 0.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.
Files changed (585) hide show
  1. package/README.md +252 -42
  2. package/bin/ttheme.js +7053 -514
  3. package/dist/alacritty/config/dekomori.toml +8 -0
  4. package/dist/alacritty/config/geto.toml +8 -0
  5. package/dist/alacritty/config/gojo.toml +8 -0
  6. package/dist/alacritty/config/kumin.toml +8 -0
  7. package/dist/alacritty/config/megumi.toml +8 -0
  8. package/dist/alacritty/config/nanami.toml +8 -0
  9. package/dist/alacritty/config/nobara.toml +8 -0
  10. package/dist/alacritty/config/rikka.toml +8 -0
  11. package/dist/alacritty/config/shinka.toml +8 -0
  12. package/dist/alacritty/config/sukuna.toml +8 -0
  13. package/dist/alacritty/config/yuji.toml +8 -0
  14. package/dist/alacritty/config/yuuta.toml +8 -0
  15. package/dist/alacritty/themes/alma.toml +21 -21
  16. package/dist/alacritty/themes/anko.toml +22 -22
  17. package/dist/alacritty/themes/asuka.toml +22 -22
  18. package/dist/alacritty/themes/azusa.toml +22 -22
  19. package/dist/alacritty/themes/battler.toml +22 -22
  20. package/dist/alacritty/themes/beatrice.toml +22 -22
  21. package/dist/alacritty/themes/bernkastel.toml +21 -21
  22. package/dist/alacritty/themes/bocchi.toml +22 -22
  23. package/dist/alacritty/themes/cirno.toml +23 -23
  24. package/dist/alacritty/themes/david.toml +21 -21
  25. package/dist/alacritty/themes/dekomori.toml +34 -0
  26. package/dist/alacritty/themes/determination.toml +23 -23
  27. package/dist/alacritty/themes/dorothy.toml +22 -22
  28. package/dist/alacritty/themes/eva01.toml +22 -22
  29. package/dist/alacritty/themes/flandre.toml +22 -22
  30. package/dist/alacritty/themes/fox.toml +22 -22
  31. package/dist/alacritty/themes/geto.toml +34 -0
  32. package/dist/alacritty/themes/glitch.toml +23 -23
  33. package/dist/alacritty/themes/gojo.toml +34 -0
  34. package/dist/alacritty/themes/hinamizawa.toml +22 -22
  35. package/dist/alacritty/themes/hitagi.toml +22 -22
  36. package/dist/alacritty/themes/homura.toml +23 -23
  37. package/dist/alacritty/themes/jill.toml +22 -22
  38. package/dist/alacritty/themes/joker.toml +22 -22
  39. package/dist/alacritty/themes/jupiter.toml +22 -22
  40. package/dist/alacritty/themes/kagami.toml +23 -23
  41. package/dist/alacritty/themes/kaito.toml +23 -23
  42. package/dist/alacritty/themes/kaworu.toml +22 -22
  43. package/dist/alacritty/themes/kita.toml +22 -22
  44. package/dist/alacritty/themes/konata.toml +23 -23
  45. package/dist/alacritty/themes/kou.toml +23 -23
  46. package/dist/alacritty/themes/kumin.toml +34 -0
  47. package/dist/alacritty/themes/kumori.toml +23 -23
  48. package/dist/alacritty/themes/kurisu.toml +21 -21
  49. package/dist/alacritty/themes/kyoko.toml +22 -22
  50. package/dist/alacritty/themes/kyubey.toml +22 -22
  51. package/dist/alacritty/themes/lain.toml +22 -22
  52. package/dist/alacritty/themes/lambdadelta.toml +22 -22
  53. package/dist/alacritty/themes/len.toml +23 -23
  54. package/dist/alacritty/themes/lucy.toml +21 -21
  55. package/dist/alacritty/themes/luka.toml +22 -22
  56. package/dist/alacritty/themes/madoka.toml +21 -21
  57. package/dist/alacritty/themes/magi.toml +21 -21
  58. package/dist/alacritty/themes/mami.toml +23 -23
  59. package/dist/alacritty/themes/marisa.toml +23 -23
  60. package/dist/alacritty/themes/mars.toml +22 -22
  61. package/dist/alacritty/themes/mayuri.toml +22 -22
  62. package/dist/alacritty/themes/megumi.toml +34 -0
  63. package/dist/alacritty/themes/meiko.toml +23 -23
  64. package/dist/alacritty/themes/mercury.toml +21 -21
  65. package/dist/alacritty/themes/mettaton.toml +23 -23
  66. package/dist/alacritty/themes/miku.toml +22 -22
  67. package/dist/alacritty/themes/mio.toml +21 -21
  68. package/dist/alacritty/themes/mion.toml +22 -22
  69. package/dist/alacritty/themes/misato.toml +22 -22
  70. package/dist/alacritty/themes/miyuki.toml +23 -23
  71. package/dist/alacritty/themes/monika.toml +23 -23
  72. package/dist/alacritty/themes/moon.toml +21 -21
  73. package/dist/alacritty/themes/mugi.toml +21 -21
  74. package/dist/alacritty/themes/nadeko.toml +21 -21
  75. package/dist/alacritty/themes/nagisa.toml +21 -21
  76. package/dist/alacritty/themes/nanami.toml +34 -0
  77. package/dist/alacritty/themes/natsuki.toml +22 -22
  78. package/dist/alacritty/themes/nazuna.toml +22 -22
  79. package/dist/alacritty/themes/neutral.toml +20 -20
  80. package/dist/alacritty/themes/nightcity.toml +23 -23
  81. package/dist/alacritty/themes/nijika.toml +21 -21
  82. package/dist/alacritty/themes/nobara.toml +34 -0
  83. package/dist/alacritty/themes/oracle.toml +21 -21
  84. package/dist/alacritty/themes/panther.toml +22 -22
  85. package/dist/alacritty/themes/papyrus.toml +23 -23
  86. package/dist/alacritty/themes/patchouli.toml +22 -22
  87. package/dist/alacritty/themes/queen.toml +22 -22
  88. package/dist/alacritty/themes/rebecca.toml +22 -22
  89. package/dist/alacritty/themes/rei.toml +21 -21
  90. package/dist/alacritty/themes/reimu.toml +21 -21
  91. package/dist/alacritty/themes/rena.toml +22 -22
  92. package/dist/alacritty/themes/rika.toml +22 -22
  93. package/dist/alacritty/themes/rikka.toml +34 -0
  94. package/dist/alacritty/themes/rin.toml +23 -23
  95. package/dist/alacritty/themes/ritsu.toml +22 -22
  96. package/dist/alacritty/themes/rokkenjima.toml +21 -21
  97. package/dist/alacritty/themes/ryo.toml +22 -22
  98. package/dist/alacritty/themes/sans.toml +22 -22
  99. package/dist/alacritty/themes/satoko.toml +22 -22
  100. package/dist/alacritty/themes/sayaka.toml +22 -22
  101. package/dist/alacritty/themes/sayori.toml +23 -23
  102. package/dist/alacritty/themes/sei.toml +22 -22
  103. package/dist/alacritty/themes/seri.toml +22 -22
  104. package/dist/alacritty/themes/shinka.toml +34 -0
  105. package/dist/alacritty/themes/shinobu.toml +21 -21
  106. package/dist/alacritty/themes/skull.toml +22 -22
  107. package/dist/alacritty/themes/stella.toml +22 -22
  108. package/dist/alacritty/themes/sukuna.toml +34 -0
  109. package/dist/alacritty/themes/suzuha.toml +21 -21
  110. package/dist/alacritty/themes/toriel.toml +23 -23
  111. package/dist/alacritty/themes/tsubasa.toml +22 -22
  112. package/dist/alacritty/themes/tsukasa.toml +23 -23
  113. package/dist/alacritty/themes/undyne.toml +23 -23
  114. package/dist/alacritty/themes/valhalla.toml +22 -22
  115. package/dist/alacritty/themes/velvet.toml +22 -22
  116. package/dist/alacritty/themes/venus.toml +19 -19
  117. package/dist/alacritty/themes/yofukashi.toml +21 -21
  118. package/dist/alacritty/themes/youmu.toml +23 -23
  119. package/dist/alacritty/themes/yui.toml +22 -22
  120. package/dist/alacritty/themes/yuji.toml +34 -0
  121. package/dist/alacritty/themes/yuri.toml +23 -23
  122. package/dist/alacritty/themes/yuuta.toml +34 -0
  123. package/dist/ghostty/themes/alma +21 -21
  124. package/dist/ghostty/themes/anko +23 -23
  125. package/dist/ghostty/themes/asuka +23 -23
  126. package/dist/ghostty/themes/azusa +23 -23
  127. package/dist/ghostty/themes/battler +23 -23
  128. package/dist/ghostty/themes/beatrice +23 -23
  129. package/dist/ghostty/themes/bernkastel +21 -21
  130. package/dist/ghostty/themes/bocchi +23 -23
  131. package/dist/ghostty/themes/cirno +24 -24
  132. package/dist/ghostty/themes/david +21 -21
  133. package/dist/ghostty/themes/dekomori +29 -0
  134. package/dist/ghostty/themes/determination +24 -24
  135. package/dist/ghostty/themes/dorothy +23 -23
  136. package/dist/ghostty/themes/eva01 +23 -23
  137. package/dist/ghostty/themes/flandre +23 -23
  138. package/dist/ghostty/themes/fox +23 -23
  139. package/dist/ghostty/themes/geto +29 -0
  140. package/dist/ghostty/themes/glitch +24 -24
  141. package/dist/ghostty/themes/gojo +29 -0
  142. package/dist/ghostty/themes/hinamizawa +23 -23
  143. package/dist/ghostty/themes/hitagi +23 -23
  144. package/dist/ghostty/themes/homura +24 -24
  145. package/dist/ghostty/themes/jill +23 -23
  146. package/dist/ghostty/themes/joker +23 -23
  147. package/dist/ghostty/themes/jupiter +23 -23
  148. package/dist/ghostty/themes/kagami +24 -24
  149. package/dist/ghostty/themes/kaito +24 -24
  150. package/dist/ghostty/themes/kaworu +23 -23
  151. package/dist/ghostty/themes/kita +23 -23
  152. package/dist/ghostty/themes/konata +24 -24
  153. package/dist/ghostty/themes/kou +24 -24
  154. package/dist/ghostty/themes/kumin +29 -0
  155. package/dist/ghostty/themes/kumori +23 -23
  156. package/dist/ghostty/themes/kurisu +21 -21
  157. package/dist/ghostty/themes/kyoko +23 -23
  158. package/dist/ghostty/themes/kyubey +23 -23
  159. package/dist/ghostty/themes/lain +23 -23
  160. package/dist/ghostty/themes/lambdadelta +23 -23
  161. package/dist/ghostty/themes/len +24 -24
  162. package/dist/ghostty/themes/lucy +21 -21
  163. package/dist/ghostty/themes/luka +22 -22
  164. package/dist/ghostty/themes/madoka +21 -21
  165. package/dist/ghostty/themes/magi +21 -21
  166. package/dist/ghostty/themes/mami +24 -24
  167. package/dist/ghostty/themes/marisa +24 -24
  168. package/dist/ghostty/themes/mars +23 -23
  169. package/dist/ghostty/themes/mayuri +23 -23
  170. package/dist/ghostty/themes/megumi +29 -0
  171. package/dist/ghostty/themes/meiko +24 -24
  172. package/dist/ghostty/themes/mercury +21 -21
  173. package/dist/ghostty/themes/mettaton +24 -24
  174. package/dist/ghostty/themes/miku +22 -22
  175. package/dist/ghostty/themes/mio +21 -21
  176. package/dist/ghostty/themes/mion +23 -23
  177. package/dist/ghostty/themes/misato +23 -23
  178. package/dist/ghostty/themes/miyuki +24 -24
  179. package/dist/ghostty/themes/monika +24 -24
  180. package/dist/ghostty/themes/moon +21 -21
  181. package/dist/ghostty/themes/mugi +21 -21
  182. package/dist/ghostty/themes/nadeko +21 -21
  183. package/dist/ghostty/themes/nagisa +21 -21
  184. package/dist/ghostty/themes/nanami +29 -0
  185. package/dist/ghostty/themes/natsuki +22 -22
  186. package/dist/ghostty/themes/nazuna +23 -23
  187. package/dist/ghostty/themes/neutral +22 -22
  188. package/dist/ghostty/themes/nightcity +24 -24
  189. package/dist/ghostty/themes/nijika +21 -21
  190. package/dist/ghostty/themes/nobara +29 -0
  191. package/dist/ghostty/themes/oracle +21 -21
  192. package/dist/ghostty/themes/panther +23 -23
  193. package/dist/ghostty/themes/papyrus +24 -24
  194. package/dist/ghostty/themes/patchouli +23 -23
  195. package/dist/ghostty/themes/queen +23 -23
  196. package/dist/ghostty/themes/rebecca +23 -23
  197. package/dist/ghostty/themes/rei +21 -21
  198. package/dist/ghostty/themes/reimu +22 -22
  199. package/dist/ghostty/themes/rena +23 -23
  200. package/dist/ghostty/themes/rika +23 -23
  201. package/dist/ghostty/themes/rikka +29 -0
  202. package/dist/ghostty/themes/rin +24 -24
  203. package/dist/ghostty/themes/ritsu +23 -23
  204. package/dist/ghostty/themes/rokkenjima +21 -21
  205. package/dist/ghostty/themes/ryo +23 -23
  206. package/dist/ghostty/themes/sans +22 -22
  207. package/dist/ghostty/themes/satoko +23 -23
  208. package/dist/ghostty/themes/sayaka +23 -23
  209. package/dist/ghostty/themes/sayori +24 -24
  210. package/dist/ghostty/themes/sei +23 -23
  211. package/dist/ghostty/themes/seri +22 -22
  212. package/dist/ghostty/themes/shinka +29 -0
  213. package/dist/ghostty/themes/shinobu +21 -21
  214. package/dist/ghostty/themes/skull +23 -23
  215. package/dist/ghostty/themes/stella +23 -23
  216. package/dist/ghostty/themes/sukuna +29 -0
  217. package/dist/ghostty/themes/suzuha +21 -21
  218. package/dist/ghostty/themes/toriel +24 -24
  219. package/dist/ghostty/themes/tsubasa +23 -23
  220. package/dist/ghostty/themes/tsukasa +24 -24
  221. package/dist/ghostty/themes/undyne +24 -24
  222. package/dist/ghostty/themes/valhalla +23 -23
  223. package/dist/ghostty/themes/velvet +23 -23
  224. package/dist/ghostty/themes/venus +19 -19
  225. package/dist/ghostty/themes/yofukashi +21 -21
  226. package/dist/ghostty/themes/youmu +24 -24
  227. package/dist/ghostty/themes/yui +23 -23
  228. package/dist/ghostty/themes/yuji +29 -0
  229. package/dist/ghostty/themes/yuri +24 -24
  230. package/dist/ghostty/themes/yuuta +29 -0
  231. package/dist/iterm2/alma.itermcolors +65 -65
  232. package/dist/iterm2/anko.itermcolors +68 -68
  233. package/dist/iterm2/asuka.itermcolors +68 -68
  234. package/dist/iterm2/azusa.itermcolors +68 -68
  235. package/dist/iterm2/battler.itermcolors +65 -65
  236. package/dist/iterm2/beatrice.itermcolors +69 -69
  237. package/dist/iterm2/bernkastel.itermcolors +64 -64
  238. package/dist/iterm2/bocchi.itermcolors +69 -69
  239. package/dist/iterm2/cirno.itermcolors +69 -69
  240. package/dist/iterm2/david.itermcolors +61 -61
  241. package/dist/iterm2/dekomori.itermcolors +305 -0
  242. package/dist/iterm2/determination.itermcolors +63 -63
  243. package/dist/iterm2/dorothy.itermcolors +63 -63
  244. package/dist/iterm2/eva01.itermcolors +66 -66
  245. package/dist/iterm2/flandre.itermcolors +65 -65
  246. package/dist/iterm2/fox.itermcolors +68 -68
  247. package/dist/iterm2/geto.itermcolors +305 -0
  248. package/dist/iterm2/glitch.itermcolors +64 -64
  249. package/dist/iterm2/gojo.itermcolors +305 -0
  250. package/dist/iterm2/hinamizawa.itermcolors +65 -65
  251. package/dist/iterm2/hitagi.itermcolors +68 -68
  252. package/dist/iterm2/homura.itermcolors +65 -65
  253. package/dist/iterm2/jill.itermcolors +67 -67
  254. package/dist/iterm2/joker.itermcolors +65 -65
  255. package/dist/iterm2/jupiter.itermcolors +66 -66
  256. package/dist/iterm2/kagami.itermcolors +69 -69
  257. package/dist/iterm2/kaito.itermcolors +67 -67
  258. package/dist/iterm2/kaworu.itermcolors +68 -68
  259. package/dist/iterm2/kita.itermcolors +66 -66
  260. package/dist/iterm2/konata.itermcolors +69 -69
  261. package/dist/iterm2/kou.itermcolors +66 -66
  262. package/dist/iterm2/kumin.itermcolors +305 -0
  263. package/dist/iterm2/kumori.itermcolors +63 -63
  264. package/dist/iterm2/kurisu.itermcolors +64 -64
  265. package/dist/iterm2/kyoko.itermcolors +68 -68
  266. package/dist/iterm2/kyubey.itermcolors +69 -69
  267. package/dist/iterm2/lain.itermcolors +67 -67
  268. package/dist/iterm2/lambdadelta.itermcolors +64 -64
  269. package/dist/iterm2/len.itermcolors +68 -68
  270. package/dist/iterm2/lucy.itermcolors +66 -66
  271. package/dist/iterm2/luka.itermcolors +66 -66
  272. package/dist/iterm2/madoka.itermcolors +61 -61
  273. package/dist/iterm2/magi.itermcolors +66 -66
  274. package/dist/iterm2/mami.itermcolors +66 -66
  275. package/dist/iterm2/marisa.itermcolors +65 -65
  276. package/dist/iterm2/mars.itermcolors +68 -68
  277. package/dist/iterm2/mayuri.itermcolors +67 -67
  278. package/dist/iterm2/megumi.itermcolors +305 -0
  279. package/dist/iterm2/meiko.itermcolors +66 -66
  280. package/dist/iterm2/mercury.itermcolors +66 -66
  281. package/dist/iterm2/mettaton.itermcolors +68 -68
  282. package/dist/iterm2/miku.itermcolors +64 -64
  283. package/dist/iterm2/mio.itermcolors +66 -66
  284. package/dist/iterm2/mion.itermcolors +68 -68
  285. package/dist/iterm2/misato.itermcolors +63 -63
  286. package/dist/iterm2/miyuki.itermcolors +66 -66
  287. package/dist/iterm2/monika.itermcolors +68 -68
  288. package/dist/iterm2/moon.itermcolors +63 -63
  289. package/dist/iterm2/mugi.itermcolors +64 -64
  290. package/dist/iterm2/nadeko.itermcolors +60 -60
  291. package/dist/iterm2/nagisa.itermcolors +63 -63
  292. package/dist/iterm2/nanami.itermcolors +305 -0
  293. package/dist/iterm2/natsuki.itermcolors +62 -62
  294. package/dist/iterm2/nazuna.itermcolors +69 -69
  295. package/dist/iterm2/neutral.itermcolors +62 -62
  296. package/dist/iterm2/nightcity.itermcolors +63 -63
  297. package/dist/iterm2/nijika.itermcolors +60 -60
  298. package/dist/iterm2/nobara.itermcolors +305 -0
  299. package/dist/iterm2/oracle.itermcolors +64 -64
  300. package/dist/iterm2/panther.itermcolors +69 -69
  301. package/dist/iterm2/papyrus.itermcolors +67 -67
  302. package/dist/iterm2/patchouli.itermcolors +69 -69
  303. package/dist/iterm2/queen.itermcolors +63 -63
  304. package/dist/iterm2/rebecca.itermcolors +61 -61
  305. package/dist/iterm2/rei.itermcolors +63 -63
  306. package/dist/iterm2/reimu.itermcolors +66 -66
  307. package/dist/iterm2/rena.itermcolors +65 -65
  308. package/dist/iterm2/rika.itermcolors +65 -65
  309. package/dist/iterm2/rikka.itermcolors +305 -0
  310. package/dist/iterm2/rin.itermcolors +61 -61
  311. package/dist/iterm2/ritsu.itermcolors +67 -67
  312. package/dist/iterm2/rokkenjima.itermcolors +65 -65
  313. package/dist/iterm2/ryo.itermcolors +69 -69
  314. package/dist/iterm2/sans.itermcolors +63 -63
  315. package/dist/iterm2/satoko.itermcolors +69 -69
  316. package/dist/iterm2/sayaka.itermcolors +69 -69
  317. package/dist/iterm2/sayori.itermcolors +60 -60
  318. package/dist/iterm2/sei.itermcolors +63 -63
  319. package/dist/iterm2/seri.itermcolors +65 -65
  320. package/dist/iterm2/shinka.itermcolors +305 -0
  321. package/dist/iterm2/shinobu.itermcolors +63 -63
  322. package/dist/iterm2/skull.itermcolors +62 -62
  323. package/dist/iterm2/stella.itermcolors +62 -62
  324. package/dist/iterm2/sukuna.itermcolors +305 -0
  325. package/dist/iterm2/suzuha.itermcolors +64 -64
  326. package/dist/iterm2/toriel.itermcolors +63 -63
  327. package/dist/iterm2/tsubasa.itermcolors +69 -69
  328. package/dist/iterm2/tsukasa.itermcolors +66 -66
  329. package/dist/iterm2/undyne.itermcolors +69 -69
  330. package/dist/iterm2/valhalla.itermcolors +68 -68
  331. package/dist/iterm2/velvet.itermcolors +67 -67
  332. package/dist/iterm2/venus.itermcolors +57 -57
  333. package/dist/iterm2/yofukashi.itermcolors +64 -64
  334. package/dist/iterm2/youmu.itermcolors +69 -69
  335. package/dist/iterm2/yui.itermcolors +67 -67
  336. package/dist/iterm2/yuji.itermcolors +305 -0
  337. package/dist/iterm2/yuri.itermcolors +65 -65
  338. package/dist/iterm2/yuuta.itermcolors +305 -0
  339. package/dist/kitty/config/dekomori.conf +4 -0
  340. package/dist/kitty/config/geto.conf +4 -0
  341. package/dist/kitty/config/gojo.conf +4 -0
  342. package/dist/kitty/config/kumin.conf +4 -0
  343. package/dist/kitty/config/megumi.conf +4 -0
  344. package/dist/kitty/config/nanami.conf +4 -0
  345. package/dist/kitty/config/nobara.conf +4 -0
  346. package/dist/kitty/config/rikka.conf +4 -0
  347. package/dist/kitty/config/shinka.conf +4 -0
  348. package/dist/kitty/config/sukuna.conf +4 -0
  349. package/dist/kitty/config/yuji.conf +4 -0
  350. package/dist/kitty/config/yuuta.conf +4 -0
  351. package/dist/kitty/themes/alma.conf +21 -21
  352. package/dist/kitty/themes/anko.conf +22 -22
  353. package/dist/kitty/themes/asuka.conf +22 -22
  354. package/dist/kitty/themes/azusa.conf +22 -22
  355. package/dist/kitty/themes/battler.conf +22 -22
  356. package/dist/kitty/themes/beatrice.conf +22 -22
  357. package/dist/kitty/themes/bernkastel.conf +21 -21
  358. package/dist/kitty/themes/bocchi.conf +22 -22
  359. package/dist/kitty/themes/cirno.conf +23 -23
  360. package/dist/kitty/themes/david.conf +21 -21
  361. package/dist/kitty/themes/dekomori.conf +24 -0
  362. package/dist/kitty/themes/determination.conf +23 -23
  363. package/dist/kitty/themes/dorothy.conf +22 -22
  364. package/dist/kitty/themes/eva01.conf +22 -22
  365. package/dist/kitty/themes/flandre.conf +22 -22
  366. package/dist/kitty/themes/fox.conf +22 -22
  367. package/dist/kitty/themes/geto.conf +24 -0
  368. package/dist/kitty/themes/glitch.conf +23 -23
  369. package/dist/kitty/themes/gojo.conf +24 -0
  370. package/dist/kitty/themes/hinamizawa.conf +22 -22
  371. package/dist/kitty/themes/hitagi.conf +22 -22
  372. package/dist/kitty/themes/homura.conf +23 -23
  373. package/dist/kitty/themes/jill.conf +22 -22
  374. package/dist/kitty/themes/joker.conf +22 -22
  375. package/dist/kitty/themes/jupiter.conf +22 -22
  376. package/dist/kitty/themes/kagami.conf +23 -23
  377. package/dist/kitty/themes/kaito.conf +23 -23
  378. package/dist/kitty/themes/kaworu.conf +22 -22
  379. package/dist/kitty/themes/kita.conf +22 -22
  380. package/dist/kitty/themes/konata.conf +23 -23
  381. package/dist/kitty/themes/kou.conf +23 -23
  382. package/dist/kitty/themes/kumin.conf +24 -0
  383. package/dist/kitty/themes/kumori.conf +23 -23
  384. package/dist/kitty/themes/kurisu.conf +21 -21
  385. package/dist/kitty/themes/kyoko.conf +22 -22
  386. package/dist/kitty/themes/kyubey.conf +22 -22
  387. package/dist/kitty/themes/lain.conf +22 -22
  388. package/dist/kitty/themes/lambdadelta.conf +22 -22
  389. package/dist/kitty/themes/len.conf +23 -23
  390. package/dist/kitty/themes/lucy.conf +21 -21
  391. package/dist/kitty/themes/luka.conf +22 -22
  392. package/dist/kitty/themes/madoka.conf +21 -21
  393. package/dist/kitty/themes/magi.conf +21 -21
  394. package/dist/kitty/themes/mami.conf +23 -23
  395. package/dist/kitty/themes/marisa.conf +23 -23
  396. package/dist/kitty/themes/mars.conf +22 -22
  397. package/dist/kitty/themes/mayuri.conf +22 -22
  398. package/dist/kitty/themes/megumi.conf +24 -0
  399. package/dist/kitty/themes/meiko.conf +23 -23
  400. package/dist/kitty/themes/mercury.conf +21 -21
  401. package/dist/kitty/themes/mettaton.conf +23 -23
  402. package/dist/kitty/themes/miku.conf +22 -22
  403. package/dist/kitty/themes/mio.conf +21 -21
  404. package/dist/kitty/themes/mion.conf +22 -22
  405. package/dist/kitty/themes/misato.conf +22 -22
  406. package/dist/kitty/themes/miyuki.conf +23 -23
  407. package/dist/kitty/themes/monika.conf +23 -23
  408. package/dist/kitty/themes/moon.conf +21 -21
  409. package/dist/kitty/themes/mugi.conf +21 -21
  410. package/dist/kitty/themes/nadeko.conf +21 -21
  411. package/dist/kitty/themes/nagisa.conf +21 -21
  412. package/dist/kitty/themes/nanami.conf +24 -0
  413. package/dist/kitty/themes/natsuki.conf +22 -22
  414. package/dist/kitty/themes/nazuna.conf +22 -22
  415. package/dist/kitty/themes/neutral.conf +20 -20
  416. package/dist/kitty/themes/nightcity.conf +23 -23
  417. package/dist/kitty/themes/nijika.conf +21 -21
  418. package/dist/kitty/themes/nobara.conf +24 -0
  419. package/dist/kitty/themes/oracle.conf +21 -21
  420. package/dist/kitty/themes/panther.conf +22 -22
  421. package/dist/kitty/themes/papyrus.conf +23 -23
  422. package/dist/kitty/themes/patchouli.conf +22 -22
  423. package/dist/kitty/themes/queen.conf +22 -22
  424. package/dist/kitty/themes/rebecca.conf +22 -22
  425. package/dist/kitty/themes/rei.conf +21 -21
  426. package/dist/kitty/themes/reimu.conf +21 -21
  427. package/dist/kitty/themes/rena.conf +22 -22
  428. package/dist/kitty/themes/rika.conf +22 -22
  429. package/dist/kitty/themes/rikka.conf +24 -0
  430. package/dist/kitty/themes/rin.conf +23 -23
  431. package/dist/kitty/themes/ritsu.conf +22 -22
  432. package/dist/kitty/themes/rokkenjima.conf +21 -21
  433. package/dist/kitty/themes/ryo.conf +22 -22
  434. package/dist/kitty/themes/sans.conf +22 -22
  435. package/dist/kitty/themes/satoko.conf +22 -22
  436. package/dist/kitty/themes/sayaka.conf +22 -22
  437. package/dist/kitty/themes/sayori.conf +23 -23
  438. package/dist/kitty/themes/sei.conf +22 -22
  439. package/dist/kitty/themes/seri.conf +22 -22
  440. package/dist/kitty/themes/shinka.conf +24 -0
  441. package/dist/kitty/themes/shinobu.conf +21 -21
  442. package/dist/kitty/themes/skull.conf +22 -22
  443. package/dist/kitty/themes/stella.conf +22 -22
  444. package/dist/kitty/themes/sukuna.conf +24 -0
  445. package/dist/kitty/themes/suzuha.conf +21 -21
  446. package/dist/kitty/themes/toriel.conf +23 -23
  447. package/dist/kitty/themes/tsubasa.conf +22 -22
  448. package/dist/kitty/themes/tsukasa.conf +23 -23
  449. package/dist/kitty/themes/undyne.conf +23 -23
  450. package/dist/kitty/themes/valhalla.conf +22 -22
  451. package/dist/kitty/themes/velvet.conf +22 -22
  452. package/dist/kitty/themes/venus.conf +19 -19
  453. package/dist/kitty/themes/yofukashi.conf +21 -21
  454. package/dist/kitty/themes/youmu.conf +23 -23
  455. package/dist/kitty/themes/yui.conf +22 -22
  456. package/dist/kitty/themes/yuji.conf +24 -0
  457. package/dist/kitty/themes/yuri.conf +23 -23
  458. package/dist/kitty/themes/yuuta.conf +24 -0
  459. package/dist/manifest.json +5139 -0
  460. package/dist/shell/palettes.zsh +297 -113
  461. package/dist/wezterm/colors/alma.toml +7 -7
  462. package/dist/wezterm/colors/anko.toml +9 -9
  463. package/dist/wezterm/colors/asuka.toml +9 -9
  464. package/dist/wezterm/colors/azusa.toml +9 -9
  465. package/dist/wezterm/colors/battler.toml +9 -9
  466. package/dist/wezterm/colors/beatrice.toml +9 -9
  467. package/dist/wezterm/colors/bernkastel.toml +7 -7
  468. package/dist/wezterm/colors/bocchi.toml +9 -9
  469. package/dist/wezterm/colors/cirno.toml +10 -10
  470. package/dist/wezterm/colors/david.toml +7 -7
  471. package/dist/wezterm/colors/dekomori.toml +15 -0
  472. package/dist/wezterm/colors/determination.toml +9 -9
  473. package/dist/wezterm/colors/dorothy.toml +9 -9
  474. package/dist/wezterm/colors/eva01.toml +9 -9
  475. package/dist/wezterm/colors/flandre.toml +9 -9
  476. package/dist/wezterm/colors/fox.toml +9 -9
  477. package/dist/wezterm/colors/geto.toml +15 -0
  478. package/dist/wezterm/colors/glitch.toml +9 -9
  479. package/dist/wezterm/colors/gojo.toml +15 -0
  480. package/dist/wezterm/colors/hinamizawa.toml +9 -9
  481. package/dist/wezterm/colors/hitagi.toml +9 -9
  482. package/dist/wezterm/colors/homura.toml +10 -10
  483. package/dist/wezterm/colors/jill.toml +9 -9
  484. package/dist/wezterm/colors/joker.toml +9 -9
  485. package/dist/wezterm/colors/jupiter.toml +9 -9
  486. package/dist/wezterm/colors/kagami.toml +10 -10
  487. package/dist/wezterm/colors/kaito.toml +9 -9
  488. package/dist/wezterm/colors/kaworu.toml +9 -9
  489. package/dist/wezterm/colors/kita.toml +9 -9
  490. package/dist/wezterm/colors/konata.toml +10 -10
  491. package/dist/wezterm/colors/kou.toml +10 -10
  492. package/dist/wezterm/colors/kumin.toml +15 -0
  493. package/dist/wezterm/colors/kumori.toml +8 -8
  494. package/dist/wezterm/colors/kurisu.toml +7 -7
  495. package/dist/wezterm/colors/kyoko.toml +9 -9
  496. package/dist/wezterm/colors/kyubey.toml +9 -9
  497. package/dist/wezterm/colors/lain.toml +9 -9
  498. package/dist/wezterm/colors/lambdadelta.toml +9 -9
  499. package/dist/wezterm/colors/len.toml +9 -9
  500. package/dist/wezterm/colors/lucy.toml +7 -7
  501. package/dist/wezterm/colors/luka.toml +7 -7
  502. package/dist/wezterm/colors/madoka.toml +7 -7
  503. package/dist/wezterm/colors/magi.toml +7 -7
  504. package/dist/wezterm/colors/mami.toml +10 -10
  505. package/dist/wezterm/colors/marisa.toml +10 -10
  506. package/dist/wezterm/colors/mars.toml +9 -9
  507. package/dist/wezterm/colors/mayuri.toml +9 -9
  508. package/dist/wezterm/colors/megumi.toml +15 -0
  509. package/dist/wezterm/colors/meiko.toml +9 -9
  510. package/dist/wezterm/colors/mercury.toml +7 -7
  511. package/dist/wezterm/colors/mettaton.toml +9 -9
  512. package/dist/wezterm/colors/miku.toml +7 -7
  513. package/dist/wezterm/colors/mio.toml +7 -7
  514. package/dist/wezterm/colors/mion.toml +9 -9
  515. package/dist/wezterm/colors/misato.toml +9 -9
  516. package/dist/wezterm/colors/miyuki.toml +10 -10
  517. package/dist/wezterm/colors/monika.toml +9 -9
  518. package/dist/wezterm/colors/moon.toml +7 -7
  519. package/dist/wezterm/colors/mugi.toml +7 -7
  520. package/dist/wezterm/colors/nadeko.toml +7 -7
  521. package/dist/wezterm/colors/nagisa.toml +7 -7
  522. package/dist/wezterm/colors/nanami.toml +15 -0
  523. package/dist/wezterm/colors/natsuki.toml +7 -7
  524. package/dist/wezterm/colors/nazuna.toml +9 -9
  525. package/dist/wezterm/colors/neutral.toml +7 -7
  526. package/dist/wezterm/colors/nightcity.toml +10 -10
  527. package/dist/wezterm/colors/nijika.toml +7 -7
  528. package/dist/wezterm/colors/nobara.toml +15 -0
  529. package/dist/wezterm/colors/oracle.toml +7 -7
  530. package/dist/wezterm/colors/panther.toml +9 -9
  531. package/dist/wezterm/colors/papyrus.toml +9 -9
  532. package/dist/wezterm/colors/patchouli.toml +9 -9
  533. package/dist/wezterm/colors/queen.toml +9 -9
  534. package/dist/wezterm/colors/rebecca.toml +9 -9
  535. package/dist/wezterm/colors/rei.toml +7 -7
  536. package/dist/wezterm/colors/reimu.toml +9 -9
  537. package/dist/wezterm/colors/rena.toml +9 -9
  538. package/dist/wezterm/colors/rika.toml +9 -9
  539. package/dist/wezterm/colors/rikka.toml +15 -0
  540. package/dist/wezterm/colors/rin.toml +9 -9
  541. package/dist/wezterm/colors/ritsu.toml +9 -9
  542. package/dist/wezterm/colors/rokkenjima.toml +7 -7
  543. package/dist/wezterm/colors/ryo.toml +9 -9
  544. package/dist/wezterm/colors/sans.toml +7 -7
  545. package/dist/wezterm/colors/satoko.toml +9 -9
  546. package/dist/wezterm/colors/sayaka.toml +9 -9
  547. package/dist/wezterm/colors/sayori.toml +9 -9
  548. package/dist/wezterm/colors/sei.toml +9 -9
  549. package/dist/wezterm/colors/seri.toml +8 -8
  550. package/dist/wezterm/colors/shinka.toml +15 -0
  551. package/dist/wezterm/colors/shinobu.toml +7 -7
  552. package/dist/wezterm/colors/skull.toml +9 -9
  553. package/dist/wezterm/colors/stella.toml +9 -9
  554. package/dist/wezterm/colors/sukuna.toml +15 -0
  555. package/dist/wezterm/colors/suzuha.toml +7 -7
  556. package/dist/wezterm/colors/toriel.toml +9 -9
  557. package/dist/wezterm/colors/tsubasa.toml +9 -9
  558. package/dist/wezterm/colors/tsukasa.toml +10 -10
  559. package/dist/wezterm/colors/undyne.toml +9 -9
  560. package/dist/wezterm/colors/valhalla.toml +9 -9
  561. package/dist/wezterm/colors/velvet.toml +9 -9
  562. package/dist/wezterm/colors/venus.toml +6 -6
  563. package/dist/wezterm/colors/yofukashi.toml +7 -7
  564. package/dist/wezterm/colors/youmu.toml +10 -10
  565. package/dist/wezterm/colors/yui.toml +9 -9
  566. package/dist/wezterm/colors/yuji.toml +15 -0
  567. package/dist/wezterm/colors/yuri.toml +9 -9
  568. package/dist/wezterm/colors/yuuta.toml +15 -0
  569. package/dist/wezterm/config/dekomori.lua +10 -0
  570. package/dist/wezterm/config/geto.lua +10 -0
  571. package/dist/wezterm/config/gojo.lua +10 -0
  572. package/dist/wezterm/config/kumin.lua +10 -0
  573. package/dist/wezterm/config/megumi.lua +10 -0
  574. package/dist/wezterm/config/nanami.lua +10 -0
  575. package/dist/wezterm/config/nobara.lua +10 -0
  576. package/dist/wezterm/config/rikka.lua +10 -0
  577. package/dist/wezterm/config/shinka.lua +10 -0
  578. package/dist/wezterm/config/sukuna.lua +10 -0
  579. package/dist/wezterm/config/yuji.lua +10 -0
  580. package/dist/wezterm/config/yuuta.lua +10 -0
  581. package/package.json +7 -1
  582. package/shell/adapters/_osc.zsh +34 -5
  583. package/shell/adapters/ghostty.zsh +509 -0
  584. package/shell/adapters/kitty.zsh +4 -3
  585. package/shell/ttheme.zsh +1086 -204
@@ -0,0 +1,509 @@
1
+ __tt_reload() {
2
+ local pid=$PPID ppid comm
3
+ while (( pid > 1 )); do
4
+ read -r ppid comm <<< "$(ps -o ppid=,comm= -p $pid)"
5
+ if [[ ${comm:t} == ghostty ]]; then
6
+ kill -USR2 $pid
7
+ return
8
+ fi
9
+ pid=$ppid
10
+ done
11
+ pkill -USR2 -x ghostty 2>/dev/null
12
+ }
13
+
14
+ typeset -ga TTHEME_BG_POSITIONS=(top-left top-center top-right center-left center center-right bottom-left bottom-center bottom-right)
15
+
16
+ __tt_b64() {
17
+ local t=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/ out="" i n
18
+ local -a b=("$@")
19
+ for (( i = 1; i <= ${#b}; i += 3 )); do
20
+ n=$(( (b[i] << 16) | (${b[i+1]:-0} << 8) | ${b[i+2]:-0} ))
21
+ out+=${t:$(( (n >> 18) & 63 )):1}${t:$(( (n >> 12) & 63 )):1}
22
+ if (( i + 1 <= ${#b} )); then out+=${t:$(( (n >> 6) & 63 )):1}; else out+='='; fi
23
+ if (( i + 2 <= ${#b} )); then out+=${t:$(( n & 63 )):1}; else out+='='; fi
24
+ done
25
+ REPLY=$out
26
+ }
27
+
28
+ __tt_bg_frame() {
29
+ local -i iw=$1 ih=$2 W=$3 H=$4 s=$5 ax=$(( ($6 - 1) % 3 )) ay=$(( ($6 - 1) / 3 )) f=${8:--1} wide dw dh ox oy
30
+ wide=$(( W * ih >= H * iw ))
31
+ [[ $7 == contain ]] && wide=$(( ! wide ))
32
+ if (( wide )); then
33
+ dw=$(( s * W / 100 )) dh=$(( s * W * ih / (100 * iw) ))
34
+ else
35
+ dh=$(( s * H / 100 )) dw=$(( s * H * iw / (100 * ih) ))
36
+ fi
37
+ ox=$(( ax * (W - dw) / 2 )) oy=$(( ay * (H - dh) / 2 ))
38
+ if (( f >= 0 )); then
39
+ (( dw > W )) && ox=$(( (W - dw) / 2 ))
40
+ if (( dh > H )); then
41
+ oy=$(( H / 2 - f * dh / 100 ))
42
+ (( oy > 0 )) && oy=0
43
+ (( oy < H - dh )) && oy=$(( H - dh ))
44
+ fi
45
+ fi
46
+ REPLY="$dw $dh $ox $oy"
47
+ }
48
+
49
+ __tt_bg_place() {
50
+ local -i cw=$5 ch=$6 W=$(( $3 * $5 )) H=$(( $4 * $6 )) dw dh sx sy c0 c1 r0 r1
51
+ local -a fr
52
+ __tt_bg_frame $1 $2 $W $H $7 $8 $9 ${10:--1}
53
+ fr=(${=REPLY})
54
+ dw=$fr[1] dh=$fr[2] sx=$fr[3] sy=$fr[4]
55
+ c0=$(( ((sx > 0 ? sx : 0) + cw - 1) / cw )) c1=$(( (sx + dw < W ? sx + dw : W) / cw ))
56
+ r0=$(( ((sy > 0 ? sy : 0) + ch - 1) / ch )) r1=$(( (sy + dh < H ? sy + dh : H) / ch ))
57
+ (( c1 > c0 && r1 > r0 )) || return 1
58
+ REPLY="$(( c0 + 1 )) $(( r0 + 1 )) $(( c1 - c0 )) $(( r1 - r0 )) $(( (c0 * cw - sx) * $1 / dw )) $(( (r0 * ch - sy) * $2 / dh )) $(( (c1 - c0) * cw * $1 / dw )) $(( (r1 - r0) * ch * $2 / dh ))"
59
+ }
60
+
61
+ __tt_bg_at() {
62
+ local src=""
63
+ (( $# > 7 )) && src=",x=$8,y=$9,w=${10},h=${11}"
64
+ if (( bgrel )); then
65
+ printf '\e_Ga=p,i=%d,p=%d,P=999999,Q=1,H=%d,V=%d,c=%d,r=%d%s,C=1,z=%d,q=2\e\\' $1 $2 $(( $4 - bgmx )) $(( $5 - bgmy )) $6 $7 "$src" $3
66
+ else
67
+ printf '\e[%d;%dH\e_Ga=p,i=%d,p=%d,c=%d,r=%d%s,C=1,z=%d,q=2\e\\' $(( $5 + 1 )) $(( $4 + 1 )) $1 $2 $6 $7 "$src" $3
68
+ fi
69
+ }
70
+
71
+ __tt_bg_path() {
72
+ local p=${${1#\"}%\"}
73
+ p=${p/#\~\//$HOME/}
74
+ [[ -z $p || $p == /* ]] || p=${TTHEME_CONFIG:h}/backgrounds/$p
75
+ REPLY=$p
76
+ }
77
+
78
+ __tt_bg_load() {
79
+ local name=$1 dir=${TTHEME_CONFIG:h}/backgrounds img="" fit=contain op=1 pos=center f line stem="" size=100 REPLY
80
+ local -i at=5
81
+ local -a fills
82
+ (( ${+bgsrc[$name]} )) && return 0
83
+ bgfrom[$name]=""
84
+ for f in $dir/$name.conf $dir/$name.tune.conf; do
85
+ if [[ -r $f ]]; then
86
+ for line in "${(@f)$(<$f)}"; do
87
+ case $line in
88
+ '# from '*) [[ $f == *.tune.conf ]] || bgfrom[$name]=${(j: :)${${=line#\# from }[1,2]}} ;;
89
+ 'background-image = '*|'background-image='*) img=${${line#*=}# } ;;
90
+ 'background-image-fit = '*|'background-image-fit='*) fit=${${line#*=}# } ;;
91
+ 'background-image-opacity = '*|'background-image-opacity='*) op=${${line#*=}# } ;;
92
+ 'background-image-position = '*|'background-image-position='*) pos=${${line#*=}# } ;;
93
+ esac
94
+ done
95
+ fi
96
+ [[ $op == <->(|.<->) ]] || op=1
97
+ [[ $pos == center-center ]] && pos=center
98
+ at=${TTHEME_BG_POSITIONS[(Ie)$pos]}
99
+ (( at )) || at=5
100
+ __tt_bg_path "$img"
101
+ size=100 stem=""
102
+ case $REPLY in
103
+ *@fill-<0-100>.png) stem=${REPLY%@fill-*} size=fill ;;
104
+ *@<101-999>-*-<->x<->.png|*@<20-99>-*.png) stem=${REPLY%@*} size=${${REPLY##*@}%%-*} ;;
105
+ *.png) stem=${REPLY%.png}; [[ $fit == cover ]] && size=fill ;;
106
+ esac
107
+ [[ $f == *.tune.conf ]] || bgdef[$name]="$size $at $op" bgbase[$name]=$REPLY
108
+ done
109
+ bgsize[$name]=$size bgpos[$name]=$at bgop[$name]=$op bgoff[$name]=0 bgshot[$name]="" bgshotkey[$name]="" bgfocus[$name]=50
110
+ [[ -e $dir/$name.off.conf ]] && bgoff[$name]=1
111
+ bgload[$name]="$size $at $op ${bgoff[$name]}"
112
+ [[ $size == <101-> ]] && bgshot[$name]=$REPLY bgshotkey[$name]="$size $at"
113
+ if [[ -n $stem ]]; then
114
+ bgsrc[$name]=$stem.png bgfill[$name]=$stem.png
115
+ fills=($stem@fill-<0-100>.png(N))
116
+ (( ${#fills} )) && bgfill[$name]=$fills[1] bgfocus[$name]=${${fills[1]##*@fill-}%.png}
117
+ else
118
+ bgsrc[$name]=$REPLY bgfill[$name]=$REPLY
119
+ fi
120
+ }
121
+
122
+ __tt_bg_image() {
123
+ REPLY=${bgsrc[$1]}
124
+ [[ ${bgsize[$1]} == fill ]] && REPLY=${bgfill[$1]}
125
+ }
126
+
127
+ __tt_bg_label() {
128
+ local size=${bgsize[$1]}
129
+ [[ $size == fill ]] || size+=%
130
+ REPLY="$size · ${TTHEME_BG_POSITIONS[${bgpos[$1]}]} · ${bgop[$1]}"
131
+ }
132
+
133
+ __tt_bg_dim() {
134
+ local img=$1
135
+ local -a d
136
+ [[ -n $img && -r $img ]] || return 1
137
+ if [[ -z ${bgdim[$img]} ]]; then
138
+ d=($(od -An -N24 -tu1 -- $img 2>/dev/null))
139
+ if (( ${#d} == 24 && d[1] == 137 && d[2] == 80 && d[3] == 78 && d[4] == 71 )); then
140
+ bgdim[$img]="$(( (d[17] << 24) | (d[18] << 16) | (d[19] << 8) | d[20] )) $(( (d[21] << 24) | (d[22] << 16) | (d[23] << 8) | d[24] ))"
141
+ else
142
+ bgdim[$img]=-
143
+ fi
144
+ fi
145
+ [[ ${bgdim[$img]} != - ]]
146
+ }
147
+
148
+ __tt_bg_bake() {
149
+ local src=$1 out=$2 tmp
150
+ local -i W=$3 H=$4 dw=$5 dh=$6 ox=$7 oy=$8 vx vy vw vh px py rc
151
+ vx=$(( ox < 0 ? -ox : 0 )) vy=$(( oy < 0 ? -oy : 0 ))
152
+ vw=$(( (dw < W - ox ? dw : W - ox) - vx )) vh=$(( (dh < H - oy ? dh : H - oy) - vy ))
153
+ px=$(( ox > 0 ? ox : 0 )) py=$(( oy > 0 ? oy : 0 ))
154
+ (( vw > 0 && vh > 0 )) || return 1
155
+ tmp=$(mktemp -d) || return 1
156
+ sips -z $dh $dw $src --out $tmp/a.png >/dev/null 2>&1 &&
157
+ sips -p $(( dh + 2 )) $(( dw + 2 )) $tmp/a.png --out $tmp/b.png >/dev/null 2>&1 &&
158
+ sips -c $vh $vw --cropOffset $(( vy + 1 )) $(( vx + 1 )) $tmp/b.png --out $tmp/c.png >/dev/null 2>&1 &&
159
+ sips -p $(( 2 * H - vh + 2 )) $(( 2 * W - vw + 2 )) $tmp/c.png --out $tmp/d.png >/dev/null 2>&1 &&
160
+ sips -c $H $W --cropOffset $(( H - vh + 1 - py )) $(( W - vw + 1 - px )) $tmp/d.png --out $tmp/e.png >/dev/null 2>&1 &&
161
+ mv -f $tmp/e.png $out
162
+ rc=$?
163
+ rm -rf $tmp
164
+ return $rc
165
+ }
166
+
167
+ __tt_bg_include() {
168
+ local conf=${TTHEME_CONFIG:h}/backgrounds/$1.conf line
169
+ local -a lines=() add=()
170
+ [[ -r $conf ]] && lines=("${(@f)$(<$conf)}")
171
+ for line in "config-file = ?$1.tune.conf" "config-file = ?$1.off.conf"; do
172
+ (( ${lines[(Ie)$line]} )) || add+=("$line")
173
+ done
174
+ (( ${#add} )) || return 0
175
+ mkdir -p ${conf:h} && print -rl -- "${lines[@]}" "${add[@]}" > $conf
176
+ }
177
+
178
+ __tt_bg_write() {
179
+ local name=$1 dir=${TTHEME_CONFIG:h}/backgrounds src=${bgsrc[$1]} size=${bgsize[$1]} img="" fit=contain f REPLY
180
+ local pos=${TTHEME_BG_POSITIONS[${bgpos[$1]}]}
181
+ local -i W=$(( (pw + 2 * bgmx) * bgcw )) H=$(( (ph + 2 * bgmy) * bgch ))
182
+ local -a wh fr
183
+ __tt_bg_include $name || return 1
184
+ if [[ "$size ${bgpos[$1]} ${bgop[$1]}" == "${bgdef[$1]}" ]]; then
185
+ rm -f -- $dir/$name.tune.conf
186
+ else
187
+ case $size in
188
+ fill) img=${bgfill[$1]} fit=cover ;;
189
+ 100) img=$src ;;
190
+ <20-99>)
191
+ __tt_bg_dim "$src" || return 1
192
+ wh=(${=bgdim[$src]})
193
+ img=${src%.png}@$size-$pos.png
194
+ __tt_bg_frame $wh[1] $wh[2] $wh[1] $wh[2] $size ${bgpos[$1]} contain
195
+ fr=(${=REPLY})
196
+ [[ $img -nt $src ]] || __tt_bg_bake "$src" "$img" $wh[1] $wh[2] $fr || return 1
197
+ ;;
198
+ *)
199
+ fit=cover
200
+ if [[ "$size ${bgpos[$1]}" == "${bgshotkey[$1]}" && -r ${bgshot[$1]} ]]; then
201
+ img=${bgshot[$1]}
202
+ else
203
+ __tt_bg_dim "$src" && (( W && H )) || return 1
204
+ wh=(${=bgdim[$src]})
205
+ img=${src%.png}@$size-$pos-${W}x$H.png
206
+ __tt_bg_frame $wh[1] $wh[2] $W $H $size ${bgpos[$1]} contain ${bgfocus[$1]}
207
+ fr=(${=REPLY})
208
+ [[ $img -nt $src ]] || __tt_bg_bake "$src" "$img" $W $H $fr || return 1
209
+ fi
210
+ ;;
211
+ esac
212
+ __tt_tilde "$img"
213
+ print -rl -- "background-image = $REPLY" "background-image-fit = $fit" "background-image-position = $pos" "background-image-opacity = ${bgop[$1]}" > $dir/$name.tune.conf || return 1
214
+ fi
215
+ if (( bgoff[$1] )); then
216
+ print -r -- "background-image =" > $dir/$name.off.conf || return 1
217
+ else
218
+ rm -f -- $dir/$name.off.conf
219
+ fi
220
+ if [[ $src == /*.png ]]; then
221
+ for f in ${src%.png}@<20-999>-*.png(N); do
222
+ [[ $f == "$img" || $f == "${bgbase[$1]}" ]] || rm -f -- $f
223
+ done
224
+ fi
225
+ return 0
226
+ }
227
+
228
+ __tt_pv_bg_open() {
229
+ bgcw=0 bgch=0 bginc="" bgrel=0 bgmx=0 bgmy=0 bganchor=0
230
+ local fd saved resp="" line c v f
231
+ local -i px=2 py=2 fs=0 sc=2
232
+ for f in ${XDG_CONFIG_HOME:-$HOME/.config}/ghostty/config ${TTHEME_CONFIG:h}/ttheme.conf; do
233
+ [[ -r $f ]] || continue
234
+ for line in "${(@f)$(<$f)}"; do
235
+ v=${${line#*=}// /}
236
+ case $line in
237
+ 'config-file = ?'*'/backgrounds/'*'.conf') bginc=${${line:t}%.conf} ;;
238
+ window-padding-x*=*) [[ $v == <->(|,<->) ]] && px=$(( ${v%%,*} > ${v##*,} ? ${v%%,*} : ${v##*,} )) ;;
239
+ window-padding-y*=*) [[ $v == <->(|,<->) ]] && py=$(( ${v%%,*} > ${v##*,} ? ${v%%,*} : ${v##*,} )) ;;
240
+ font-size*=*) [[ $v == <->(|.<->) ]] && fs=${v%%.*} ;;
241
+ esac
242
+ done
243
+ done
244
+ exec {fd}<>/dev/tty 2>/dev/null || return 0
245
+ saved=$(stty -g <&$fd 2>/dev/null)
246
+ stty raw -echo min 0 time 3 <&$fd 2>/dev/null
247
+ printf '\e_Ga=t,f=24,s=1,v=1,i=1,q=2;AAAA\e\\\e_Ga=p,i=1,p=9,P=999998,Q=1,C=1,q=1\e\\\e_Ga=d,d=i,i=1,p=9,q=2\e\\\e[16t' >&$fd
248
+ while IFS= read -r -s -k 1 -t 1 -u $fd c 2>/dev/null; do
249
+ resp+=$c
250
+ [[ $resp == *'[6;'<1->';'<1->t ]] && break
251
+ done
252
+ stty "$saved" <&$fd 2>/dev/null
253
+ exec {fd}>&-
254
+ [[ $resp == *'[6;'<1->';'<1->t ]] || return 0
255
+ [[ $resp == *$'\e_G'*';E'* ]] && bgrel=1
256
+ resp=${${resp##*\[6;}%t}
257
+ bgch=${resp%;*} bgcw=${resp#*;}
258
+ (( fs && bgch * 10 < fs * 20 )) && sc=1
259
+ (( bgrel )) || return 0
260
+ bgmx=$(( (px * sc + bgcw - 1) / bgcw + 1 )) bgmy=$(( (py * sc + bgch - 1) / bgch + 1 ))
261
+ }
262
+
263
+ __tt_pv_bg_show() {
264
+ (( bgcw )) || return 0
265
+ local name=$1 img="" op size fit=contain focus=-1 REPLY
266
+ local -a p=(${=TTHEME_PALETTE[$name]}) wh at
267
+ local -i cols=$(( pw + 2 * bgmx )) rows=$(( ph + 2 * bgmy ))
268
+ (( ${#p} >= 20 )) || return 0
269
+ (( $2 )) && { bgsent=(); bgshown="" bganchor=0 }
270
+ bgname=$name
271
+ __tt_bg_load $name
272
+ if (( ! bgrel )) && [[ $name == "$bginc" && "${bgsize[$name]} ${bgpos[$name]} ${bgop[$name]} ${bgoff[$name]}" == "${bgload[$name]}" ]]; then
273
+ printf '\e_Ga=d,d=i,i=1,q=2\e\\\e_Ga=d,d=i,i=2,q=2\e\\'
274
+ [[ -n $bgshown ]] && printf '\e_Ga=d,d=i,i=%d,q=2\e\\' ${bgsent[$bgshown]}
275
+ bgshown=""
276
+ return 0
277
+ fi
278
+ op=${bgop[$name]} size=${bgsize[$name]}
279
+ if [[ $size == fill ]]; then
280
+ img=${bgfill[$name]} size=100 fit=cover
281
+ elif [[ $size == <101-> && "$size ${bgpos[$name]}" == "${bgshotkey[$name]}" && -r ${bgshot[$name]} ]]; then
282
+ img=${bgshot[$name]} size=100 fit=cover
283
+ else
284
+ img=${bgsrc[$name]} focus=${bgfocus[$name]}
285
+ fi
286
+ (( bgoff[$name] )) && img=""
287
+ local bg=${p[1]#\#}
288
+ local -i r=$(( 16#${bg:0:2} )) g=$(( 16#${bg:2:2} )) b=$(( 16#${bg:4:2} )) a=$(( (1.0 - op) * 255 + 0.5 ))
289
+ (( a < 0 )) && a=0
290
+ if (( bgrel && ! bganchor )); then
291
+ printf '\e_Ga=t,f=32,s=1,v=1,i=999999,q=2;AAAAAA==\e\\\e[H\e_Ga=p,i=999999,p=1,c=1,r=1,C=1,z=-1073741828,q=2\e\\'
292
+ bganchor=1
293
+ fi
294
+ __tt_b64 $r $g $b
295
+ printf '\e_Ga=t,f=24,s=1,v=1,i=1,q=2;%s\e\\' "$REPLY"
296
+ __tt_bg_at 1 1 -1073741827 0 0 $cols $rows
297
+ __tt_b64 $r $g $b $a
298
+ printf '\e_Ga=t,f=32,s=1,v=1,i=2,q=2;%s\e\\' "$REPLY"
299
+ __tt_bg_at 2 1 -1073741825 0 0 $cols $rows
300
+ __tt_bg_dim "$img" || img=""
301
+ if [[ -n $bgshown && $bgshown != "$img" ]]; then
302
+ printf '\e_Ga=d,d=i,i=%d,q=2\e\\' ${bgsent[$bgshown]}
303
+ bgshown=""
304
+ fi
305
+ [[ -n $img ]] || return 0
306
+ if [[ -z ${bgsent[$img]} ]]; then
307
+ bgsent[$img]=$(( ${#bgsent} + 3 ))
308
+ printf '\e_Ga=t,t=f,f=100,i=%d,q=2;%s\e\\' ${bgsent[$img]} "$(print -rn -- $img | base64 | tr -d '\n')"
309
+ fi
310
+ wh=(${=bgdim[$img]})
311
+ if __tt_bg_place $wh[1] $wh[2] $cols $rows $bgcw $bgch $size ${bgpos[$name]} $fit $focus; then
312
+ at=(${=REPLY})
313
+ __tt_bg_at ${bgsent[$img]} 1 -1073741826 $(( at[1] - 1 )) $(( at[2] - 1 )) $at[3] $at[4] $at[5] $at[6] $at[7] $at[8]
314
+ else
315
+ printf '\e_Ga=d,d=i,i=%d,q=2\e\\' ${bgsent[$img]}
316
+ fi
317
+ bgshown=$img
318
+ }
319
+
320
+ __tt_pv_bg_fs() {
321
+ local name=$1
322
+ local -a wh fwh
323
+ local -i W=$(( (pw + 2 * bgmx) * bgcw )) H=$(( (ph + 2 * bgmy) * bgch )) kw kh
324
+ REPLY=0
325
+ (( W && H )) || return 1
326
+ __tt_bg_dim "${bgsrc[$name]}" && __tt_bg_dim "${bgfill[$name]}" || return 1
327
+ wh=(${=bgdim[${bgsrc[$name]}]}) fwh=(${=bgdim[${bgfill[$name]}]})
328
+ kw=$(( wh[1] < wh[2] * fwh[1] / fwh[2] ? wh[1] : wh[2] * fwh[1] / fwh[2] ))
329
+ kh=$(( kw * fwh[2] / fwh[1] ))
330
+ REPLY=$(( 100 * (W * kh > H * kw ? W * kh : H * kw) * wh[1] * wh[2] / (kw * kh * (W * wh[2] < H * wh[1] ? W * wh[2] : H * wh[1])) ))
331
+ }
332
+
333
+ __tt_pv_bg_adjust() {
334
+ (( bgcw )) && [[ -n $tune ]] || return 0
335
+ local name=$tune REPLY
336
+ __tt_bg_load $name
337
+ __tt_bg_image $name
338
+ __tt_bg_dim "$REPLY" || return 0
339
+ local size=${bgsize[$name]} op=${bgop[$name]}
340
+ local -i n=${2:-0} at=${bgpos[$name]} off=${bgoff[$name]} o=$(( ${bgop[$name]} * 100 + 0.5 )) m fs=0 bake=$+commands[sips]
341
+ local -a def=(${=bgdef[$name]})
342
+ __tt_pv_bg_fs $name && fs=$REPLY
343
+ case $1 in
344
+ on) off=$(( ! off )) ;;
345
+ def) size=$def[1] at=$def[2] op=$def[3] off=0 ;;
346
+ *)
347
+ (( off )) && return 0
348
+ case $1 in
349
+ size)
350
+ if (( n < 0 )); then
351
+ if [[ $size == fill ]]; then
352
+ (( fs )) || return 0
353
+ size=$(( bake && fs > 100 ? fs : 100 ))
354
+ n=$(( n + 1 ))
355
+ fi
356
+ if (( bake && n )); then
357
+ size=$(( size + n ))
358
+ (( size < 20 )) && size=20
359
+ fi
360
+ elif [[ $size != fill ]]; then
361
+ if (( ! bake || size + n > fs )); then
362
+ size=fill
363
+ else
364
+ size=$(( size + n ))
365
+ fi
366
+ fi
367
+ ;;
368
+ pos) at=$(( ((at - 1 + n) % 9 + 9) % 9 + 1 )) ;;
369
+ at) at=$n ;;
370
+ op)
371
+ m=$(( o + n ))
372
+ (( m < 0 )) && m=0
373
+ (( m > 100 )) && m=100
374
+ (( m != o )) && printf -v op '%d.%02d' $(( m / 100 )) $(( m % 100 ))
375
+ ;;
376
+ esac
377
+ ;;
378
+ esac
379
+ [[ $size == ${bgsize[$name]} && $at == ${bgpos[$name]} && $op == ${bgop[$name]} && $off == ${bgoff[$name]} ]] && return 0
380
+ if [[ $size != ${bgsize[$name]} ]]; then
381
+ osd=$size osdt=100
382
+ [[ $size == fill ]] || osd+=%
383
+ fi
384
+ bgsize[$name]=$size bgpos[$name]=$at bgop[$name]=$op bgoff[$name]=$off bgname=""
385
+ }
386
+
387
+ __tt_pv_bg_state() {
388
+ REPLY=""
389
+ (( bgcw )) || return 1
390
+ __tt_bg_load $1
391
+ __tt_bg_image $1
392
+ __tt_bg_dim "$REPLY" || { REPLY=""; return 1 }
393
+ if (( bgoff[$1] )); then
394
+ REPLY=off
395
+ else
396
+ __tt_bg_label $1
397
+ fi
398
+ }
399
+
400
+ __tt_pv_bg_findable() {
401
+ (( bgcw )) && [[ -n ${TTHEME_BOORU[$1]} ]]
402
+ }
403
+
404
+ __tt_pv_bg_find() {
405
+ local name=$1 err
406
+ local -i rc
407
+ __tt_pv_bg_close
408
+ err=$(__tt_cli find $name 2>&1 >/dev/tty)
409
+ rc=$?
410
+ err=${${err//$'\n'/ }## #}
411
+ resized=1 bgname="" bgshown="" bgsent=() bgdim=()
412
+ if (( rc == 1 )); then
413
+ msg=${err:-"find failed for $name"} msgt=300
414
+ fi
415
+ (( rc == 0 )) || return 1
416
+ unset "bgsrc[$name]"
417
+ __tt_bg_load $name
418
+ bgload[$name]="" bgedit[$name]=1
419
+ msg=${err:-"background · $name"} msgt=200
420
+ return 0
421
+ }
422
+
423
+ __tt_pv_bg_panel() {
424
+ local name=$1 z=$'\e[0m' b=$'\e[1m' d=$'\e[2m' c=$ac val sty REPLY
425
+ local -a labs=(size position opacity) at=(0 3 6)
426
+ 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
427
+ (( color )) || z= b= d= c=
428
+ (( T < 8 )) && T=8
429
+ (( $+commands[sips] )) && lo=20
430
+ __tt_pv_bg_fs $name && (( REPLY > hi )) && hi=$REPLY
431
+ for k in 1 2 3; do
432
+ r=$(( r0 + at[k] ))
433
+ sty=$d
434
+ (( tf == k && ! off )) && sty=$b
435
+ out+=$'\e['$r';'$col'H'
436
+ if (( tf == k && ! off )); then
437
+ out+=$c"▶"$z" "
438
+ else
439
+ out+=" "
440
+ fi
441
+ out+=$sty$labs[k]$z
442
+ if (( k == 2 )); then
443
+ for (( i = 1; i <= 9; i++ )); do
444
+ out+=$'\e['$(( r0 + 2 + (i - 1) / 3 ))';'$(( col + 12 + (i - 1) % 3 * 3 ))'H'
445
+ if (( ! color )); then
446
+ if (( i == pos )); then out+="#"; else out+="."; fi
447
+ elif (( i == pos && ! off )); then
448
+ out+=$b$c"■"$z
449
+ elif (( i == pos )); then
450
+ out+=$d"■"$z
451
+ else
452
+ out+=$d"·"$z
453
+ fi
454
+ done
455
+ val=${TTHEME_BG_POSITIONS[pos]}
456
+ else
457
+ if (( k == 1 )); then
458
+ if [[ ${bgsize[$name]} == fill ]]; then
459
+ knob=$(( T - 1 )) val=FILL
460
+ else
461
+ knob=$(( (${bgsize[$name]} - lo) * (T - 1) / (hi - lo + 1) )) val=${bgsize[$name]}%
462
+ fi
463
+ else
464
+ o=$(( ${bgop[$name]} * 100 + 0.5 ))
465
+ knob=$(( o * (T - 1) / 100 )) val=${bgop[$name]}
466
+ fi
467
+ (( knob < 0 )) && knob=0
468
+ (( knob > T - 1 )) && knob=$(( T - 1 ))
469
+ out+=$'\e['$r';'$(( col + 12 ))'H'
470
+ if (( ! color )); then
471
+ out+=${(l:knob::=:)}"O"${(l:$(( T - 1 - knob ))::-:)}
472
+ elif (( off )); then
473
+ out+=$d${(l:knob::━:)}"●"${(l:$(( T - 1 - knob ))::─:)}$z
474
+ else
475
+ out+=$c${(l:knob::━:)}$b"●"$z$d${(l:$(( T - 1 - knob ))::─:)}$z
476
+ fi
477
+ fi
478
+ out+=$'\e['$r';'$(( end - ${#val} + 1 ))'H'$sty$val$z
479
+ done
480
+ }
481
+
482
+ __tt_pv_bg_close() {
483
+ (( bgcw )) && printf '\e_Ga=d,d=A,q=2\e\\'
484
+ }
485
+
486
+ __tt_pv_bg_save() {
487
+ local name msg reload=0 REPLY
488
+ (( ${#bgedit} )) || return 0
489
+ for name in ${(ok)bgedit}; do
490
+ if ! __tt_bg_write $name; then
491
+ print -u2 "ttheme: could not save the background of $name"
492
+ continue
493
+ fi
494
+ [[ $name == "$bginc" ]] && reload=1
495
+ if (( bgoff[$name] )); then
496
+ msg="background · $name off"
497
+ else
498
+ __tt_bg_label $name
499
+ msg="background · $name $REPLY"
500
+ fi
501
+ if __tt_color; then
502
+ printf '\033[2m%s\033[0m\n' "$msg"
503
+ else
504
+ print -r -- "$msg"
505
+ fi
506
+ done
507
+ (( reload )) && __tt_reload
508
+ return 0
509
+ }
@@ -11,20 +11,21 @@ __tt_kitty_args() {
11
11
  (( ${#p} >= 20 )) || return 1
12
12
  reply=(
13
13
  foreground=$p[2]
14
+ background=$p[1]
14
15
  cursor=$p[3]
15
16
  cursor_text_color=$p[1]
16
17
  selection_background=$p[4]
17
18
  selection_foreground=$p[2]
18
19
  )
19
- [[ $p[1] != - ]] && reply+=(background=$p[1])
20
20
  local i
21
21
  for i in {0..15}; do reply+=("color$i=$p[i+5]"); done
22
22
  }
23
23
 
24
24
  __tt_apply() {
25
25
  local -a reply
26
- __tt_kitty_args "$1" || return 1
27
- __tt_kitty set-colors -- "${reply[@]}" 2>/dev/null && return 0
26
+ if [[ ${1%% *} != - ]] && __tt_kitty_args "$1"; then
27
+ __tt_kitty set-colors -- "${reply[@]}" 2>/dev/null && return 0
28
+ fi
28
29
 
29
30
  __tt_osc_apply "$1"
30
31
  }