← Back to list

ターミナルがダサいとモテない。tattoyでターミナルをド派手にしよう!

tattoyを使ってターミナルの背景で動画を再生する。

yusuke · 2025-06-16 06:36 · 0 claps · 8.9 min read
#command-line #tattoys
Open on Medium ↗
Wiki topics: 🥊 · Combat Sports

ターミナルがダサいとモテない。tattoyでターミナルをド派手にしよう!

tattoyを使ってターミナルの背景で動画を再生する。

Photo by Alex Litvin on Unsplash

Photo by Alex Litvin on Unsplash

またまたターミナルをド派手にするものを見つけてしまいました😂

その名もtattoy

[embed]Tattoy Tattoy is a text-based terminal compositortattoy.sh

ターミナルの背景に動画を設定できます。

Install tattoy

macOSでは普通にbrewで入るみたいです。

[embed]Downloading Tattoy Tattoy is a text-based terminal compositortattoy.sh

brew install tattoy-org/tap/tattoy

自分はcargoで入れてます。

cargo install --locked --git https://github.com/tattoy-org/tattoy tattoy

Install mpv

動画再生にmpvを利用するので、Installします。

[embed]mpv.io a free, open source, and cross-platform media playermpv.io

これも普通にbrewで入ります。

brew install mpv

config path

[embed]Configuration Tattoy is a text-based terminal compositortattoy.sh

  • Linux: $HOME/.config/tattoy/tattoy.toml.
  • MacOS: $HOME/Library/Application Support/tattoy/tattoy.toml

tattoyはXDGに直接対応している感じじゃないっぽいので、symlinkしちゃう。

test ! -d ${HOME}/.config/tattoy && mkdir -p ${HOME}/.config/tattoy
ln -s ${HOME}/.config/tattoy "${HOME}/Library/Application Support/tattoy/tattoy.toml"

これはやってもやらなくても大丈夫です。

palette config

tattoyを初回起動すると

これは普通に y を押してください。

palette.tomlが初期化されます。

2025/06/16時点では、WezTermとかで背景画像を設定してるとparse-paletteがうまくいかないかもしれません。自分はうまくいきませんでした。なのでその場合は、dでも大丈夫です。

Config Setup

text_contrastを修正します。 enabled = trueにします。

[text_contrast]
enabled = true
target_contrast = 2.0
# When set to false, all text is automatically adjusted, even non-alphanumeric characters
# like UI border elements etc. The only characters that aren't adjusted are the UTF8
# half blocks (eg ▀) that are used to render "graphics", as in the shaders for example.
apply_to_readable_text_only = true

minimapを修正します。 enabled = trueにします。

[minimap]
enabled = true
animation_speed = 0.15
# The maximum width of the minimap. It can be narrower when the scrollback is long
# in order to maintain a consistent aspect ratio.
max_width = 10

カーソルを右端に持っていくとscroll minimapが表示されます。

bg_commandを修正します。 enabled = trueに修正し commandを以下のように修正します。

[bg_command]
enabled = true
# The command to run. The executable goes in the first position and then each argument must
# be placed in its own quotes in the array.
# Examples:
# * Render a live-updating instance of the common monitoring application "top" in the background.
#   `command = ["top"]`
# * Play the "Bad Apple" video in the background.
#   `command = ["mpv", "--really-quiet", "--vo=tct", "--volume=0", "https://www.youtube.com/watch?v=UkgK8eUdpAo"]`
#command = ["echo", "Hello World"]
command = ["mpv", "--really-quiet", "--vo=tct", "--volume=0", "--loop-file=inf", "https://www.youtube.com/watch?v=yYnAw4_F0bU"]
# Do you expect the command to exit or not?
# Usually when a command exits Tattoy shows an error notification. But you may want to render a
# command that outputs some static content, for example to print out some ASCII-based image:
#   `command = ["chafa", "/path/to/wallpaper.png"]`
# Bare in mind that there's currently no config to re-run the command on terminal resize.
expect_exit = false
opacity = 0.7
layer = -10

ここではYouTubeの動画を再生させます。

background loopで検索して選びました。

[embed]

t-recで録画しました。

ほんとに動画が再生されます😆

因みに、当たり前ですがめちゃくちゃCPUを食います😅

意味なんて探してはいけません🤣🤣🤣🤣

2025/06/16時点では、bashを使っていますがキーボードショートカットが使えなくなります。 私の環境ではbindで設定を読み込み直しても、今のところダメでした。 今後のUpdateに期待です。

Appendix: Shaders

tattoyはglslファイルを読み込めます。

[embed]Shaders Tattoy is a text-based terminal compositortattoy.sh

ghosttyにghostty-shadersというリポジトリがありtattoy.tomlのshaderセクションを修正すると使えます。

[shader]
enabled = true
opacity = 0.2
layer = -2
# Whether to render the computed shader from the GPU. The shader pixels can still be
# used for other purposes such as defining the foreground colour of the terminal's text,
# see `render_shader_colours_to_text`.
render = true
# It can be useful to disable this for certain GUI terminal shaders (such as Ghostty shaders)
# that also take responsibility for rendering terminal text. Tattoy can only send a crude
# representation of terminal text as 2 pixels per character, which is sometimes desirable
# when the shader uses the terminal to inform the output of the shader, but it can also cause
# an unnesceray blocky effect when the shader doesn't use the terminal colours.
upload_tty_as_pixels = true
# Use each "cell" of the shader to set the corresponding text cell's foreground colour.
# This is most likely desirable in conjunction with the `render` option, so that the shader
# is only visible via the terminal's text.
render_shader_colours_to_text = true
# Path to a Shadertoy shader on your local filesystem. Is relative to the root of
# Tattoy's config directory.
#path = "shaders/soft_shadows.glsl"
path = "shaders/galaxy.glsl"

ここでは

enabled = true

layer = -2 bg_commandのlayerより手前に設定

path = “shaders/galaxy.glsl”

と設定して、bg_commandのmpv動画再生より手前のレイヤーでshaderを描画しています。

もちろん、動画再生だけでかなりのCPUを食いますが、shaderを同時に使うともっとCPUを食います🤣


메타데이터
post_id
56e509e2cc2c
slug
ターミナルがダサいとモテない-tattoyでターミナルをド派手にしよう-56e509e2cc2c
url
https://medium.com/@yusuke_h/%E3%82%BF%E3%83%BC%E3%83%9F%E3%83%8A%E3%83%AB%E3%81%8C%E3%83%80%E3%82%B5%E3%81%84%E3%81%A8%E3%83%A2%E3%83%86%E3%81%AA%E3%81%84-tattoy%E3%81%A7%E3%82%BF%E3%83%BC%E3%83%9F%E3%83%8A%E3%83%AB%E3%82%92%E3%83%89%E6%B4%BE%E6%89%8B%E3%81%AB%E3%81%97%E3%82%88%E3%81%86-56e509e2cc2c
canonical_url
https://medium.com/@yusuke_h/%E3%82%BF%E3%83%BC%E3%83%9F%E3%83%8A%E3%83%AB%E3%81%8C%E3%83%80%E3%82%B5%E3%81%84%E3%81%A8%E3%83%A2%E3%83%86%E3%81%AA%E3%81%84-tattoy%E3%81%A7%E3%82%BF%E3%83%BC%E3%83%9F%E3%83%8A%E3%83%AB%E3%82%92%E3%83%89%E6%B4%BE%E6%89%8B%E3%81%AB%E3%81%97%E3%82%88%E3%81%86-56e509e2cc2c
author_url
https://medium.com/@yusuke_h
status
ok
fetched_at
2026-07-19 10:50:14