├── release-versions └── tmux-latest.txt ├── .gitignore ├── AppRun ├── tmux.desktop ├── .github └── workflows │ └── check_tmux_version.yml ├── Dockerfile └── README.md /release-versions/tmux-latest.txt: -------------------------------------------------------------------------------- 1 | 3.6a 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | localnotes/* 2 | .terraform 3 | terraform/notes.md 4 | terraform.tfstate 5 | terraform.tfstate.backup 6 | -------------------------------------------------------------------------------- /AppRun: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | unset ARGV0 3 | export TERMINFO=$APPDIR/usr/share/terminfo 4 | exec "$(dirname "$(readlink -f "${0}")")/usr/bin/tmux" ${@+"$@"} -------------------------------------------------------------------------------- /tmux.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | X-AppImage-Name=tmux 3 | X-AppImage-Version=1.0.0 4 | X-AppImage-Arch=x86_64 5 | Name=Tmux 6 | Exec=tmux 7 | Icon=favicon 8 | Type=Application 9 | Categories=Utility; 10 | -------------------------------------------------------------------------------- /.github/workflows/check_tmux_version.yml: -------------------------------------------------------------------------------- 1 | name: Build and release when new tmux version is out. 2 | on: 3 | schedule: 4 | - cron: '0 10 * * *' 5 | 6 | workflow_dispatch: 7 | 8 | jobs: 9 | get-version: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v3 13 | with: 14 | token: ${{ secrets.GITHUB_TOKEN }} 15 | ref: master 16 | - name: Fetch release version 17 | run: | 18 | latest_version=$(curl -sL https://api.github.com/repos/tmux/tmux/releases/latest | jq -r ".tag_name") 19 | if [[ $latest_version != "null" ]] 20 | then 21 | echo "$latest_version" > release-versions/tmux-latest.txt 22 | fi 23 | - name: Check for modified files 24 | id: git-check 25 | run: echo modified="$([ -z "`git status --porcelain`" ] && echo "false" || echo "true")" >> $GITHUB_OUTPUT 26 | - name: Commit latest release version 27 | if: steps.git-check.outputs.modified == 'true' 28 | run: | 29 | git config --global user.name 'Kiyoon Kim' 30 | git config --global user.email 'kiyoon@users.noreply.github.com' 31 | git commit -am "New tmux release version" 32 | git push 33 | 34 | - name: Build the Docker image 35 | if: steps.git-check.outputs.modified == 'true' 36 | id: build 37 | working-directory: . 38 | run: | 39 | TMUX_RELEASE_TAG=$(cat release-versions/tmux-latest.txt) 40 | echo "TMUX_RELEASE_TAG=$TMUX_RELEASE_TAG" >> $GITHUB_OUTPUT 41 | docker build . -t tmux --build-arg TMUX_RELEASE_TAG=$TMUX_RELEASE_TAG 42 | docker create -ti --name tmuxcontainer tmux bash 43 | docker cp tmuxcontainer:/opt/build/tmux.appimage . 44 | - name: Create Release 45 | if: steps.git-check.outputs.modified == 'true' 46 | uses: ncipollo/release-action@v1 47 | with: 48 | allowUpdates: True 49 | tag: ${{ steps.build.outputs.TMUX_RELEASE_TAG }} 50 | name: tmux ${{ steps.build.outputs.TMUX_RELEASE_TAG }} 51 | prerelease: False 52 | artifacts: "tmux.appimage" 53 | token: ${{ secrets.GITHUB_TOKEN }} 54 | 55 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 as builder 2 | ## docker build . -t tmux --build-arg TMUX_RELEASE_TAG=3.2a 3 | RUN apt-get update && apt-get install -y \ 4 | pkg-config automake autoconf libtool libssl-dev bison byacc \ 5 | curl imagemagick git vim 6 | 7 | ## linuxdeploy appimage must use --appimage-extract within a docker container. 8 | RUN curl -OL https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage \ 9 | && chmod +x linuxdeploy-x86_64.AppImage \ 10 | && ./linuxdeploy-x86_64.AppImage --appimage-extract \ 11 | && ln -nfs /squashfs-root/usr/bin/linuxdeploy /usr/bin/linuxdeploy 12 | 13 | 14 | ENV BUILD_DIR=/opt/build 15 | RUN mkdir -p $BUILD_DIR/AppDir/usr 16 | 17 | # libevent 18 | WORKDIR $BUILD_DIR 19 | RUN git clone https://github.com/libevent/libevent --depth 1 -b release-2.1.12-stable && \ 20 | cd libevent && \ 21 | sh autogen.sh && \ 22 | ./configure --prefix="$BUILD_DIR/AppDir/usr" --enable-shared && \ 23 | make -j4 && \ 24 | make install 25 | 26 | ## ncurses 27 | WORKDIR $BUILD_DIR 28 | RUN curl -OL https://invisible-island.net/datafiles/release/ncurses.tar.gz && \ 29 | tar -xf ncurses.tar.gz && \ 30 | NCURSES_DIR="$PWD/ncurses-6.3" && \ 31 | cd "$NCURSES_DIR" && \ 32 | ./configure --with-shared --prefix="$BUILD_DIR/AppDir/usr" --without-normal --without-debug && \ 33 | make -j4 && \ 34 | make install 35 | 36 | FROM builder as appimage 37 | ARG TMUX_RELEASE_TAG='master' 38 | ## Fetch Tmux Code 39 | WORKDIR /opt 40 | RUN git clone -b $TMUX_RELEASE_TAG --depth 1 https://github.com/tmux/tmux.git 41 | ENV REPO_ROOT=/opt/tmux 42 | 43 | ## Build Tmux itself 44 | WORKDIR $REPO_ROOT 45 | ENV LD_LIBRARY_PATH="$BUILD_DIR/AppDir/usr/lib" 46 | RUN sh autogen.sh 47 | ENV CPPFLAGS="-I$BUILD_DIR/AppDir/usr/include -I$BUILD_DIR/AppDir/usr/include/ncurses" 48 | ENV LDFLAGS="-L$BUILD_DIR/AppDir/usr/lib" 49 | ENV PKG_CONFIG_PATH=$BUILD_DIR/AppDir/usr/lib/pkgconfig 50 | RUN ./configure --prefix="$BUILD_DIR/AppDir/usr" --enable-sixel 51 | RUN make -j4 && make install 52 | 53 | ## Create Appimage 54 | ADD AppRun $BUILD_DIR/AppDir/AppRun 55 | RUN chmod 755 $BUILD_DIR/AppDir/AppRun 56 | ADD tmux.desktop $BUILD_DIR/AppDir/tmux.desktop 57 | RUN convert "$REPO_ROOT/logo/favicon.ico" "$REPO_ROOT/logo/favicon.png" && \ 58 | cp "$REPO_ROOT/logo/favicon-1.png" "$BUILD_DIR/AppDir/favicon.png" 59 | ENV UPDATE_INFORMATION="gh-releases-zsync|nelsonenzo|tmux-appimage|latest|tmux.appimage.zsync" 60 | 61 | WORKDIR $BUILD_DIR 62 | RUN OUTPUT="tmux.appimage" /usr/bin/linuxdeploy --appdir ./AppDir --output appimage \ 63 | --icon-file "$REPO_ROOT/logo/favicon.ico" \ 64 | --executable "$BUILD_DIR/AppDir/usr/bin/tmux" 65 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | > [!NOTE] 3 | > This fork utilises GitHub Action to **detect, build and release the latest version of tmux as soon as they release**. 4 | 5 | # Tmux AppImage 6 | ![build](https://github.com/kiyoon/tmux-appimage/actions/workflows/check_tmux_version.yml/badge.svg) 7 | 8 | One-liner to get the latest tmux.appimage build: 9 | ```bash 10 | curl -s https://api.github.com/repos/kiyoon/tmux-appimage/releases/latest \ 11 | | grep "browser_download_url.*appimage" \ 12 | | cut -d : -f 2,3 \ 13 | | tr -d \" \ 14 | | wget -qi - \ 15 | && chmod +x tmux.appimage 16 | 17 | ## optionaly, move it into your $PATH 18 | mv tmux.appimage /usr/local/bin/tmux 19 | tmux 20 | ``` 21 | 22 | ### What is this? 23 | A Docker build of Tmux Appimage 24 | 25 | ### Why use Docker? 26 | The advantages of using docker: 27 | - Obtain consistent build results on any computer. 28 | - No need to install a slew of build packages on your own machine. 29 | - You can trust the tmux developers code, not some rando's AppImage distribution on the interwebz :p 30 | 31 | ### Build it yourself from source code 32 | I assume you have docker installed already. 33 | ```bash 34 | #### clone me & change directory 35 | git clone https://github.com/kiyoon/tmux-appimage.git 36 | cd tmux-appimage 37 | 38 | #### Set the desired tmux release tag and build 39 | export TMUX_RELEASE_TAG=3.3a 40 | docker build . -t tmux --build-arg TMUX_RELEASE_TAG=$TMUX_RELEASE_TAG 41 | 42 | #### extract the appimage file 43 | docker create -ti --name tmuxcontainer tmux bash 44 | docker cp tmuxcontainer:/opt/build/tmux.appimage . 45 | docker rm -f tmuxcontainer 46 | 47 | ls -al tmux.appimage 48 | ``` 49 | 50 | ### Where has the AppImage been tested to turn? 51 | 52 | Required GLIBC version: `2.14` 53 | 54 | You can check this with this command: 55 | 56 | ```console 57 | $ # Check what tmux.appimage requires. 58 | $ objdump -T tmux.appimage | grep -v GLIBCXX | grep GLIBC | sed 's/.*GLIBC_\([.0-9]*\).*/\1/g' | sort -Vu | tail -1 59 | 2.14 60 | 61 | $ # Check which GLIBC is installed in your OS. 62 | $ ldd --version 63 | ldd (Ubuntu GLIBC 2.35-0ubuntu3.8) 2.35 64 | Copyright (C) 2022 Free Software Foundation, Inc. 65 | ``` 66 | 67 | It has been tested on these fine Linux platforms and will likely work for anything newer than centos 6.9 (which is a few years old now.) 68 | 69 | ``` 70 | ubuntu 24.04 71 | ubuntu 22.04 72 | ubuntu 20.04 73 | ubuntu 18.04 74 | ubuntu 16.04 75 | ubuntu 14.04 76 | ubuntu 12.04 77 | centos stream 10 78 | centos stream 9 79 | centos 8 80 | centos 7 81 | fedora 33 82 | manjaro 19.02 83 | ``` 84 | The distributed build will not work on old os's (like Centos 6), since they have older glibc libraries. 85 | If you need it to work on those systems, try modifying the Dockerfile to use an older ubuntu as the base image and doing a docker build. 86 | 87 | ### What is the sauce that makes this work? 88 | The [Dockerfile](Dockerfile) contains all the magic ingredients to compile tmux. 89 | 90 | Huge thank you to https://github.com/michaellee8, whom taught me a lot about appimage builds with his code contributions. 91 | --------------------------------------------------------------------------------