Tmux でSixel

ターミナルマルチプレクサの中で今一番利用されているであろうtmux にSIXEL branch がMarge されていたのに気づいたので試してみました.

8月に取り込まれていたのですね.未だリリースはされていないのでgit でsource を貰ってきて試しました.

Note

Debianだとexperimental は対応バージョンのようですが,Sixel が有効にしてあるかは未確認.

$ rmadison tmux
tmux       | 2.8-3             | oldoldstable             | source, amd64, arm64, armel, armhf, i386, mips, mips64el, mipsel, ppc64el, s390x
tmux       | 3.1c-1~bpo10+1    | buster-backports         | source, amd64, arm64, armel, armhf, i386, mips, mips64el, mipsel, ppc64el, s390x
tmux       | 3.1c-1~bpo10+1    | buster-backports-debug   | source
tmux       | 3.1c-1+deb11u1    | oldstable                | source, amd64, arm64, armel, armhf, i386, mips64el, mipsel, ppc64el, s390x
tmux       | 3.1c-1+deb11u1    | oldstable-debug          | source
tmux       | 3.3a-3~bpo11+1    | bullseye-backports       | source, amd64, arm64, armel, armhf, i386, mips64el, mipsel, ppc64el, s390x
tmux       | 3.3a-3~bpo11+1    | bullseye-backports-debug | source
tmux       | 3.3a-3            | stable                   | source, amd64, arm64, armel, armhf, i386, mips64el, mipsel, ppc64el, s390x
tmux       | 3.3a-5            | testing                  | source, amd64, arm64, armel, armhf, i386, mips64el, ppc64el, s390x
tmux       | 3.3a-5            | unstable                 | source, amd64, arm64, armel, armhf, i386, mips64el, ppc64el, riscv64, s390x
tmux       | 3.3a-5            | unstable-debug           | source
tmux       | 3.4~git20230924-1 | experimental             | source, amd64, arm64, armel, armhf, i386, mips64el, ppc64el, riscv64, s390x
tmux       | 3.4~git20230924-1 | experimental-debug       | source

追記) 有効になっているよう

$ curl -s https://metadata.ftp-master.debian.org/changelogs//main/t/tmux/tmux_3.4~git20230924-1_changelog | grep -A3 3.4~git20230924-1
tmux (3.4~git20230924-1) experimental; urgency=medium

  * New upstream snapshot, from Git commit b777780720.
  * Enable Sixel support.
$ sudo apt install vlock build-essential git
$ sudo apt build-dep tmux
$ git clone https://github.com/tmux/tmux
$ cd tmux
x$ git log -1
commit b77778072052c14d1450d2eb89542f2493121f84 (HEAD -> master, origin/master, origin/HEAD)
Merge: 0ca28b36 347cd0b5
Author: Thomas Adam <thomas@xteddy.org>
Date:   Tue Sep 19 12:01:11 2023 +0100

    Merge branch 'obsd-master'
$ ./configure --enable-sixel --prefix=/usr/local
$ make
$ ./tmux

tmux の上でSixel を表示してみます.

tmux sixel

大丈夫そうです.

tmux sixel split

画面分割してみても大丈夫そう.(左はtig でtmux リポジトリを表示,右上はchromium で取得した国土交通省 川の防災情報 🏛️のスクリーンショットを表示,右下はsayaka でMisskey 表示)

ウィンドウ切り替えをするとSixel 画像は消えてしまうようです.
ssh 経由でリモートサーバのtmux でもSixel 表示OK なのでリモートで画像を取得表示して細い回線で必要なときにリモートのtmux に繋いで利用といったこともできて便利です.

mosh を挟むと駄目なようなのが残念.

追記) Sixel を使っていないタイミングでもtmux が落ちるように?安定度に難ありかも.とりあえずDebian pkg 版と併用しようと思います.

環境1
$ git log -1
commit b77778072052c14d1450d2eb89542f2493121f84 (HEAD -> master, origin/master, origin/HEAD)
Merge: 0ca28b36 347cd0b5
Author: Thomas Adam <thomas@xteddy.org>
Date:   Tue Sep 19 12:01:11 2023 +0100

    Merge branch 'obsd-master'
$ tmux -V
tmux next-3.4
$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux trixie/sid
Release:        n/a
Codename:       trixie
$ arch
x86_64
環境2
$ git log -1 -q
commit 381c00a74ea1eb136a97c86da9a7713190b10a62 (HEAD -> master, origin/master, origin/HEAD)
Merge: a5545dbc 5aadee6d
Author: Thomas Adam <thomas@xteddy.org>
Date:   Thu Nov 2 22:58:45 2023 +0000

    Merge branch 'obsd-master'
$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 12 (bookworm)
Release:        12
Codename:       bookworm
$ arch
x86_64

One thought to “Tmux でSixel”

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です