@kecan0406/ttheme 0.1.0
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.
- package/LICENSE +30 -0
- package/README.md +203 -0
- package/bin/ttheme.js +4473 -0
- package/dist/alacritty/config/alma.toml +8 -0
- package/dist/alacritty/config/anko.toml +8 -0
- package/dist/alacritty/config/asuka.toml +8 -0
- package/dist/alacritty/config/azusa.toml +8 -0
- package/dist/alacritty/config/battler.toml +8 -0
- package/dist/alacritty/config/beatrice.toml +8 -0
- package/dist/alacritty/config/bernkastel.toml +8 -0
- package/dist/alacritty/config/bocchi.toml +8 -0
- package/dist/alacritty/config/cirno.toml +8 -0
- package/dist/alacritty/config/david.toml +8 -0
- package/dist/alacritty/config/determination.toml +8 -0
- package/dist/alacritty/config/dorothy.toml +8 -0
- package/dist/alacritty/config/eva01.toml +8 -0
- package/dist/alacritty/config/flandre.toml +8 -0
- package/dist/alacritty/config/fox.toml +8 -0
- package/dist/alacritty/config/glitch.toml +8 -0
- package/dist/alacritty/config/hinamizawa.toml +8 -0
- package/dist/alacritty/config/hitagi.toml +8 -0
- package/dist/alacritty/config/homura.toml +8 -0
- package/dist/alacritty/config/jill.toml +8 -0
- package/dist/alacritty/config/joker.toml +8 -0
- package/dist/alacritty/config/jupiter.toml +8 -0
- package/dist/alacritty/config/kagami.toml +8 -0
- package/dist/alacritty/config/kaito.toml +8 -0
- package/dist/alacritty/config/kaworu.toml +8 -0
- package/dist/alacritty/config/kita.toml +8 -0
- package/dist/alacritty/config/konata.toml +8 -0
- package/dist/alacritty/config/kou.toml +8 -0
- package/dist/alacritty/config/kumori.toml +8 -0
- package/dist/alacritty/config/kurisu.toml +8 -0
- package/dist/alacritty/config/kyoko.toml +8 -0
- package/dist/alacritty/config/kyubey.toml +8 -0
- package/dist/alacritty/config/lain.toml +8 -0
- package/dist/alacritty/config/lambdadelta.toml +8 -0
- package/dist/alacritty/config/len.toml +8 -0
- package/dist/alacritty/config/lucy.toml +8 -0
- package/dist/alacritty/config/luka.toml +8 -0
- package/dist/alacritty/config/madoka.toml +8 -0
- package/dist/alacritty/config/magi.toml +8 -0
- package/dist/alacritty/config/mami.toml +8 -0
- package/dist/alacritty/config/marisa.toml +8 -0
- package/dist/alacritty/config/mars.toml +8 -0
- package/dist/alacritty/config/mayuri.toml +8 -0
- package/dist/alacritty/config/meiko.toml +8 -0
- package/dist/alacritty/config/mercury.toml +8 -0
- package/dist/alacritty/config/mettaton.toml +8 -0
- package/dist/alacritty/config/miku.toml +8 -0
- package/dist/alacritty/config/mio.toml +8 -0
- package/dist/alacritty/config/mion.toml +8 -0
- package/dist/alacritty/config/misato.toml +8 -0
- package/dist/alacritty/config/miyuki.toml +8 -0
- package/dist/alacritty/config/monika.toml +8 -0
- package/dist/alacritty/config/moon.toml +8 -0
- package/dist/alacritty/config/mugi.toml +8 -0
- package/dist/alacritty/config/nadeko.toml +8 -0
- package/dist/alacritty/config/nagisa.toml +8 -0
- package/dist/alacritty/config/natsuki.toml +8 -0
- package/dist/alacritty/config/nazuna.toml +8 -0
- package/dist/alacritty/config/neutral.toml +8 -0
- package/dist/alacritty/config/nightcity.toml +8 -0
- package/dist/alacritty/config/nijika.toml +8 -0
- package/dist/alacritty/config/oracle.toml +8 -0
- package/dist/alacritty/config/panther.toml +8 -0
- package/dist/alacritty/config/papyrus.toml +8 -0
- package/dist/alacritty/config/patchouli.toml +8 -0
- package/dist/alacritty/config/queen.toml +8 -0
- package/dist/alacritty/config/rebecca.toml +8 -0
- package/dist/alacritty/config/rei.toml +8 -0
- package/dist/alacritty/config/reimu.toml +8 -0
- package/dist/alacritty/config/rena.toml +8 -0
- package/dist/alacritty/config/rika.toml +8 -0
- package/dist/alacritty/config/rin.toml +8 -0
- package/dist/alacritty/config/ritsu.toml +8 -0
- package/dist/alacritty/config/rokkenjima.toml +8 -0
- package/dist/alacritty/config/ryo.toml +8 -0
- package/dist/alacritty/config/sans.toml +8 -0
- package/dist/alacritty/config/satoko.toml +8 -0
- package/dist/alacritty/config/sayaka.toml +8 -0
- package/dist/alacritty/config/sayori.toml +8 -0
- package/dist/alacritty/config/sei.toml +8 -0
- package/dist/alacritty/config/seri.toml +8 -0
- package/dist/alacritty/config/shinobu.toml +8 -0
- package/dist/alacritty/config/skull.toml +8 -0
- package/dist/alacritty/config/stella.toml +8 -0
- package/dist/alacritty/config/suzuha.toml +8 -0
- package/dist/alacritty/config/toriel.toml +8 -0
- package/dist/alacritty/config/tsubasa.toml +8 -0
- package/dist/alacritty/config/tsukasa.toml +8 -0
- package/dist/alacritty/config/undyne.toml +8 -0
- package/dist/alacritty/config/valhalla.toml +8 -0
- package/dist/alacritty/config/velvet.toml +8 -0
- package/dist/alacritty/config/venus.toml +8 -0
- package/dist/alacritty/config/yofukashi.toml +8 -0
- package/dist/alacritty/config/youmu.toml +8 -0
- package/dist/alacritty/config/yui.toml +8 -0
- package/dist/alacritty/config/yuri.toml +8 -0
- package/dist/alacritty/themes/alma.toml +34 -0
- package/dist/alacritty/themes/anko.toml +34 -0
- package/dist/alacritty/themes/asuka.toml +34 -0
- package/dist/alacritty/themes/azusa.toml +34 -0
- package/dist/alacritty/themes/battler.toml +34 -0
- package/dist/alacritty/themes/beatrice.toml +34 -0
- package/dist/alacritty/themes/bernkastel.toml +34 -0
- package/dist/alacritty/themes/bocchi.toml +34 -0
- package/dist/alacritty/themes/cirno.toml +34 -0
- package/dist/alacritty/themes/david.toml +34 -0
- package/dist/alacritty/themes/determination.toml +34 -0
- package/dist/alacritty/themes/dorothy.toml +34 -0
- package/dist/alacritty/themes/eva01.toml +34 -0
- package/dist/alacritty/themes/flandre.toml +34 -0
- package/dist/alacritty/themes/fox.toml +34 -0
- package/dist/alacritty/themes/glitch.toml +34 -0
- package/dist/alacritty/themes/hinamizawa.toml +34 -0
- package/dist/alacritty/themes/hitagi.toml +34 -0
- package/dist/alacritty/themes/homura.toml +34 -0
- package/dist/alacritty/themes/jill.toml +34 -0
- package/dist/alacritty/themes/joker.toml +34 -0
- package/dist/alacritty/themes/jupiter.toml +34 -0
- package/dist/alacritty/themes/kagami.toml +34 -0
- package/dist/alacritty/themes/kaito.toml +34 -0
- package/dist/alacritty/themes/kaworu.toml +34 -0
- package/dist/alacritty/themes/kita.toml +34 -0
- package/dist/alacritty/themes/konata.toml +34 -0
- package/dist/alacritty/themes/kou.toml +34 -0
- package/dist/alacritty/themes/kumori.toml +34 -0
- package/dist/alacritty/themes/kurisu.toml +34 -0
- package/dist/alacritty/themes/kyoko.toml +34 -0
- package/dist/alacritty/themes/kyubey.toml +34 -0
- package/dist/alacritty/themes/lain.toml +34 -0
- package/dist/alacritty/themes/lambdadelta.toml +34 -0
- package/dist/alacritty/themes/len.toml +34 -0
- package/dist/alacritty/themes/lucy.toml +34 -0
- package/dist/alacritty/themes/luka.toml +34 -0
- package/dist/alacritty/themes/madoka.toml +34 -0
- package/dist/alacritty/themes/magi.toml +34 -0
- package/dist/alacritty/themes/mami.toml +34 -0
- package/dist/alacritty/themes/marisa.toml +34 -0
- package/dist/alacritty/themes/mars.toml +34 -0
- package/dist/alacritty/themes/mayuri.toml +34 -0
- package/dist/alacritty/themes/meiko.toml +34 -0
- package/dist/alacritty/themes/mercury.toml +34 -0
- package/dist/alacritty/themes/mettaton.toml +34 -0
- package/dist/alacritty/themes/miku.toml +34 -0
- package/dist/alacritty/themes/mio.toml +34 -0
- package/dist/alacritty/themes/mion.toml +34 -0
- package/dist/alacritty/themes/misato.toml +34 -0
- package/dist/alacritty/themes/miyuki.toml +34 -0
- package/dist/alacritty/themes/monika.toml +34 -0
- package/dist/alacritty/themes/moon.toml +34 -0
- package/dist/alacritty/themes/mugi.toml +34 -0
- package/dist/alacritty/themes/nadeko.toml +34 -0
- package/dist/alacritty/themes/nagisa.toml +34 -0
- package/dist/alacritty/themes/natsuki.toml +34 -0
- package/dist/alacritty/themes/nazuna.toml +34 -0
- package/dist/alacritty/themes/neutral.toml +34 -0
- package/dist/alacritty/themes/nightcity.toml +34 -0
- package/dist/alacritty/themes/nijika.toml +34 -0
- package/dist/alacritty/themes/oracle.toml +34 -0
- package/dist/alacritty/themes/panther.toml +34 -0
- package/dist/alacritty/themes/papyrus.toml +34 -0
- package/dist/alacritty/themes/patchouli.toml +34 -0
- package/dist/alacritty/themes/queen.toml +34 -0
- package/dist/alacritty/themes/rebecca.toml +34 -0
- package/dist/alacritty/themes/rei.toml +34 -0
- package/dist/alacritty/themes/reimu.toml +34 -0
- package/dist/alacritty/themes/rena.toml +34 -0
- package/dist/alacritty/themes/rika.toml +34 -0
- package/dist/alacritty/themes/rin.toml +34 -0
- package/dist/alacritty/themes/ritsu.toml +34 -0
- package/dist/alacritty/themes/rokkenjima.toml +34 -0
- package/dist/alacritty/themes/ryo.toml +34 -0
- package/dist/alacritty/themes/sans.toml +34 -0
- package/dist/alacritty/themes/satoko.toml +34 -0
- package/dist/alacritty/themes/sayaka.toml +34 -0
- package/dist/alacritty/themes/sayori.toml +34 -0
- package/dist/alacritty/themes/sei.toml +34 -0
- package/dist/alacritty/themes/seri.toml +34 -0
- package/dist/alacritty/themes/shinobu.toml +34 -0
- package/dist/alacritty/themes/skull.toml +34 -0
- package/dist/alacritty/themes/stella.toml +34 -0
- package/dist/alacritty/themes/suzuha.toml +34 -0
- package/dist/alacritty/themes/toriel.toml +34 -0
- package/dist/alacritty/themes/tsubasa.toml +34 -0
- package/dist/alacritty/themes/tsukasa.toml +34 -0
- package/dist/alacritty/themes/undyne.toml +34 -0
- package/dist/alacritty/themes/valhalla.toml +34 -0
- package/dist/alacritty/themes/velvet.toml +34 -0
- package/dist/alacritty/themes/venus.toml +34 -0
- package/dist/alacritty/themes/yofukashi.toml +34 -0
- package/dist/alacritty/themes/youmu.toml +34 -0
- package/dist/alacritty/themes/yui.toml +34 -0
- package/dist/alacritty/themes/yuri.toml +34 -0
- package/dist/ghostty/themes/alma +29 -0
- package/dist/ghostty/themes/anko +29 -0
- package/dist/ghostty/themes/asuka +29 -0
- package/dist/ghostty/themes/azusa +29 -0
- package/dist/ghostty/themes/battler +29 -0
- package/dist/ghostty/themes/beatrice +29 -0
- package/dist/ghostty/themes/bernkastel +29 -0
- package/dist/ghostty/themes/bocchi +29 -0
- package/dist/ghostty/themes/cirno +29 -0
- package/dist/ghostty/themes/david +29 -0
- package/dist/ghostty/themes/determination +29 -0
- package/dist/ghostty/themes/dorothy +29 -0
- package/dist/ghostty/themes/eva01 +29 -0
- package/dist/ghostty/themes/flandre +29 -0
- package/dist/ghostty/themes/fox +29 -0
- package/dist/ghostty/themes/glitch +29 -0
- package/dist/ghostty/themes/hinamizawa +29 -0
- package/dist/ghostty/themes/hitagi +29 -0
- package/dist/ghostty/themes/homura +29 -0
- package/dist/ghostty/themes/jill +29 -0
- package/dist/ghostty/themes/joker +29 -0
- package/dist/ghostty/themes/jupiter +29 -0
- package/dist/ghostty/themes/kagami +29 -0
- package/dist/ghostty/themes/kaito +29 -0
- package/dist/ghostty/themes/kaworu +29 -0
- package/dist/ghostty/themes/kita +29 -0
- package/dist/ghostty/themes/konata +29 -0
- package/dist/ghostty/themes/kou +29 -0
- package/dist/ghostty/themes/kumori +29 -0
- package/dist/ghostty/themes/kurisu +29 -0
- package/dist/ghostty/themes/kyoko +29 -0
- package/dist/ghostty/themes/kyubey +29 -0
- package/dist/ghostty/themes/lain +29 -0
- package/dist/ghostty/themes/lambdadelta +29 -0
- package/dist/ghostty/themes/len +29 -0
- package/dist/ghostty/themes/lucy +29 -0
- package/dist/ghostty/themes/luka +29 -0
- package/dist/ghostty/themes/madoka +29 -0
- package/dist/ghostty/themes/magi +29 -0
- package/dist/ghostty/themes/mami +29 -0
- package/dist/ghostty/themes/marisa +29 -0
- package/dist/ghostty/themes/mars +29 -0
- package/dist/ghostty/themes/mayuri +29 -0
- package/dist/ghostty/themes/meiko +29 -0
- package/dist/ghostty/themes/mercury +29 -0
- package/dist/ghostty/themes/mettaton +29 -0
- package/dist/ghostty/themes/miku +29 -0
- package/dist/ghostty/themes/mio +29 -0
- package/dist/ghostty/themes/mion +29 -0
- package/dist/ghostty/themes/misato +29 -0
- package/dist/ghostty/themes/miyuki +29 -0
- package/dist/ghostty/themes/monika +29 -0
- package/dist/ghostty/themes/moon +29 -0
- package/dist/ghostty/themes/mugi +29 -0
- package/dist/ghostty/themes/nadeko +29 -0
- package/dist/ghostty/themes/nagisa +29 -0
- package/dist/ghostty/themes/natsuki +29 -0
- package/dist/ghostty/themes/nazuna +29 -0
- package/dist/ghostty/themes/neutral +29 -0
- package/dist/ghostty/themes/nightcity +29 -0
- package/dist/ghostty/themes/nijika +29 -0
- package/dist/ghostty/themes/oracle +29 -0
- package/dist/ghostty/themes/panther +29 -0
- package/dist/ghostty/themes/papyrus +29 -0
- package/dist/ghostty/themes/patchouli +29 -0
- package/dist/ghostty/themes/queen +29 -0
- package/dist/ghostty/themes/rebecca +29 -0
- package/dist/ghostty/themes/rei +29 -0
- package/dist/ghostty/themes/reimu +29 -0
- package/dist/ghostty/themes/rena +29 -0
- package/dist/ghostty/themes/rika +29 -0
- package/dist/ghostty/themes/rin +29 -0
- package/dist/ghostty/themes/ritsu +29 -0
- package/dist/ghostty/themes/rokkenjima +29 -0
- package/dist/ghostty/themes/ryo +29 -0
- package/dist/ghostty/themes/sans +29 -0
- package/dist/ghostty/themes/satoko +29 -0
- package/dist/ghostty/themes/sayaka +29 -0
- package/dist/ghostty/themes/sayori +29 -0
- package/dist/ghostty/themes/sei +29 -0
- package/dist/ghostty/themes/seri +29 -0
- package/dist/ghostty/themes/shinobu +29 -0
- package/dist/ghostty/themes/skull +29 -0
- package/dist/ghostty/themes/stella +29 -0
- package/dist/ghostty/themes/suzuha +29 -0
- package/dist/ghostty/themes/toriel +29 -0
- package/dist/ghostty/themes/tsubasa +29 -0
- package/dist/ghostty/themes/tsukasa +29 -0
- package/dist/ghostty/themes/undyne +29 -0
- package/dist/ghostty/themes/valhalla +29 -0
- package/dist/ghostty/themes/velvet +29 -0
- package/dist/ghostty/themes/venus +29 -0
- package/dist/ghostty/themes/yofukashi +29 -0
- package/dist/ghostty/themes/youmu +29 -0
- package/dist/ghostty/themes/yui +29 -0
- package/dist/ghostty/themes/yuri +29 -0
- package/dist/ghostty/ttheme.conf +9 -0
- package/dist/iterm2/alma.itermcolors +305 -0
- package/dist/iterm2/anko.itermcolors +305 -0
- package/dist/iterm2/asuka.itermcolors +305 -0
- package/dist/iterm2/azusa.itermcolors +305 -0
- package/dist/iterm2/battler.itermcolors +305 -0
- package/dist/iterm2/beatrice.itermcolors +305 -0
- package/dist/iterm2/bernkastel.itermcolors +305 -0
- package/dist/iterm2/bocchi.itermcolors +305 -0
- package/dist/iterm2/cirno.itermcolors +305 -0
- package/dist/iterm2/david.itermcolors +305 -0
- package/dist/iterm2/determination.itermcolors +305 -0
- package/dist/iterm2/dorothy.itermcolors +305 -0
- package/dist/iterm2/eva01.itermcolors +305 -0
- package/dist/iterm2/flandre.itermcolors +305 -0
- package/dist/iterm2/fox.itermcolors +305 -0
- package/dist/iterm2/glitch.itermcolors +305 -0
- package/dist/iterm2/hinamizawa.itermcolors +305 -0
- package/dist/iterm2/hitagi.itermcolors +305 -0
- package/dist/iterm2/homura.itermcolors +305 -0
- package/dist/iterm2/jill.itermcolors +305 -0
- package/dist/iterm2/joker.itermcolors +305 -0
- package/dist/iterm2/jupiter.itermcolors +305 -0
- package/dist/iterm2/kagami.itermcolors +305 -0
- package/dist/iterm2/kaito.itermcolors +305 -0
- package/dist/iterm2/kaworu.itermcolors +305 -0
- package/dist/iterm2/kita.itermcolors +305 -0
- package/dist/iterm2/konata.itermcolors +305 -0
- package/dist/iterm2/kou.itermcolors +305 -0
- package/dist/iterm2/kumori.itermcolors +305 -0
- package/dist/iterm2/kurisu.itermcolors +305 -0
- package/dist/iterm2/kyoko.itermcolors +305 -0
- package/dist/iterm2/kyubey.itermcolors +305 -0
- package/dist/iterm2/lain.itermcolors +305 -0
- package/dist/iterm2/lambdadelta.itermcolors +305 -0
- package/dist/iterm2/len.itermcolors +305 -0
- package/dist/iterm2/lucy.itermcolors +305 -0
- package/dist/iterm2/luka.itermcolors +305 -0
- package/dist/iterm2/madoka.itermcolors +305 -0
- package/dist/iterm2/magi.itermcolors +305 -0
- package/dist/iterm2/mami.itermcolors +305 -0
- package/dist/iterm2/marisa.itermcolors +305 -0
- package/dist/iterm2/mars.itermcolors +305 -0
- package/dist/iterm2/mayuri.itermcolors +305 -0
- package/dist/iterm2/meiko.itermcolors +305 -0
- package/dist/iterm2/mercury.itermcolors +305 -0
- package/dist/iterm2/mettaton.itermcolors +305 -0
- package/dist/iterm2/miku.itermcolors +305 -0
- package/dist/iterm2/mio.itermcolors +305 -0
- package/dist/iterm2/mion.itermcolors +305 -0
- package/dist/iterm2/misato.itermcolors +305 -0
- package/dist/iterm2/miyuki.itermcolors +305 -0
- package/dist/iterm2/monika.itermcolors +305 -0
- package/dist/iterm2/moon.itermcolors +305 -0
- package/dist/iterm2/mugi.itermcolors +305 -0
- package/dist/iterm2/nadeko.itermcolors +305 -0
- package/dist/iterm2/nagisa.itermcolors +305 -0
- package/dist/iterm2/natsuki.itermcolors +305 -0
- package/dist/iterm2/nazuna.itermcolors +305 -0
- package/dist/iterm2/neutral.itermcolors +305 -0
- package/dist/iterm2/nightcity.itermcolors +305 -0
- package/dist/iterm2/nijika.itermcolors +305 -0
- package/dist/iterm2/oracle.itermcolors +305 -0
- package/dist/iterm2/panther.itermcolors +305 -0
- package/dist/iterm2/papyrus.itermcolors +305 -0
- package/dist/iterm2/patchouli.itermcolors +305 -0
- package/dist/iterm2/queen.itermcolors +305 -0
- package/dist/iterm2/rebecca.itermcolors +305 -0
- package/dist/iterm2/rei.itermcolors +305 -0
- package/dist/iterm2/reimu.itermcolors +305 -0
- package/dist/iterm2/rena.itermcolors +305 -0
- package/dist/iterm2/rika.itermcolors +305 -0
- package/dist/iterm2/rin.itermcolors +305 -0
- package/dist/iterm2/ritsu.itermcolors +305 -0
- package/dist/iterm2/rokkenjima.itermcolors +305 -0
- package/dist/iterm2/ryo.itermcolors +305 -0
- package/dist/iterm2/sans.itermcolors +305 -0
- package/dist/iterm2/satoko.itermcolors +305 -0
- package/dist/iterm2/sayaka.itermcolors +305 -0
- package/dist/iterm2/sayori.itermcolors +305 -0
- package/dist/iterm2/sei.itermcolors +305 -0
- package/dist/iterm2/seri.itermcolors +305 -0
- package/dist/iterm2/shinobu.itermcolors +305 -0
- package/dist/iterm2/skull.itermcolors +305 -0
- package/dist/iterm2/stella.itermcolors +305 -0
- package/dist/iterm2/suzuha.itermcolors +305 -0
- package/dist/iterm2/toriel.itermcolors +305 -0
- package/dist/iterm2/tsubasa.itermcolors +305 -0
- package/dist/iterm2/tsukasa.itermcolors +305 -0
- package/dist/iterm2/undyne.itermcolors +305 -0
- package/dist/iterm2/valhalla.itermcolors +305 -0
- package/dist/iterm2/velvet.itermcolors +305 -0
- package/dist/iterm2/venus.itermcolors +305 -0
- package/dist/iterm2/yofukashi.itermcolors +305 -0
- package/dist/iterm2/youmu.itermcolors +305 -0
- package/dist/iterm2/yui.itermcolors +305 -0
- package/dist/iterm2/yuri.itermcolors +305 -0
- package/dist/kitty/config/alma.conf +4 -0
- package/dist/kitty/config/anko.conf +4 -0
- package/dist/kitty/config/asuka.conf +4 -0
- package/dist/kitty/config/azusa.conf +4 -0
- package/dist/kitty/config/battler.conf +4 -0
- package/dist/kitty/config/beatrice.conf +4 -0
- package/dist/kitty/config/bernkastel.conf +4 -0
- package/dist/kitty/config/bocchi.conf +4 -0
- package/dist/kitty/config/cirno.conf +4 -0
- package/dist/kitty/config/david.conf +4 -0
- package/dist/kitty/config/determination.conf +4 -0
- package/dist/kitty/config/dorothy.conf +4 -0
- package/dist/kitty/config/eva01.conf +4 -0
- package/dist/kitty/config/flandre.conf +4 -0
- package/dist/kitty/config/fox.conf +4 -0
- package/dist/kitty/config/glitch.conf +4 -0
- package/dist/kitty/config/hinamizawa.conf +4 -0
- package/dist/kitty/config/hitagi.conf +4 -0
- package/dist/kitty/config/homura.conf +4 -0
- package/dist/kitty/config/jill.conf +4 -0
- package/dist/kitty/config/joker.conf +4 -0
- package/dist/kitty/config/jupiter.conf +4 -0
- package/dist/kitty/config/kagami.conf +4 -0
- package/dist/kitty/config/kaito.conf +4 -0
- package/dist/kitty/config/kaworu.conf +4 -0
- package/dist/kitty/config/kita.conf +4 -0
- package/dist/kitty/config/konata.conf +4 -0
- package/dist/kitty/config/kou.conf +4 -0
- package/dist/kitty/config/kumori.conf +4 -0
- package/dist/kitty/config/kurisu.conf +4 -0
- package/dist/kitty/config/kyoko.conf +4 -0
- package/dist/kitty/config/kyubey.conf +4 -0
- package/dist/kitty/config/lain.conf +4 -0
- package/dist/kitty/config/lambdadelta.conf +4 -0
- package/dist/kitty/config/len.conf +4 -0
- package/dist/kitty/config/lucy.conf +4 -0
- package/dist/kitty/config/luka.conf +4 -0
- package/dist/kitty/config/madoka.conf +4 -0
- package/dist/kitty/config/magi.conf +4 -0
- package/dist/kitty/config/mami.conf +4 -0
- package/dist/kitty/config/marisa.conf +4 -0
- package/dist/kitty/config/mars.conf +4 -0
- package/dist/kitty/config/mayuri.conf +4 -0
- package/dist/kitty/config/meiko.conf +4 -0
- package/dist/kitty/config/mercury.conf +4 -0
- package/dist/kitty/config/mettaton.conf +4 -0
- package/dist/kitty/config/miku.conf +4 -0
- package/dist/kitty/config/mio.conf +4 -0
- package/dist/kitty/config/mion.conf +4 -0
- package/dist/kitty/config/misato.conf +4 -0
- package/dist/kitty/config/miyuki.conf +4 -0
- package/dist/kitty/config/monika.conf +4 -0
- package/dist/kitty/config/moon.conf +4 -0
- package/dist/kitty/config/mugi.conf +4 -0
- package/dist/kitty/config/nadeko.conf +4 -0
- package/dist/kitty/config/nagisa.conf +4 -0
- package/dist/kitty/config/natsuki.conf +4 -0
- package/dist/kitty/config/nazuna.conf +4 -0
- package/dist/kitty/config/neutral.conf +4 -0
- package/dist/kitty/config/nightcity.conf +4 -0
- package/dist/kitty/config/nijika.conf +4 -0
- package/dist/kitty/config/oracle.conf +4 -0
- package/dist/kitty/config/panther.conf +4 -0
- package/dist/kitty/config/papyrus.conf +4 -0
- package/dist/kitty/config/patchouli.conf +4 -0
- package/dist/kitty/config/queen.conf +4 -0
- package/dist/kitty/config/rebecca.conf +4 -0
- package/dist/kitty/config/rei.conf +4 -0
- package/dist/kitty/config/reimu.conf +4 -0
- package/dist/kitty/config/rena.conf +4 -0
- package/dist/kitty/config/rika.conf +4 -0
- package/dist/kitty/config/rin.conf +4 -0
- package/dist/kitty/config/ritsu.conf +4 -0
- package/dist/kitty/config/rokkenjima.conf +4 -0
- package/dist/kitty/config/ryo.conf +4 -0
- package/dist/kitty/config/sans.conf +4 -0
- package/dist/kitty/config/satoko.conf +4 -0
- package/dist/kitty/config/sayaka.conf +4 -0
- package/dist/kitty/config/sayori.conf +4 -0
- package/dist/kitty/config/sei.conf +4 -0
- package/dist/kitty/config/seri.conf +4 -0
- package/dist/kitty/config/shinobu.conf +4 -0
- package/dist/kitty/config/skull.conf +4 -0
- package/dist/kitty/config/stella.conf +4 -0
- package/dist/kitty/config/suzuha.conf +4 -0
- package/dist/kitty/config/toriel.conf +4 -0
- package/dist/kitty/config/tsubasa.conf +4 -0
- package/dist/kitty/config/tsukasa.conf +4 -0
- package/dist/kitty/config/undyne.conf +4 -0
- package/dist/kitty/config/valhalla.conf +4 -0
- package/dist/kitty/config/velvet.conf +4 -0
- package/dist/kitty/config/venus.conf +4 -0
- package/dist/kitty/config/yofukashi.conf +4 -0
- package/dist/kitty/config/youmu.conf +4 -0
- package/dist/kitty/config/yui.conf +4 -0
- package/dist/kitty/config/yuri.conf +4 -0
- package/dist/kitty/themes/alma.conf +24 -0
- package/dist/kitty/themes/anko.conf +24 -0
- package/dist/kitty/themes/asuka.conf +24 -0
- package/dist/kitty/themes/azusa.conf +24 -0
- package/dist/kitty/themes/battler.conf +24 -0
- package/dist/kitty/themes/beatrice.conf +24 -0
- package/dist/kitty/themes/bernkastel.conf +24 -0
- package/dist/kitty/themes/bocchi.conf +24 -0
- package/dist/kitty/themes/cirno.conf +24 -0
- package/dist/kitty/themes/david.conf +24 -0
- package/dist/kitty/themes/determination.conf +24 -0
- package/dist/kitty/themes/dorothy.conf +24 -0
- package/dist/kitty/themes/eva01.conf +24 -0
- package/dist/kitty/themes/flandre.conf +24 -0
- package/dist/kitty/themes/fox.conf +24 -0
- package/dist/kitty/themes/glitch.conf +24 -0
- package/dist/kitty/themes/hinamizawa.conf +24 -0
- package/dist/kitty/themes/hitagi.conf +24 -0
- package/dist/kitty/themes/homura.conf +24 -0
- package/dist/kitty/themes/jill.conf +24 -0
- package/dist/kitty/themes/joker.conf +24 -0
- package/dist/kitty/themes/jupiter.conf +24 -0
- package/dist/kitty/themes/kagami.conf +24 -0
- package/dist/kitty/themes/kaito.conf +24 -0
- package/dist/kitty/themes/kaworu.conf +24 -0
- package/dist/kitty/themes/kita.conf +24 -0
- package/dist/kitty/themes/konata.conf +24 -0
- package/dist/kitty/themes/kou.conf +24 -0
- package/dist/kitty/themes/kumori.conf +24 -0
- package/dist/kitty/themes/kurisu.conf +24 -0
- package/dist/kitty/themes/kyoko.conf +24 -0
- package/dist/kitty/themes/kyubey.conf +24 -0
- package/dist/kitty/themes/lain.conf +24 -0
- package/dist/kitty/themes/lambdadelta.conf +24 -0
- package/dist/kitty/themes/len.conf +24 -0
- package/dist/kitty/themes/lucy.conf +24 -0
- package/dist/kitty/themes/luka.conf +24 -0
- package/dist/kitty/themes/madoka.conf +24 -0
- package/dist/kitty/themes/magi.conf +24 -0
- package/dist/kitty/themes/mami.conf +24 -0
- package/dist/kitty/themes/marisa.conf +24 -0
- package/dist/kitty/themes/mars.conf +24 -0
- package/dist/kitty/themes/mayuri.conf +24 -0
- package/dist/kitty/themes/meiko.conf +24 -0
- package/dist/kitty/themes/mercury.conf +24 -0
- package/dist/kitty/themes/mettaton.conf +24 -0
- package/dist/kitty/themes/miku.conf +24 -0
- package/dist/kitty/themes/mio.conf +24 -0
- package/dist/kitty/themes/mion.conf +24 -0
- package/dist/kitty/themes/misato.conf +24 -0
- package/dist/kitty/themes/miyuki.conf +24 -0
- package/dist/kitty/themes/monika.conf +24 -0
- package/dist/kitty/themes/moon.conf +24 -0
- package/dist/kitty/themes/mugi.conf +24 -0
- package/dist/kitty/themes/nadeko.conf +24 -0
- package/dist/kitty/themes/nagisa.conf +24 -0
- package/dist/kitty/themes/natsuki.conf +24 -0
- package/dist/kitty/themes/nazuna.conf +24 -0
- package/dist/kitty/themes/neutral.conf +24 -0
- package/dist/kitty/themes/nightcity.conf +24 -0
- package/dist/kitty/themes/nijika.conf +24 -0
- package/dist/kitty/themes/oracle.conf +24 -0
- package/dist/kitty/themes/panther.conf +24 -0
- package/dist/kitty/themes/papyrus.conf +24 -0
- package/dist/kitty/themes/patchouli.conf +24 -0
- package/dist/kitty/themes/queen.conf +24 -0
- package/dist/kitty/themes/rebecca.conf +24 -0
- package/dist/kitty/themes/rei.conf +24 -0
- package/dist/kitty/themes/reimu.conf +24 -0
- package/dist/kitty/themes/rena.conf +24 -0
- package/dist/kitty/themes/rika.conf +24 -0
- package/dist/kitty/themes/rin.conf +24 -0
- package/dist/kitty/themes/ritsu.conf +24 -0
- package/dist/kitty/themes/rokkenjima.conf +24 -0
- package/dist/kitty/themes/ryo.conf +24 -0
- package/dist/kitty/themes/sans.conf +24 -0
- package/dist/kitty/themes/satoko.conf +24 -0
- package/dist/kitty/themes/sayaka.conf +24 -0
- package/dist/kitty/themes/sayori.conf +24 -0
- package/dist/kitty/themes/sei.conf +24 -0
- package/dist/kitty/themes/seri.conf +24 -0
- package/dist/kitty/themes/shinobu.conf +24 -0
- package/dist/kitty/themes/skull.conf +24 -0
- package/dist/kitty/themes/stella.conf +24 -0
- package/dist/kitty/themes/suzuha.conf +24 -0
- package/dist/kitty/themes/toriel.conf +24 -0
- package/dist/kitty/themes/tsubasa.conf +24 -0
- package/dist/kitty/themes/tsukasa.conf +24 -0
- package/dist/kitty/themes/undyne.conf +24 -0
- package/dist/kitty/themes/valhalla.conf +24 -0
- package/dist/kitty/themes/velvet.conf +24 -0
- package/dist/kitty/themes/venus.conf +24 -0
- package/dist/kitty/themes/yofukashi.conf +24 -0
- package/dist/kitty/themes/youmu.conf +24 -0
- package/dist/kitty/themes/yui.conf +24 -0
- package/dist/kitty/themes/yuri.conf +24 -0
- package/dist/shell/palettes.zsh +387 -0
- package/dist/wezterm/colors/alma.toml +15 -0
- package/dist/wezterm/colors/anko.toml +15 -0
- package/dist/wezterm/colors/asuka.toml +15 -0
- package/dist/wezterm/colors/azusa.toml +15 -0
- package/dist/wezterm/colors/battler.toml +15 -0
- package/dist/wezterm/colors/beatrice.toml +15 -0
- package/dist/wezterm/colors/bernkastel.toml +15 -0
- package/dist/wezterm/colors/bocchi.toml +15 -0
- package/dist/wezterm/colors/cirno.toml +15 -0
- package/dist/wezterm/colors/david.toml +15 -0
- package/dist/wezterm/colors/determination.toml +15 -0
- package/dist/wezterm/colors/dorothy.toml +15 -0
- package/dist/wezterm/colors/eva01.toml +15 -0
- package/dist/wezterm/colors/flandre.toml +15 -0
- package/dist/wezterm/colors/fox.toml +15 -0
- package/dist/wezterm/colors/glitch.toml +15 -0
- package/dist/wezterm/colors/hinamizawa.toml +15 -0
- package/dist/wezterm/colors/hitagi.toml +15 -0
- package/dist/wezterm/colors/homura.toml +15 -0
- package/dist/wezterm/colors/jill.toml +15 -0
- package/dist/wezterm/colors/joker.toml +15 -0
- package/dist/wezterm/colors/jupiter.toml +15 -0
- package/dist/wezterm/colors/kagami.toml +15 -0
- package/dist/wezterm/colors/kaito.toml +15 -0
- package/dist/wezterm/colors/kaworu.toml +15 -0
- package/dist/wezterm/colors/kita.toml +15 -0
- package/dist/wezterm/colors/konata.toml +15 -0
- package/dist/wezterm/colors/kou.toml +15 -0
- package/dist/wezterm/colors/kumori.toml +15 -0
- package/dist/wezterm/colors/kurisu.toml +15 -0
- package/dist/wezterm/colors/kyoko.toml +15 -0
- package/dist/wezterm/colors/kyubey.toml +15 -0
- package/dist/wezterm/colors/lain.toml +15 -0
- package/dist/wezterm/colors/lambdadelta.toml +15 -0
- package/dist/wezterm/colors/len.toml +15 -0
- package/dist/wezterm/colors/lucy.toml +15 -0
- package/dist/wezterm/colors/luka.toml +15 -0
- package/dist/wezterm/colors/madoka.toml +15 -0
- package/dist/wezterm/colors/magi.toml +15 -0
- package/dist/wezterm/colors/mami.toml +15 -0
- package/dist/wezterm/colors/marisa.toml +15 -0
- package/dist/wezterm/colors/mars.toml +15 -0
- package/dist/wezterm/colors/mayuri.toml +15 -0
- package/dist/wezterm/colors/meiko.toml +15 -0
- package/dist/wezterm/colors/mercury.toml +15 -0
- package/dist/wezterm/colors/mettaton.toml +15 -0
- package/dist/wezterm/colors/miku.toml +15 -0
- package/dist/wezterm/colors/mio.toml +15 -0
- package/dist/wezterm/colors/mion.toml +15 -0
- package/dist/wezterm/colors/misato.toml +15 -0
- package/dist/wezterm/colors/miyuki.toml +15 -0
- package/dist/wezterm/colors/monika.toml +15 -0
- package/dist/wezterm/colors/moon.toml +15 -0
- package/dist/wezterm/colors/mugi.toml +15 -0
- package/dist/wezterm/colors/nadeko.toml +15 -0
- package/dist/wezterm/colors/nagisa.toml +15 -0
- package/dist/wezterm/colors/natsuki.toml +15 -0
- package/dist/wezterm/colors/nazuna.toml +15 -0
- package/dist/wezterm/colors/neutral.toml +15 -0
- package/dist/wezterm/colors/nightcity.toml +15 -0
- package/dist/wezterm/colors/nijika.toml +15 -0
- package/dist/wezterm/colors/oracle.toml +15 -0
- package/dist/wezterm/colors/panther.toml +15 -0
- package/dist/wezterm/colors/papyrus.toml +15 -0
- package/dist/wezterm/colors/patchouli.toml +15 -0
- package/dist/wezterm/colors/queen.toml +15 -0
- package/dist/wezterm/colors/rebecca.toml +15 -0
- package/dist/wezterm/colors/rei.toml +15 -0
- package/dist/wezterm/colors/reimu.toml +15 -0
- package/dist/wezterm/colors/rena.toml +15 -0
- package/dist/wezterm/colors/rika.toml +15 -0
- package/dist/wezterm/colors/rin.toml +15 -0
- package/dist/wezterm/colors/ritsu.toml +15 -0
- package/dist/wezterm/colors/rokkenjima.toml +15 -0
- package/dist/wezterm/colors/ryo.toml +15 -0
- package/dist/wezterm/colors/sans.toml +15 -0
- package/dist/wezterm/colors/satoko.toml +15 -0
- package/dist/wezterm/colors/sayaka.toml +15 -0
- package/dist/wezterm/colors/sayori.toml +15 -0
- package/dist/wezterm/colors/sei.toml +15 -0
- package/dist/wezterm/colors/seri.toml +15 -0
- package/dist/wezterm/colors/shinobu.toml +15 -0
- package/dist/wezterm/colors/skull.toml +15 -0
- package/dist/wezterm/colors/stella.toml +15 -0
- package/dist/wezterm/colors/suzuha.toml +15 -0
- package/dist/wezterm/colors/toriel.toml +15 -0
- package/dist/wezterm/colors/tsubasa.toml +15 -0
- package/dist/wezterm/colors/tsukasa.toml +15 -0
- package/dist/wezterm/colors/undyne.toml +15 -0
- package/dist/wezterm/colors/valhalla.toml +15 -0
- package/dist/wezterm/colors/velvet.toml +15 -0
- package/dist/wezterm/colors/venus.toml +15 -0
- package/dist/wezterm/colors/yofukashi.toml +15 -0
- package/dist/wezterm/colors/youmu.toml +15 -0
- package/dist/wezterm/colors/yui.toml +15 -0
- package/dist/wezterm/colors/yuri.toml +15 -0
- package/dist/wezterm/config/alma.lua +10 -0
- package/dist/wezterm/config/anko.lua +10 -0
- package/dist/wezterm/config/asuka.lua +10 -0
- package/dist/wezterm/config/azusa.lua +10 -0
- package/dist/wezterm/config/battler.lua +10 -0
- package/dist/wezterm/config/beatrice.lua +10 -0
- package/dist/wezterm/config/bernkastel.lua +10 -0
- package/dist/wezterm/config/bocchi.lua +10 -0
- package/dist/wezterm/config/cirno.lua +10 -0
- package/dist/wezterm/config/david.lua +10 -0
- package/dist/wezterm/config/determination.lua +10 -0
- package/dist/wezterm/config/dorothy.lua +10 -0
- package/dist/wezterm/config/eva01.lua +10 -0
- package/dist/wezterm/config/flandre.lua +10 -0
- package/dist/wezterm/config/fox.lua +10 -0
- package/dist/wezterm/config/glitch.lua +10 -0
- package/dist/wezterm/config/hinamizawa.lua +10 -0
- package/dist/wezterm/config/hitagi.lua +10 -0
- package/dist/wezterm/config/homura.lua +10 -0
- package/dist/wezterm/config/jill.lua +10 -0
- package/dist/wezterm/config/joker.lua +10 -0
- package/dist/wezterm/config/jupiter.lua +10 -0
- package/dist/wezterm/config/kagami.lua +10 -0
- package/dist/wezterm/config/kaito.lua +10 -0
- package/dist/wezterm/config/kaworu.lua +10 -0
- package/dist/wezterm/config/kita.lua +10 -0
- package/dist/wezterm/config/konata.lua +10 -0
- package/dist/wezterm/config/kou.lua +10 -0
- package/dist/wezterm/config/kumori.lua +10 -0
- package/dist/wezterm/config/kurisu.lua +10 -0
- package/dist/wezterm/config/kyoko.lua +10 -0
- package/dist/wezterm/config/kyubey.lua +10 -0
- package/dist/wezterm/config/lain.lua +10 -0
- package/dist/wezterm/config/lambdadelta.lua +10 -0
- package/dist/wezterm/config/len.lua +10 -0
- package/dist/wezterm/config/lucy.lua +10 -0
- package/dist/wezterm/config/luka.lua +10 -0
- package/dist/wezterm/config/madoka.lua +10 -0
- package/dist/wezterm/config/magi.lua +10 -0
- package/dist/wezterm/config/mami.lua +10 -0
- package/dist/wezterm/config/marisa.lua +10 -0
- package/dist/wezterm/config/mars.lua +10 -0
- package/dist/wezterm/config/mayuri.lua +10 -0
- package/dist/wezterm/config/meiko.lua +10 -0
- package/dist/wezterm/config/mercury.lua +10 -0
- package/dist/wezterm/config/mettaton.lua +10 -0
- package/dist/wezterm/config/miku.lua +10 -0
- package/dist/wezterm/config/mio.lua +10 -0
- package/dist/wezterm/config/mion.lua +10 -0
- package/dist/wezterm/config/misato.lua +10 -0
- package/dist/wezterm/config/miyuki.lua +10 -0
- package/dist/wezterm/config/monika.lua +10 -0
- package/dist/wezterm/config/moon.lua +10 -0
- package/dist/wezterm/config/mugi.lua +10 -0
- package/dist/wezterm/config/nadeko.lua +10 -0
- package/dist/wezterm/config/nagisa.lua +10 -0
- package/dist/wezterm/config/natsuki.lua +10 -0
- package/dist/wezterm/config/nazuna.lua +10 -0
- package/dist/wezterm/config/neutral.lua +10 -0
- package/dist/wezterm/config/nightcity.lua +10 -0
- package/dist/wezterm/config/nijika.lua +10 -0
- package/dist/wezterm/config/oracle.lua +10 -0
- package/dist/wezterm/config/panther.lua +10 -0
- package/dist/wezterm/config/papyrus.lua +10 -0
- package/dist/wezterm/config/patchouli.lua +10 -0
- package/dist/wezterm/config/queen.lua +10 -0
- package/dist/wezterm/config/rebecca.lua +10 -0
- package/dist/wezterm/config/rei.lua +10 -0
- package/dist/wezterm/config/reimu.lua +10 -0
- package/dist/wezterm/config/rena.lua +10 -0
- package/dist/wezterm/config/rika.lua +10 -0
- package/dist/wezterm/config/rin.lua +10 -0
- package/dist/wezterm/config/ritsu.lua +10 -0
- package/dist/wezterm/config/rokkenjima.lua +10 -0
- package/dist/wezterm/config/ryo.lua +10 -0
- package/dist/wezterm/config/sans.lua +10 -0
- package/dist/wezterm/config/satoko.lua +10 -0
- package/dist/wezterm/config/sayaka.lua +10 -0
- package/dist/wezterm/config/sayori.lua +10 -0
- package/dist/wezterm/config/sei.lua +10 -0
- package/dist/wezterm/config/seri.lua +10 -0
- package/dist/wezterm/config/shinobu.lua +10 -0
- package/dist/wezterm/config/skull.lua +10 -0
- package/dist/wezterm/config/stella.lua +10 -0
- package/dist/wezterm/config/suzuha.lua +10 -0
- package/dist/wezterm/config/toriel.lua +10 -0
- package/dist/wezterm/config/tsubasa.lua +10 -0
- package/dist/wezterm/config/tsukasa.lua +10 -0
- package/dist/wezterm/config/undyne.lua +10 -0
- package/dist/wezterm/config/valhalla.lua +10 -0
- package/dist/wezterm/config/velvet.lua +10 -0
- package/dist/wezterm/config/venus.lua +10 -0
- package/dist/wezterm/config/yofukashi.lua +10 -0
- package/dist/wezterm/config/youmu.lua +10 -0
- package/dist/wezterm/config/yui.lua +10 -0
- package/dist/wezterm/config/yuri.lua +10 -0
- package/ghostty/shaders/LICENSE +21 -0
- package/ghostty/shaders/README.md +31 -0
- package/ghostty/shaders/cursor_tail.glsl +243 -0
- package/ghostty/shaders/ripple_cursor.glsl +141 -0
- package/package.json +43 -0
- package/shell/adapters/_osc.zsh +35 -0
- package/shell/adapters/kitty.zsh +30 -0
- package/shell/launch-tab.zsh +11 -0
- package/shell/ttheme.zsh +583 -0
package/shell/ttheme.zsh
ADDED
|
@@ -0,0 +1,583 @@
|
|
|
1
|
+
typeset -g TTHEME_HOME=${${(%):-%x}:A:h}
|
|
2
|
+
|
|
3
|
+
if [[ -r $TTHEME_HOME/palettes.zsh ]]; then
|
|
4
|
+
source $TTHEME_HOME/palettes.zsh
|
|
5
|
+
elif [[ -r $TTHEME_HOME/../dist/shell/palettes.zsh ]]; then
|
|
6
|
+
source $TTHEME_HOME/../dist/shell/palettes.zsh
|
|
7
|
+
else
|
|
8
|
+
print -u2 "ttheme: palettes.zsh not found — run \`mise run build\` in the repo"
|
|
9
|
+
return 1
|
|
10
|
+
fi
|
|
11
|
+
|
|
12
|
+
: ${TTHEME_TAB_PALETTE:=seq}
|
|
13
|
+
|
|
14
|
+
: ${TTHEME_ANNOUNCE:=1}
|
|
15
|
+
|
|
16
|
+
typeset -g TTHEME_STATE_DIR=${XDG_STATE_HOME:-$HOME/.local/state}/ttheme
|
|
17
|
+
|
|
18
|
+
__tt_detect() {
|
|
19
|
+
if [[ -n $GHOSTTY_RESOURCES_DIR || $TERM_PROGRAM == ghostty ]]; then
|
|
20
|
+
print -r -- ghostty
|
|
21
|
+
elif [[ -n $KITTY_WINDOW_ID ]]; then
|
|
22
|
+
print -r -- kitty
|
|
23
|
+
elif [[ -n $WEZTERM_PANE ]]; then
|
|
24
|
+
print -r -- wezterm
|
|
25
|
+
elif [[ -n $ALACRITTY_WINDOW_ID ]]; then
|
|
26
|
+
print -r -- alacritty
|
|
27
|
+
elif [[ -n $ITERM_SESSION_ID || $TERM_PROGRAM == iTerm.app ]]; then
|
|
28
|
+
print -r -- iterm2
|
|
29
|
+
elif [[ $TERM == foot* ]]; then
|
|
30
|
+
print -r -- foot
|
|
31
|
+
else
|
|
32
|
+
print -r -- unknown
|
|
33
|
+
fi
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
typeset -g TTHEME_ADAPTER=$(__tt_detect)
|
|
37
|
+
|
|
38
|
+
source $TTHEME_HOME/adapters/_osc.zsh
|
|
39
|
+
[[ -r $TTHEME_HOME/adapters/$TTHEME_ADAPTER.zsh ]] &&
|
|
40
|
+
source $TTHEME_HOME/adapters/$TTHEME_ADAPTER.zsh
|
|
41
|
+
|
|
42
|
+
__tt_active() {
|
|
43
|
+
[[ -o interactive ]] || return 1
|
|
44
|
+
[[ $TTHEME_ADAPTER != unknown || -n $TTHEME_FORCE ]]
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
__tt_spec() {
|
|
48
|
+
local spec=${TTHEME_PALETTE[$1]}
|
|
49
|
+
[[ -n $spec ]] || return 1
|
|
50
|
+
print -r -- "$spec"
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
__tt_name_of() {
|
|
54
|
+
local k
|
|
55
|
+
for k in ${(k)TTHEME_PALETTE}; do
|
|
56
|
+
[[ $TTHEME_PALETTE[$k] == $1 ]] && { print -r -- "$k"; return 0 }
|
|
57
|
+
done
|
|
58
|
+
print -r -- custom
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
__tt_color() { [[ -t 1 && -z $NO_COLOR ]] }
|
|
62
|
+
|
|
63
|
+
__tt_palette_line() {
|
|
64
|
+
local name=$1 marker=$2
|
|
65
|
+
local -a p=(${=TTHEME_PALETTE[$name]})
|
|
66
|
+
(( ${#p} >= 20 )) || return 1
|
|
67
|
+
local bg=${p[1]#\#} cur=${p[3]#\#}
|
|
68
|
+
printf '\033[48;2;%d;%d;%d;38;2;%d;%d;%dm ● \033[0m %-8s \033[2m· ANSI %s\033[0m%s\n' \
|
|
69
|
+
$((16#${bg:0:2})) $((16#${bg:2:2})) $((16#${bg:4:2})) \
|
|
70
|
+
$((16#${cur:0:2})) $((16#${cur:2:2})) $((16#${cur:4:2})) \
|
|
71
|
+
"$name" "${TTHEME_SRC[$name]:-unknown}" "$marker"
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
__tt_announce() {
|
|
75
|
+
(( TTHEME_ANNOUNCE )) || return 0
|
|
76
|
+
local -a p=(${=TTHEME_SPEC})
|
|
77
|
+
(( ${#p} >= 20 )) || return 0
|
|
78
|
+
local name=$(__tt_name_of "$TTHEME_SPEC")
|
|
79
|
+
local grp=${TTHEME_GROUP[$name]:-Other} src=${TTHEME_SRC[$name]:-unknown}
|
|
80
|
+
if ! __tt_color; then
|
|
81
|
+
print -r -- "$name · $grp · ANSI $src"
|
|
82
|
+
return 0
|
|
83
|
+
fi
|
|
84
|
+
local cur=${p[3]#\#} sel=${p[4]#\#}
|
|
85
|
+
printf '\033[48;2;%d;%d;%dm %s \033[0m\n\033[7;1;38;2;%d;%d;%dm %s \033[0m \033[2m· ANSI %s\033[0m\n' \
|
|
86
|
+
$((16#${sel:0:2})) $((16#${sel:2:2})) $((16#${sel:4:2})) "$grp" \
|
|
87
|
+
$((16#${cur:0:2})) $((16#${cur:2:2})) $((16#${cur:4:2})) "$name" "$src"
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
__tt_menu() {
|
|
91
|
+
local k cur="" mark grp last_grp=""
|
|
92
|
+
if ! __tt_color; then
|
|
93
|
+
for k in $TTHEME_ORDER; do
|
|
94
|
+
printf '%s\t%s\t%s\n' "$k" "${TTHEME_GROUP[$k]:-Other}" "${TTHEME_SRC[$k]:-unknown}"
|
|
95
|
+
done
|
|
96
|
+
return 0
|
|
97
|
+
fi
|
|
98
|
+
[[ -n $TTHEME_SPEC ]] && cur=$(__tt_name_of "$TTHEME_SPEC")
|
|
99
|
+
for k in $TTHEME_ORDER; do
|
|
100
|
+
grp=${TTHEME_GROUP[$k]:-Other}
|
|
101
|
+
if [[ $grp != $last_grp ]]; then
|
|
102
|
+
printf '\033[1m%s\033[0m' "$grp"
|
|
103
|
+
[[ -n ${TTHEME_NATIVE[$k]} ]] && printf ' \033[2m%s\033[0m' "${TTHEME_NATIVE[$k]}"
|
|
104
|
+
printf '\n'
|
|
105
|
+
last_grp=$grp
|
|
106
|
+
fi
|
|
107
|
+
mark=""
|
|
108
|
+
[[ $k == $cur ]] && mark=" ← current"
|
|
109
|
+
__tt_palette_line "$k" "$mark"
|
|
110
|
+
done
|
|
111
|
+
printf '\n\033[2mttheme <name> paints this tab · ttheme preview · ttheme help\033[0m\n'
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
__tt_help() {
|
|
115
|
+
print -r -- 'ttheme — character terminal palettes
|
|
116
|
+
|
|
117
|
+
ttheme list every palette, grouped, with previews
|
|
118
|
+
ttheme homura paint this tab (a unique prefix works: ttheme ho)
|
|
119
|
+
ttheme preview browse live — focus repaints, enter keeps, esc restores
|
|
120
|
+
ttheme next advance this tab to the next palette
|
|
121
|
+
ttheme current what this tab is using (just the name when piped)
|
|
122
|
+
|
|
123
|
+
TTHEME_TAB_PALETTE=off new tabs inherit the window'\''s colors
|
|
124
|
+
TTHEME_ANNOUNCE=0 silence the notice under "Last login:"'
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
__tt_resolve() {
|
|
128
|
+
local name=$1 k
|
|
129
|
+
if [[ -n ${TTHEME_PALETTE[$name]} ]]; then
|
|
130
|
+
REPLY=$name
|
|
131
|
+
return 0
|
|
132
|
+
fi
|
|
133
|
+
local -a m=()
|
|
134
|
+
for k in ${(k)TTHEME_PALETTE}; do
|
|
135
|
+
[[ $k == $name* ]] && m+=$k
|
|
136
|
+
done
|
|
137
|
+
if (( ${#m} == 1 )); then
|
|
138
|
+
REPLY=$m[1]
|
|
139
|
+
return 0
|
|
140
|
+
elif (( ${#m} > 1 )); then
|
|
141
|
+
m=(${(o)m})
|
|
142
|
+
print -u2 "multiple palettes start with '$name': $m"
|
|
143
|
+
elif m=(${(o)${(M)${(k)TTHEME_PALETTE}:#*$name*}}) && (( ${#m} )); then
|
|
144
|
+
print -u2 "unknown palette '$name' — did you mean: ${(j:, :)m[1,3]}?"
|
|
145
|
+
else
|
|
146
|
+
print -u2 "unknown palette '$name' — run \`ttheme\` to list palettes"
|
|
147
|
+
fi
|
|
148
|
+
return 1
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
__tt_next() {
|
|
152
|
+
local f=$TTHEME_STATE_DIR/.rotation idx=0
|
|
153
|
+
mkdir -p $TTHEME_STATE_DIR 2>/dev/null
|
|
154
|
+
[[ -r $f ]] && idx=$(<$f)
|
|
155
|
+
[[ $idx == <-> ]] || idx=0
|
|
156
|
+
(( idx = idx % ${#TTHEME_ROTATION} + 1 ))
|
|
157
|
+
print -r -- $idx > $f 2>/dev/null
|
|
158
|
+
REPLY=${TTHEME_PALETTE[$TTHEME_ROTATION[idx]]}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
__tt_current() {
|
|
162
|
+
if [[ -z $TTHEME_SPEC ]]; then
|
|
163
|
+
print -u2 "ttheme current: no palette assigned to this shell"
|
|
164
|
+
return 1
|
|
165
|
+
fi
|
|
166
|
+
local name=$(__tt_name_of "$TTHEME_SPEC")
|
|
167
|
+
if ! __tt_color; then
|
|
168
|
+
print -r -- "$name"
|
|
169
|
+
elif [[ -n ${TTHEME_PALETTE[$name]} ]]; then
|
|
170
|
+
__tt_palette_line "$name"
|
|
171
|
+
else
|
|
172
|
+
print -r -- "custom $TTHEME_SPEC"
|
|
173
|
+
fi
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
__tt_rotate() {
|
|
177
|
+
if [[ $TTHEME_TAB_PALETTE == off ]]; then
|
|
178
|
+
print -u2 "ttheme next: TTHEME_TAB_PALETTE is off"
|
|
179
|
+
return 1
|
|
180
|
+
fi
|
|
181
|
+
local REPLY
|
|
182
|
+
__tt_next
|
|
183
|
+
__tt_apply "$REPLY"
|
|
184
|
+
TTHEME_SPEC=$REPLY
|
|
185
|
+
__tt_announce
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
__tt_pv_rows() {
|
|
189
|
+
rtype=() rval=()
|
|
190
|
+
local g t
|
|
191
|
+
local -a ts
|
|
192
|
+
for g in $groups; do
|
|
193
|
+
ts=()
|
|
194
|
+
for t in ${=gthemes[$g]}; do
|
|
195
|
+
[[ -z $flt || $t == *$flt* ]] && ts+=($t)
|
|
196
|
+
done
|
|
197
|
+
[[ -n $flt ]] && (( ! ${#ts} )) && continue
|
|
198
|
+
rtype+=(hdr); rval+=($g)
|
|
199
|
+
if [[ -n $flt || -n ${exp[$g]} ]]; then
|
|
200
|
+
for t in $ts; do rtype+=(thm); rval+=($t); done
|
|
201
|
+
fi
|
|
202
|
+
done
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
__tt_pv_first() {
|
|
206
|
+
local i
|
|
207
|
+
cur=1 top=1
|
|
208
|
+
for (( i = 1; i <= ${#rtype}; i++ )); do
|
|
209
|
+
[[ ${rtype[i]} == thm ]] && { cur=$i; return 0 }
|
|
210
|
+
done
|
|
211
|
+
return 0
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
__tt_pv_goto() {
|
|
215
|
+
local name=$1 i
|
|
216
|
+
exp[${TTHEME_GROUP[$name]:-Other}]=1
|
|
217
|
+
__tt_pv_rows
|
|
218
|
+
for (( i = 1; i <= ${#rval}; i++ )); do
|
|
219
|
+
[[ ${rtype[i]} == thm && ${rval[i]} == $name ]] && { cur=$i; return 0 }
|
|
220
|
+
done
|
|
221
|
+
cur=1
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
__tt_pv_focus() {
|
|
225
|
+
[[ ${rtype[cur]} == thm ]] || return 0
|
|
226
|
+
local spec=${TTHEME_PALETTE[${rval[cur]}]}
|
|
227
|
+
[[ $spec == "$applied" ]] && return 0
|
|
228
|
+
__tt_apply "$spec"
|
|
229
|
+
applied=$spec
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
__tt_pv_toggle() {
|
|
233
|
+
[[ -n $flt ]] && return 0
|
|
234
|
+
local g=${rval[cur]}
|
|
235
|
+
if [[ -n ${exp[$g]} ]]; then
|
|
236
|
+
exp[$g]=""
|
|
237
|
+
else
|
|
238
|
+
exp[$g]=1
|
|
239
|
+
fi
|
|
240
|
+
__tt_pv_rows
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
__tt_pv_left() {
|
|
244
|
+
[[ -n $flt ]] && return 0
|
|
245
|
+
if [[ ${rtype[cur]} == hdr ]]; then
|
|
246
|
+
[[ -n ${exp[${rval[cur]}]} ]] && __tt_pv_toggle
|
|
247
|
+
return 0
|
|
248
|
+
fi
|
|
249
|
+
local g=${TTHEME_GROUP[${rval[cur]}]:-Other} i
|
|
250
|
+
for (( i = cur; i >= 1; i-- )); do
|
|
251
|
+
[[ ${rtype[i]} == hdr ]] && { cur=$i; break }
|
|
252
|
+
done
|
|
253
|
+
exp[$g]=""
|
|
254
|
+
__tt_pv_rows
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
__tt_pv_draw() {
|
|
258
|
+
local h=$(( ${LINES:-24} - 2 )) i out line g arrow chunk hidden
|
|
259
|
+
(( h < 1 )) && h=1
|
|
260
|
+
(( cur < top )) && top=$cur
|
|
261
|
+
(( cur >= top + h )) && top=$(( cur - h + 1 ))
|
|
262
|
+
(( top < 1 )) && top=1
|
|
263
|
+
out=$'\e[H'
|
|
264
|
+
line="ttheme preview"
|
|
265
|
+
(( color )) && line=$'\e[1m'"ttheme preview"$'\e[0m'
|
|
266
|
+
if [[ -n ${TTHEME_PALETTE[$cn]} ]]; then
|
|
267
|
+
if (( color )); then
|
|
268
|
+
line+=" $cdot $cn"
|
|
269
|
+
else
|
|
270
|
+
line+=" current $cn"
|
|
271
|
+
fi
|
|
272
|
+
fi
|
|
273
|
+
[[ -n $flt ]] && line+=" /$flt"
|
|
274
|
+
out+=$line$'\e[K\n'
|
|
275
|
+
for (( i = top; i < top + h; i++ )); do
|
|
276
|
+
if (( ! ${#rval} && i == 1 )); then
|
|
277
|
+
out+=" no palettes match '$flt'"$'\e[K\n'
|
|
278
|
+
continue
|
|
279
|
+
fi
|
|
280
|
+
if (( i > ${#rval} )); then
|
|
281
|
+
out+=$'\e[K\n'
|
|
282
|
+
continue
|
|
283
|
+
fi
|
|
284
|
+
if [[ ${rtype[i]} == hdr ]]; then
|
|
285
|
+
g=${rval[i]}
|
|
286
|
+
arrow=▸
|
|
287
|
+
[[ -n $flt || -n ${exp[$g]} ]] && arrow=▾
|
|
288
|
+
if (( i == cur )); then
|
|
289
|
+
if (( color )); then
|
|
290
|
+
chunk=$'\e[1;7m'" $g "$'\e[0m'
|
|
291
|
+
else
|
|
292
|
+
chunk="[$g]"
|
|
293
|
+
fi
|
|
294
|
+
else
|
|
295
|
+
chunk=${hchip[$g]}
|
|
296
|
+
fi
|
|
297
|
+
line="$arrow"$chunk${hnat[$g]}
|
|
298
|
+
if [[ -n ${TTHEME_PALETTE[$cn]} && ${TTHEME_GROUP[$cn]:-Other} == $g ]]; then
|
|
299
|
+
hidden=1
|
|
300
|
+
if [[ -n $flt ]]; then
|
|
301
|
+
[[ $cn == *$flt* ]] && hidden=0
|
|
302
|
+
elif [[ -n ${exp[$g]} ]]; then
|
|
303
|
+
hidden=0
|
|
304
|
+
fi
|
|
305
|
+
if (( hidden )); then
|
|
306
|
+
if (( color )); then
|
|
307
|
+
line+=$cchip
|
|
308
|
+
else
|
|
309
|
+
line+=" · current"
|
|
310
|
+
fi
|
|
311
|
+
fi
|
|
312
|
+
fi
|
|
313
|
+
elif (( i == cur )); then
|
|
314
|
+
line=" ▶ "${tbody[${rval[i]}]}
|
|
315
|
+
else
|
|
316
|
+
line=" "${tbody[${rval[i]}]}
|
|
317
|
+
fi
|
|
318
|
+
out+=$line$'\e[K\n'
|
|
319
|
+
done
|
|
320
|
+
line="↑↓ move · ←→ fold · type to filter · enter apply · esc restore"
|
|
321
|
+
(( color )) && line=$'\e[2m'$line$'\e[0m'
|
|
322
|
+
out+=$line$'\e[K'
|
|
323
|
+
print -rn -- "$out"
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
__tt_pv_init() {
|
|
327
|
+
local k g
|
|
328
|
+
for k in $TTHEME_ORDER; do
|
|
329
|
+
g=${TTHEME_GROUP[$k]:-Other}
|
|
330
|
+
if [[ -z ${gthemes[$g]} ]]; then
|
|
331
|
+
groups+=($g)
|
|
332
|
+
gnative[$g]=$TTHEME_NATIVE[$k]
|
|
333
|
+
fi
|
|
334
|
+
gthemes[$g]+=" $k"
|
|
335
|
+
done
|
|
336
|
+
[[ -n $orig ]] && cn=$(__tt_name_of "$orig")
|
|
337
|
+
if [[ -n ${TTHEME_PALETTE[$cn]} ]] && (( color )); then
|
|
338
|
+
local -a cp=(${=TTHEME_PALETTE[$cn]})
|
|
339
|
+
local ch=${cp[3]#\#}
|
|
340
|
+
printf -v cdot '\e[38;2;%d;%d;%dm●\e[0m' \
|
|
341
|
+
$((16#${ch:0:2})) $((16#${ch:2:2})) $((16#${ch:4:2}))
|
|
342
|
+
printf -v cchip ' \e[7;1;38;2;%d;%d;%dm current \e[0m' \
|
|
343
|
+
$((16#${ch:0:2})) $((16#${ch:2:2})) $((16#${ch:4:2}))
|
|
344
|
+
fi
|
|
345
|
+
local body nat
|
|
346
|
+
for g in $groups; do
|
|
347
|
+
nat=${gnative[$g]}
|
|
348
|
+
if (( color )); then
|
|
349
|
+
local -a gp=(${=TTHEME_PALETTE[${${=gthemes[$g]}[1]}]})
|
|
350
|
+
local sb=${gp[4]#\#}
|
|
351
|
+
printf -v body '\e[48;2;%d;%d;%dm %s \e[0m' \
|
|
352
|
+
$((16#${sb:0:2})) $((16#${sb:2:2})) $((16#${sb:4:2})) "$g"
|
|
353
|
+
hchip[$g]=$body
|
|
354
|
+
hnat[$g]=${nat:+$'\e[2m'$nat$'\e[0m'}
|
|
355
|
+
else
|
|
356
|
+
hchip[$g]=" $g "
|
|
357
|
+
hnat[$g]=$nat
|
|
358
|
+
fi
|
|
359
|
+
done
|
|
360
|
+
local t mark
|
|
361
|
+
for t in $TTHEME_ORDER; do
|
|
362
|
+
mark=""
|
|
363
|
+
if [[ $t == $cn ]]; then
|
|
364
|
+
if (( color )); then
|
|
365
|
+
mark=$cchip
|
|
366
|
+
else
|
|
367
|
+
mark=" ← current"
|
|
368
|
+
fi
|
|
369
|
+
fi
|
|
370
|
+
if (( color )); then
|
|
371
|
+
local -a tp=(${=TTHEME_PALETTE[$t]})
|
|
372
|
+
local bg=${tp[1]#\#} cu=${tp[3]#\#}
|
|
373
|
+
printf -v body '\e[48;2;%d;%d;%d;38;2;%d;%d;%dm ● \e[0m %-13s \e[2m· ANSI %s\e[0m%s' \
|
|
374
|
+
$((16#${bg:0:2})) $((16#${bg:2:2})) $((16#${bg:4:2})) \
|
|
375
|
+
$((16#${cu:0:2})) $((16#${cu:2:2})) $((16#${cu:4:2})) \
|
|
376
|
+
"$t" "${TTHEME_SRC[$t]:-unknown}" "$mark"
|
|
377
|
+
else
|
|
378
|
+
printf -v body '● %-13s · ANSI %s%s' "$t" "${TTHEME_SRC[$t]:-unknown}" "$mark"
|
|
379
|
+
fi
|
|
380
|
+
tbody[$t]=$body
|
|
381
|
+
done
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
__tt_pv_getch() {
|
|
385
|
+
if (( $# )); then
|
|
386
|
+
read -sk 1 -t $1 2>/dev/null
|
|
387
|
+
else
|
|
388
|
+
read -sk 1 2>/dev/null
|
|
389
|
+
fi
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
__tt_pv_read() {
|
|
393
|
+
key=""
|
|
394
|
+
if (( $# )); then
|
|
395
|
+
__tt_pv_getch 0 || return 1
|
|
396
|
+
else
|
|
397
|
+
__tt_pv_getch || return 1
|
|
398
|
+
fi
|
|
399
|
+
key=$REPLY
|
|
400
|
+
[[ $key == $'\e' ]] || return 0
|
|
401
|
+
local seq=""
|
|
402
|
+
if ! __tt_pv_getch 0.05; then
|
|
403
|
+
key=esc
|
|
404
|
+
return 0
|
|
405
|
+
fi
|
|
406
|
+
if [[ $REPLY != '[' && $REPLY != O ]]; then
|
|
407
|
+
key=nop
|
|
408
|
+
return 0
|
|
409
|
+
fi
|
|
410
|
+
while __tt_pv_getch 0.05; do
|
|
411
|
+
seq+=$REPLY
|
|
412
|
+
[[ $REPLY == [A-Za-z~] ]] && break
|
|
413
|
+
done
|
|
414
|
+
case $seq in
|
|
415
|
+
A) key=up ;;
|
|
416
|
+
B) key=down ;;
|
|
417
|
+
C) key=right ;;
|
|
418
|
+
D) key=left ;;
|
|
419
|
+
H|"1~"|"7~") key=home ;;
|
|
420
|
+
F|"4~"|"8~") key=end ;;
|
|
421
|
+
"5~") key=pgup ;;
|
|
422
|
+
"6~") key=pgdn ;;
|
|
423
|
+
*) key=nop ;;
|
|
424
|
+
esac
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
__tt_pv_handle() {
|
|
428
|
+
local name
|
|
429
|
+
case $key in
|
|
430
|
+
$'\x03') return 1 ;;
|
|
431
|
+
esc|$'\x15')
|
|
432
|
+
if [[ -z $flt ]]; then
|
|
433
|
+
[[ $key == esc ]] && return 1
|
|
434
|
+
else
|
|
435
|
+
name=""
|
|
436
|
+
[[ ${rtype[cur]} == thm ]] && name=${rval[cur]}
|
|
437
|
+
flt=""
|
|
438
|
+
if [[ -n $name ]]; then
|
|
439
|
+
__tt_pv_goto "$name"
|
|
440
|
+
else
|
|
441
|
+
__tt_pv_rows
|
|
442
|
+
(( cur > ${#rval} )) && cur=${#rval}
|
|
443
|
+
(( cur < 1 )) && cur=1
|
|
444
|
+
fi
|
|
445
|
+
fi
|
|
446
|
+
;;
|
|
447
|
+
$'\r'|$'\n')
|
|
448
|
+
if [[ ${rtype[cur]} == thm ]]; then
|
|
449
|
+
sel=${rval[cur]}
|
|
450
|
+
return 1
|
|
451
|
+
elif [[ ${rtype[cur]} == hdr ]]; then
|
|
452
|
+
__tt_pv_toggle
|
|
453
|
+
fi
|
|
454
|
+
;;
|
|
455
|
+
up) (( cur > 1 )) && cur=$(( cur - 1 )) ;;
|
|
456
|
+
down) (( cur < ${#rval} )) && cur=$(( cur + 1 )) ;;
|
|
457
|
+
right) [[ ${rtype[cur]} == hdr && -z ${exp[${rval[cur]}]} ]] && __tt_pv_toggle ;;
|
|
458
|
+
left) __tt_pv_left ;;
|
|
459
|
+
home) cur=1 ;;
|
|
460
|
+
end) (( ${#rval} )) && cur=${#rval} ;;
|
|
461
|
+
pgup)
|
|
462
|
+
cur=$(( cur - ${LINES:-24} + 2 ))
|
|
463
|
+
(( cur < 1 )) && cur=1
|
|
464
|
+
;;
|
|
465
|
+
pgdn)
|
|
466
|
+
cur=$(( cur + ${LINES:-24} - 2 ))
|
|
467
|
+
(( cur > ${#rval} )) && cur=${#rval}
|
|
468
|
+
(( cur < 1 )) && cur=1
|
|
469
|
+
;;
|
|
470
|
+
' ') [[ ${rtype[cur]} == hdr ]] && __tt_pv_toggle ;;
|
|
471
|
+
$'\x7f'|$'\x08')
|
|
472
|
+
if [[ -n $flt ]]; then
|
|
473
|
+
flt=${flt%?}
|
|
474
|
+
__tt_pv_rows
|
|
475
|
+
__tt_pv_first
|
|
476
|
+
fi
|
|
477
|
+
;;
|
|
478
|
+
[a-zA-Z0-9-])
|
|
479
|
+
flt+=${(L)key}
|
|
480
|
+
__tt_pv_rows
|
|
481
|
+
__tt_pv_first
|
|
482
|
+
;;
|
|
483
|
+
esac
|
|
484
|
+
return 0
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
__tt_preview() {
|
|
488
|
+
emulate -L zsh
|
|
489
|
+
if [[ ! -t 0 || ! -t 1 ]]; then
|
|
490
|
+
print -u2 "ttheme preview: needs a terminal"
|
|
491
|
+
return 1
|
|
492
|
+
fi
|
|
493
|
+
local orig=$TTHEME_SPEC applied=$TTHEME_SPEC flt="" sel="" cn="" cdot="" cchip="" key="" REPLY="" cur=1 top=1 color=0
|
|
494
|
+
local -a groups=() rtype=() rval=()
|
|
495
|
+
local -A gnative=() gthemes=() exp=() hchip=() hnat=() tbody=()
|
|
496
|
+
__tt_color && color=1
|
|
497
|
+
__tt_pv_init
|
|
498
|
+
__tt_pv_rows
|
|
499
|
+
[[ -n ${TTHEME_PALETTE[$cn]} ]] && __tt_pv_goto "$cn"
|
|
500
|
+
printf '\e[?1049h\e[?7l\e[?25l\e[2J'
|
|
501
|
+
{
|
|
502
|
+
while :; do
|
|
503
|
+
__tt_pv_focus
|
|
504
|
+
__tt_pv_draw
|
|
505
|
+
if ! __tt_pv_read; then
|
|
506
|
+
[[ -t 0 ]] && continue
|
|
507
|
+
break
|
|
508
|
+
fi
|
|
509
|
+
while :; do
|
|
510
|
+
__tt_pv_handle || break 2
|
|
511
|
+
__tt_pv_read drain || break
|
|
512
|
+
done
|
|
513
|
+
done
|
|
514
|
+
} always {
|
|
515
|
+
printf '\e[?7h\e[?1049l\e[?25h'
|
|
516
|
+
if [[ -n $sel ]]; then
|
|
517
|
+
local spec=${TTHEME_PALETTE[$sel]}
|
|
518
|
+
[[ $spec == "$applied" ]] || __tt_apply "$spec"
|
|
519
|
+
TTHEME_SPEC=$spec
|
|
520
|
+
__tt_announce
|
|
521
|
+
elif [[ -n $orig && $orig != "$applied" ]]; then
|
|
522
|
+
__tt_apply "$orig"
|
|
523
|
+
fi
|
|
524
|
+
}
|
|
525
|
+
return 0
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
ttheme() {
|
|
529
|
+
if (( ! $# )); then
|
|
530
|
+
__tt_menu
|
|
531
|
+
return 0
|
|
532
|
+
fi
|
|
533
|
+
|
|
534
|
+
case $1 in
|
|
535
|
+
-h|--help|help) __tt_help; return 0 ;;
|
|
536
|
+
next) __tt_rotate; return ;;
|
|
537
|
+
current) __tt_current; return ;;
|
|
538
|
+
preview) __tt_preview; return ;;
|
|
539
|
+
-*) print -u2 "ttheme: unknown option $1 — see \`ttheme help\`"; return 1 ;;
|
|
540
|
+
esac
|
|
541
|
+
|
|
542
|
+
local REPLY
|
|
543
|
+
__tt_resolve "$1" || return 1
|
|
544
|
+
local spec=${TTHEME_PALETTE[$REPLY]}
|
|
545
|
+
__tt_apply "$spec"
|
|
546
|
+
TTHEME_SPEC=$spec
|
|
547
|
+
__tt_announce
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
if (( $+functions[compdef] )); then
|
|
551
|
+
__tt_complete() {
|
|
552
|
+
(( CURRENT == 2 )) && compadd -- preview next current help
|
|
553
|
+
compadd -- $TTHEME_ORDER
|
|
554
|
+
}
|
|
555
|
+
compdef __tt_complete ttheme
|
|
556
|
+
fi
|
|
557
|
+
|
|
558
|
+
if __tt_active; then
|
|
559
|
+
if [[ -n $TTHEME_SPEC ]]; then
|
|
560
|
+
:
|
|
561
|
+
elif [[ $TTHEME_TAB_PALETTE == off ]]; then
|
|
562
|
+
__tt_bg=$(__tt_query_bg)
|
|
563
|
+
if [[ -n $__tt_bg ]]; then
|
|
564
|
+
for __k in ${(k)TTHEME_PALETTE}; do
|
|
565
|
+
if [[ ${TTHEME_PALETTE[$__k]%% *} == $__tt_bg ]]; then
|
|
566
|
+
TTHEME_SPEC=$TTHEME_PALETTE[$__k]
|
|
567
|
+
break
|
|
568
|
+
fi
|
|
569
|
+
done
|
|
570
|
+
[[ -n $TTHEME_SPEC ]] || TTHEME_SPEC="$__tt_bg ${TTHEME_PALETTE[neutral]#* }"
|
|
571
|
+
else
|
|
572
|
+
TTHEME_SPEC="- ${TTHEME_PALETTE[neutral]#* }"
|
|
573
|
+
fi
|
|
574
|
+
unset __tt_bg __k
|
|
575
|
+
else
|
|
576
|
+
__tt_next
|
|
577
|
+
TTHEME_SPEC=$REPLY
|
|
578
|
+
__tt_apply "$TTHEME_SPEC"
|
|
579
|
+
unset REPLY
|
|
580
|
+
fi
|
|
581
|
+
|
|
582
|
+
__tt_announce
|
|
583
|
+
fi
|