A modern terminal with a built-in multiplexer: close it and your sessions keep running. Run shells and tons of AI agents across your machines, then pick them up from desktop, browser, TUI and more. Written in Rust with no UI framework: interface drawn straight on the GPU. No Electron, GPUI or webview.
Rust agentagent-orchestrationaiai-agentsclaude-codecodexcoding-agentlinuxmacosmultiplayermultiplexerrustterminalterminal-emulatorterminal-multiplexertmuxtuiweztermwindows
Name change from WezTerm to ThinkTerm
RoversX5ebacd580438
diff --git a/.github/DISCUSSION_TEMPLATE/q-a.yml b/.github/DISCUSSION_TEMPLATE/q-a.ymlindex 76668952..8248add9 100644--- a/.github/DISCUSSION_TEMPLATE/q-a.yml+++ b/.github/DISCUSSION_TEMPLATE/q-a.yml@@ -33,10 +33,10 @@ body:- type: inputid: versionattributes:- label: WezTerm version+ label: ThinkTerm versiondescription: |Please run `wezterm -V` and include its output here.- If you installed the flatpak version of wezterm, please consider trying+ If you installed the flatpak version of ThinkTerm, please consider tryingthe native package format for your system and comparing the behavior,as flatpak runs in an isolated sandbox that can prevent some functionalityfrom working fully.diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.ymlindex 22aa8566..603bd63a 100644--- a/.github/ISSUE_TEMPLATE/bug.yml+++ b/.github/ISSUE_TEMPLATE/bug.yml@@ -29,10 +29,10 @@ body:- type: inputid: versionattributes:- label: WezTerm version+ label: ThinkTerm versiondescription: |Please run `wezterm -V` and include its output here.- If you installed the flatpak version of wezterm, please consider trying+ If you installed the flatpak version of ThinkTerm, please consider tryingthe native package format for your system and comparing the behavior,as flatpak runs in an isolated sandbox that can prevent some functionalityfrom working fully.diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.ymlindex dfe40921..425baeec 100644--- a/.github/ISSUE_TEMPLATE/config.yml+++ b/.github/ISSUE_TEMPLATE/config.yml@@ -1,8 +1,5 @@blank_issues_enabled: falsecontact_links:- name: GitHub Discussions- url: https://github.com/wez/wezterm/discussions+ url: https://github.com/RoversX/thinkterm/discussionsabout: When you have questions that are not bug reports or feature requests- - name: WezTerm room on Matrix/Element- url: https://app.element.io/#/room/#wezterm:matrix.org- about: if you'd prefer more realtime conversation with the communitydiff --git a/.github/workflows/gen_centos9_continuous.yml b/.github/workflows/gen_centos9_continuous.ymlindex 172484cb..c903cc0a 100644--- a/.github/workflows/gen_centos9_continuous.yml+++ b/.github/workflows/gen_centos9_continuous.yml@@ -125,7 +125,7 @@ jobs:upload:runs-on: ubuntu-latestneeds: build- if: github.repository == 'wezterm/wezterm'+ if: github.repository == 'RoversX/thinkterm'permissions:contents: writepages: writediff --git a/.github/workflows/gen_centos9_tag.yml b/.github/workflows/gen_centos9_tag.ymlindex c20f30c8..edbf8f4d 100644--- a/.github/workflows/gen_centos9_tag.yml+++ b/.github/workflows/gen_centos9_tag.yml@@ -99,7 +99,7 @@ jobs:upload:runs-on: ubuntu-latestneeds: build- if: github.repository == 'wezterm/wezterm'+ if: github.repository == 'RoversX/thinkterm'permissions:contents: writepages: writediff --git a/.github/workflows/gen_debian11_continuous.yml b/.github/workflows/gen_debian11_continuous.ymlindex 1c9f6034..5bc75936 100644--- a/.github/workflows/gen_debian11_continuous.yml+++ b/.github/workflows/gen_debian11_continuous.yml@@ -123,7 +123,7 @@ jobs:upload:runs-on: ubuntu-latestneeds: build- if: github.repository == 'wezterm/wezterm'+ if: github.repository == 'RoversX/thinkterm'permissions:contents: writepages: writediff --git a/.github/workflows/gen_debian11_tag.yml b/.github/workflows/gen_debian11_tag.ymlindex 19d4e5b0..371f9872 100644--- a/.github/workflows/gen_debian11_tag.yml+++ b/.github/workflows/gen_debian11_tag.yml@@ -101,7 +101,7 @@ jobs:upload:runs-on: ubuntu-latestneeds: build- if: github.repository == 'wezterm/wezterm'+ if: github.repository == 'RoversX/thinkterm'permissions:contents: writepages: writediff --git a/.github/workflows/gen_debian12_continuous.yml b/.github/workflows/gen_debian12_continuous.ymlindex 49a27441..e79ea661 100644--- a/.github/workflows/gen_debian12_continuous.yml+++ b/.github/workflows/gen_debian12_continuous.yml@@ -123,7 +123,7 @@ jobs:upload:runs-on: ubuntu-latestneeds: build- if: github.repository == 'wezterm/wezterm'+ if: github.repository == 'RoversX/thinkterm'permissions:contents: writepages: writediff --git a/.github/workflows/gen_debian12_tag.yml b/.github/workflows/gen_debian12_tag.ymlindex 801b830d..eb434638 100644--- a/.github/workflows/gen_debian12_tag.yml+++ b/.github/workflows/gen_debian12_tag.yml@@ -101,7 +101,7 @@ jobs:upload:runs-on: ubuntu-latestneeds: build- if: github.repository == 'wezterm/wezterm'+ if: github.repository == 'RoversX/thinkterm'permissions:contents: writepages: writediff --git a/.github/workflows/gen_fedora39_continuous.yml b/.github/workflows/gen_fedora39_continuous.ymlindex ad2879f5..8b167224 100644--- a/.github/workflows/gen_fedora39_continuous.yml+++ b/.github/workflows/gen_fedora39_continuous.yml@@ -122,7 +122,7 @@ jobs:upload:runs-on: ubuntu-latestneeds: build- if: github.repository == 'wezterm/wezterm'+ if: github.repository == 'RoversX/thinkterm'permissions:contents: writepages: writediff --git a/.github/workflows/gen_fedora39_tag.yml b/.github/workflows/gen_fedora39_tag.ymlindex a52a9d5c..010add01 100644--- a/.github/workflows/gen_fedora39_tag.yml+++ b/.github/workflows/gen_fedora39_tag.yml@@ -96,7 +96,7 @@ jobs:upload:runs-on: ubuntu-latestneeds: build- if: github.repository == 'wezterm/wezterm'+ if: github.repository == 'RoversX/thinkterm'permissions:contents: writepages: writediff --git a/.github/workflows/gen_fedora40_continuous.yml b/.github/workflows/gen_fedora40_continuous.ymlindex 88434b4d..5e85dba8 100644--- a/.github/workflows/gen_fedora40_continuous.yml+++ b/.github/workflows/gen_fedora40_continuous.yml@@ -122,7 +122,7 @@ jobs:upload:runs-on: ubuntu-latestneeds: build- if: github.repository == 'wezterm/wezterm'+ if: github.repository == 'RoversX/thinkterm'permissions:contents: writepages: writediff --git a/.github/workflows/gen_fedora40_tag.yml b/.github/workflows/gen_fedora40_tag.ymlindex 27831169..f5d3902a 100644--- a/.github/workflows/gen_fedora40_tag.yml+++ b/.github/workflows/gen_fedora40_tag.yml@@ -96,7 +96,7 @@ jobs:upload:runs-on: ubuntu-latestneeds: build- if: github.repository == 'wezterm/wezterm'+ if: github.repository == 'RoversX/thinkterm'permissions:contents: writepages: writediff --git a/.github/workflows/gen_fedora41_continuous.yml b/.github/workflows/gen_fedora41_continuous.ymlindex ca7e17d5..7f190382 100644--- a/.github/workflows/gen_fedora41_continuous.yml+++ b/.github/workflows/gen_fedora41_continuous.yml@@ -122,7 +122,7 @@ jobs:upload:runs-on: ubuntu-latestneeds: build- if: github.repository == 'wezterm/wezterm'+ if: github.repository == 'RoversX/thinkterm'permissions:contents: writepages: writediff --git a/.github/workflows/gen_fedora41_tag.yml b/.github/workflows/gen_fedora41_tag.ymlindex c5f23015..5c3e64f0 100644--- a/.github/workflows/gen_fedora41_tag.yml+++ b/.github/workflows/gen_fedora41_tag.yml@@ -96,7 +96,7 @@ jobs:upload:runs-on: ubuntu-latestneeds: build- if: github.repository == 'wezterm/wezterm'+ if: github.repository == 'RoversX/thinkterm'permissions:contents: writepages: writediff --git a/.github/workflows/gen_macos.yml b/.github/workflows/gen_macos.ymlindex a1f054ef..373923f0 100644--- a/.github/workflows/gen_macos.yml+++ b/.github/workflows/gen_macos.yml@@ -100,4 +100,4 @@ jobs:uses: actions/upload-artifact@v4with:name: "macos"- path: "WezTerm-*.zip"+ path: "ThinkTerm-*.zip"diff --git a/.github/workflows/gen_macos_continuous.yml b/.github/workflows/gen_macos_continuous.ymlindex 8fb9e650..8c6c870a 100644--- a/.github/workflows/gen_macos_continuous.yml+++ b/.github/workflows/gen_macos_continuous.yml@@ -109,13 +109,13 @@ jobs:uses: actions/upload-artifact@v4with:name: "macos"- path: "WezTerm-*.zip"+ path: "ThinkTerm-*.zip"retention-days: 5upload:runs-on: ubuntu-latestneeds: build- if: github.repository == 'wezterm/wezterm'+ if: github.repository == 'RoversX/thinkterm'permissions:contents: writepages: write@@ -130,9 +130,9 @@ jobs:name: "macos"- name: "Checksum"shell: bash- run: "for f in WezTerm-*.zip ; do sha256sum $f > $f.sha256 ; done"+ run: "for f in ThinkTerm-*.zip ; do sha256sum $f > $f.sha256 ; done"- name: "Upload to Nightly Release"env:GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}shell: bash- run: "bash ci/retry.sh gh release upload --clobber nightly WezTerm-*.zip *.sha256"+ run: "bash ci/retry.sh gh release upload --clobber nightly ThinkTerm-*.zip *.sha256"diff --git a/.github/workflows/gen_macos_tag.yml b/.github/workflows/gen_macos_tag.ymlindex 62358e1b..76d275a0 100644--- a/.github/workflows/gen_macos_tag.yml+++ b/.github/workflows/gen_macos_tag.yml@@ -93,12 +93,12 @@ jobs:uses: actions/upload-artifact@v4with:name: "macos"- path: "WezTerm-*.zip"+ path: "ThinkTerm-*.zip"upload:runs-on: ubuntu-latestneeds: build- if: github.repository == 'wezterm/wezterm'+ if: github.repository == 'RoversX/thinkterm'permissions:contents: writepages: write@@ -107,27 +107,13 @@ jobs:steps:- name: "checkout repo"uses: actions/checkout@v4- - name: "Checkout homebrew tap"- uses: actions/checkout@v4- with:- repository: "wez/homebrew-wezterm"- path: "homebrew-wezterm"- token: "${{ secrets.GH_PAT }}"- - name: "Update homebrew tap formula"- shell: bash- run: "cp wezterm.rb homebrew-wezterm/Casks/wezterm.rb"- - name: "Commit homebrew tap changes"- uses: stefanzweifel/git-auto-commit-action@v5- with:- commit_message: "Automated update to match latest tag"- repository: "homebrew-wezterm"- name: "Download artifact"uses: actions/download-artifact@v4with:name: "macos"- name: "Checksum"shell: bash- run: "for f in WezTerm-*.zip ; do sha256sum $f > $f.sha256 ; done"+ run: "for f in ThinkTerm-*.zip ; do sha256sum $f > $f.sha256 ; done"- name: "Create pre-release"env:GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}@@ -137,4 +123,4 @@ jobs:env:GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}shell: bash- run: "bash ci/retry.sh gh release upload --clobber $(ci/tag-name.sh) WezTerm-*.zip *.sha256"+ run: "bash ci/retry.sh gh release upload --clobber $(ci/tag-name.sh) ThinkTerm-*.zip *.sha256"diff --git a/.github/workflows/gen_ubuntu20.04_continuous.yml b/.github/workflows/gen_ubuntu20.04_continuous.ymlindex 88b8bc9b..1b404750 100644--- a/.github/workflows/gen_ubuntu20.04_continuous.yml+++ b/.github/workflows/gen_ubuntu20.04_continuous.yml@@ -139,7 +139,7 @@ jobs:upload:runs-on: ubuntu-latestneeds: build- if: github.repository == 'wezterm/wezterm'+ if: github.repository == 'RoversX/thinkterm'permissions:contents: writepages: writediff --git a/.github/workflows/gen_ubuntu20.04_tag.yml b/.github/workflows/gen_ubuntu20.04_tag.ymlindex 9584ff85..153c19e7 100644--- a/.github/workflows/gen_ubuntu20.04_tag.yml+++ b/.github/workflows/gen_ubuntu20.04_tag.yml@@ -114,7 +114,7 @@ jobs:upload:runs-on: ubuntu-latestneeds: build- if: github.repository == 'wezterm/wezterm'+ if: github.repository == 'RoversX/thinkterm'permissions:contents: writepages: write@@ -126,20 +126,6 @@ jobs:run: "git config --global --add safe.directory /__w/wezterm/wezterm"- name: "checkout repo"uses: actions/checkout@v4- - name: "Checkout linuxbrew tap"- uses: actions/checkout@v4- with:- repository: "wez/homebrew-wezterm-linuxbrew"- path: "linuxbrew-wezterm"- token: "${{ secrets.GH_PAT }}"- - name: "Update linuxbrew tap formula"- shell: bash- run: "cp wezterm-linuxbrew.rb linuxbrew-wezterm/Formula/wezterm.rb"- - name: "Commit linuxbrew tap changes"- uses: stefanzweifel/git-auto-commit-action@v5- with:- commit_message: "Automated update to match latest tag"- repository: "linuxbrew-wezterm"- name: "Download artifact"uses: actions/download-artifact@v4with:@@ -157,10 +143,10 @@ jobs:GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}shell: bashrun: "bash ci/retry.sh gh release upload --clobber $(ci/tag-name.sh) wezterm-*.deb wezterm-*.xz *src.tar.gz *.AppImage *.sha256"- - name: "Checkout flathub/org.wezfurlong.wezterm"+ - name: "Checkout flathub/com.roversx.thinkterm"uses: actions/checkout@v4with:- repository: "flathub/org.wezfurlong.wezterm"+ repository: "flathub/com.roversx.thinkterm"path: "flathub"token: "${{ secrets.GH_PAT }}"- name: "Create flathub commit and push"@@ -170,4 +156,4 @@ jobs:env:GITHUB_TOKEN: ${{ secrets.GH_PAT }}shell: bash- run: 'cd flathub && gh pr create --fill --body "PR automatically created by release automation in the wezterm repo"'+ run: 'cd flathub && gh pr create --fill --body "PR automatically created by release automation in the ThinkTerm repo"'diff --git a/.github/workflows/gen_ubuntu22.04_continuous.yml b/.github/workflows/gen_ubuntu22.04_continuous.ymlindex c01465b4..14c10243 100644--- a/.github/workflows/gen_ubuntu22.04_continuous.yml+++ b/.github/workflows/gen_ubuntu22.04_continuous.yml@@ -123,7 +123,7 @@ jobs:upload:runs-on: ubuntu-latestneeds: build- if: github.repository == 'wezterm/wezterm'+ if: github.repository == 'RoversX/thinkterm'permissions:contents: writepages: writediff --git a/.github/workflows/gen_ubuntu22.04_tag.yml b/.github/workflows/gen_ubuntu22.04_tag.ymlindex 28b69c0d..eccc9a85 100644--- a/.github/workflows/gen_ubuntu22.04_tag.yml+++ b/.github/workflows/gen_ubuntu22.04_tag.yml@@ -101,7 +101,7 @@ jobs:upload:runs-on: ubuntu-latestneeds: build- if: github.repository == 'wezterm/wezterm'+ if: github.repository == 'RoversX/thinkterm'permissions:contents: writepages: writediff --git a/.github/workflows/gen_ubuntu24.04_continuous.yml b/.github/workflows/gen_ubuntu24.04_continuous.ymlindex d8c3df34..41d0a2ac 100644--- a/.github/workflows/gen_ubuntu24.04_continuous.yml+++ b/.github/workflows/gen_ubuntu24.04_continuous.yml@@ -123,7 +123,7 @@ jobs:upload:runs-on: ubuntu-latestneeds: build- if: github.repository == 'wezterm/wezterm'+ if: github.repository == 'RoversX/thinkterm'permissions:contents: writepages: writediff --git a/.github/workflows/gen_ubuntu24.04_tag.yml b/.github/workflows/gen_ubuntu24.04_tag.ymlindex 77881e4f..b4f901c2 100644--- a/.github/workflows/gen_ubuntu24.04_tag.yml+++ b/.github/workflows/gen_ubuntu24.04_tag.yml@@ -101,7 +101,7 @@ jobs:upload:runs-on: ubuntu-latestneeds: build- if: github.repository == 'wezterm/wezterm'+ if: github.repository == 'RoversX/thinkterm'permissions:contents: writepages: writediff --git a/.github/workflows/gen_windows.yml b/.github/workflows/gen_windows.ymlindex 2f2e9134..76f0508d 100644--- a/.github/workflows/gen_windows.yml+++ b/.github/workflows/gen_windows.yml@@ -92,5 +92,5 @@ jobs:with:name: "windows"path: |- WezTerm-*.zip- WezTerm-*.exe+ ThinkTerm-*.zip+ ThinkTerm-*.exediff --git a/.github/workflows/gen_windows_continuous.yml b/.github/workflows/gen_windows_continuous.ymlindex 39a30cb1..0ffd6241 100644--- a/.github/workflows/gen_windows_continuous.yml+++ b/.github/workflows/gen_windows_continuous.yml@@ -95,14 +95,14 @@ jobs:with:name: "windows"path: |- WezTerm-*.zip- WezTerm-*.exe+ ThinkTerm-*.zip+ ThinkTerm-*.exeretention-days: 5upload:runs-on: ubuntu-latestneeds: build- if: github.repository == 'wezterm/wezterm'+ if: github.repository == 'RoversX/thinkterm'permissions:contents: writepages: write@@ -117,9 +117,9 @@ jobs:name: "windows"- name: "Checksum"shell: bash- run: "for f in WezTerm-*.zip WezTerm-*.exe ; do sha256sum $f > $f.sha256 ; done"+ run: "for f in ThinkTerm-*.zip ThinkTerm-*.exe ; do sha256sum $f > $f.sha256 ; done"- name: "Upload to Nightly Release"env:GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}shell: bash- run: "bash ci/retry.sh gh release upload --clobber nightly WezTerm-*.zip WezTerm-*.exe *.sha256"+ run: "bash ci/retry.sh gh release upload --clobber nightly ThinkTerm-*.zip ThinkTerm-*.exe *.sha256"diff --git a/.github/workflows/gen_windows_tag.yml b/.github/workflows/gen_windows_tag.ymlindex eba4046f..095f5b93 100644--- a/.github/workflows/gen_windows_tag.yml+++ b/.github/workflows/gen_windows_tag.yml@@ -81,13 +81,13 @@ jobs:with:name: "windows"path: |- WezTerm-*.zip- WezTerm-*.exe+ ThinkTerm-*.zip+ ThinkTerm-*.exeupload:runs-on: ubuntu-latestneeds: build- if: github.repository == 'wezterm/wezterm'+ if: github.repository == 'RoversX/thinkterm'permissions:contents: writepages: write@@ -102,7 +102,7 @@ jobs:name: "windows"- name: "Checksum"shell: bash- run: "for f in WezTerm-*.zip WezTerm-*.exe ; do sha256sum $f > $f.sha256 ; done"+ run: "for f in ThinkTerm-*.zip ThinkTerm-*.exe ; do sha256sum $f > $f.sha256 ; done"- name: "Create pre-release"env:GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}@@ -112,24 +112,4 @@ jobs:env:GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}shell: bash- run: "bash ci/retry.sh gh release upload --clobber $(ci/tag-name.sh) WezTerm-*.zip WezTerm-*.exe *.sha256"- - name: "Checkout winget-pkgs"- uses: actions/checkout@v4- with:- repository: "wez/winget-pkgs"- path: "winget-pkgs"- token: "${{ secrets.GH_PAT }}"- - name: "Setup email for winget repo"- shell: bash- run: "cd winget-pkgs && git config user.email [email protected]"- - name: "Setup name for winget repo"- shell: bash- run: "cd winget-pkgs && git config user.name 'Wez Furlong'"- - name: "Create winget manifest and push to fork"- shell: bash- run: "bash ci/make-winget-pr.sh winget-pkgs WezTerm-*.exe"- - name: "Submit PR"- env:- GITHUB_TOKEN: ${{ secrets.GH_PAT }}- shell: bash- run: 'cd winget-pkgs && gh pr create --fill --body "PR automatically created by release automation in the wezterm repo"'+ run: "bash ci/retry.sh gh release upload --clobber $(ci/tag-name.sh) ThinkTerm-*.zip ThinkTerm-*.exe *.sha256"diff --git a/.gitignore b/.gitignoreindex 88b387e7..a60a1dcb 100644--- a/.gitignore+++ b/.gitignore@@ -64,7 +64,8 @@ dhat-heap.json.idea//winget-pkgs/assets/flatpak/generated-sources.json-/__pycache__/+__pycache__/+*.py[cod]/nix/result/research/docs/diff --git a/assets/flatpak/com.roversx.thinkterm.appdata.template.xml b/assets/flatpak/com.roversx.thinkterm.appdata.template.xmlnew file mode 100644index 00000000..3ee4f292--- /dev/null+++ b/assets/flatpak/com.roversx.thinkterm.appdata.template.xml@@ -0,0 +1,48 @@+<?xml version="1.0" encoding="UTF-8"?>+<component type="desktop-application">+ <content_rating type="oars-1.0" />+ <id>com.roversx.thinkterm</id>+ <metadata_license>MIT</metadata_license>+ <project_license>MIT</project_license>+ <name>ThinkTerm</name>+ <summary>Workspace-first terminal and multiplexer</summary>+ <description>+ <p>+ ThinkTerm is a workspace-first terminal emulator with support for+ modern features such as fonts with ligatures, hyperlinks, multiple+ windows, tabs and split panes.+ </p>++ <p>+ Configuration is expressed using Lua and many powerful functions are+ provided to help you customize your terminal to your workflow.+ </p>++ <p>+ Integrated ssh allows using multiple tabs and panes without requiring+ tmux to be installed on the remote host, and remote multiplexer support+ allows tmux+mosh style workflows without using tmux or mosh, while+ providing a fully native GUI locally.+ </p>+ </description>++ <launchable type="desktop-id">com.roversx.thinkterm.desktop</launchable>++ <url type="homepage">https://github.com/RoversX/thinkterm</url>+ <url type="help">https://github.com/RoversX/thinkterm</url>+ <url type="bugtracker">https://github.com/RoversX/thinkterm/issues</url>++ <developer_name>RoversX</developer_name>++ <releases>+ <release version="@TAG_NAME@" date="@DATE@">+ <description>+ <p>+ A very long list of improvements to performance and+ resource utilization as well as new features.+ The changelog has a complete list!+ </p>+ </description>+ </release>+ </releases>+</component>diff --git a/assets/flatpak/org.wezfurlong.wezterm.json b/assets/flatpak/com.roversx.thinkterm.jsonsimilarity index 89%rename from assets/flatpak/org.wezfurlong.wezterm.jsonrename to assets/flatpak/com.roversx.thinkterm.jsonindex 171bfc99..7b49e1ee 100644--- a/assets/flatpak/org.wezfurlong.wezterm.json+++ b/assets/flatpak/com.roversx.thinkterm.json@@ -1,5 +1,5 @@{- "app-id": "org.wezfurlong.wezterm",+ "app-id": "com.roversx.thinkterm","runtime": "org.freedesktop.Platform","runtime-version": "23.08","sdk": "org.freedesktop.Sdk",@@ -10,7 +10,8 @@"finish-args": ["--share=ipc","--filesystem=home:ro",- "--filesystem=xdg-config/wezterm",+ "--filesystem=xdg-config/thinkterm",+ "--filesystem=xdg-config/wezterm:ro","--socket=fallback-x11","--socket=wayland","--device=dri",@@ -34,11 +35,11 @@"cargo --offline fetch --manifest-path Cargo.toml --verbose","cargo --offline build --release --verbose","mkdir -p /app/share/icons/hicolor/128x128/apps/",- "cp ./assets/icon/terminal.png /app/share/icons/hicolor/128x128/apps/org.wezfurlong.wezterm.png",+ "cp ./assets/icon/terminal.png /app/share/icons/hicolor/128x128/apps/com.roversx.thinkterm.png","mkdir -p /app/share/metainfo/",- "cp ./assets/wezterm.appdata.xml /app/share/metainfo/org.wezfurlong.wezterm.appdata.xml",+ "cp ./assets/wezterm.appdata.xml /app/share/metainfo/com.roversx.thinkterm.appdata.xml","mkdir -p /app/share/applications/",- "cp ./assets/wezterm.desktop /app/share/applications/org.wezfurlong.wezterm.desktop",+ "cp ./assets/wezterm.desktop /app/share/applications/com.roversx.thinkterm.desktop","install -Dm755 ./target/release/wezterm -t /app/bin/","install -Dm755 ./target/release/wezterm-gui -t /app/bin/","install -Dm755 ./target/release/wezterm-mux-server -t /app/bin/",diff --git a/assets/flatpak/org.wezfurlong.wezterm.template.json b/assets/flatpak/com.roversx.thinkterm.template.jsonsimilarity index 83%rename from assets/flatpak/org.wezfurlong.wezterm.template.jsonrename to assets/flatpak/com.roversx.thinkterm.template.jsonindex b821767d..d0d8905c 100644--- a/assets/flatpak/org.wezfurlong.wezterm.template.json+++ b/assets/flatpak/com.roversx.thinkterm.template.json@@ -1,5 +1,5 @@{- "app-id": "org.wezfurlong.wezterm",+ "app-id": "com.roversx.thinkterm","runtime": "org.freedesktop.Platform","runtime-version": "23.08","sdk": "org.freedesktop.Sdk",@@ -10,7 +10,8 @@"finish-args": ["--share=ipc","--filesystem=home:ro",- "--filesystem=xdg-config/wezterm",+ "--filesystem=xdg-config/thinkterm",+ "--filesystem=xdg-config/wezterm:ro","--socket=fallback-x11","--socket=wayland","--device=dri",@@ -31,9 +32,9 @@"build-commands": ["cargo --offline fetch --manifest-path Cargo.toml --verbose","cargo --offline build --release --verbose",- "install -Dm644 ./assets/icon/terminal.png /app/share/icons/hicolor/128x128/apps/org.wezfurlong.wezterm.png",- "install -Dm644 org.wezfurlong.wezterm.appdata.xml /app/share/metainfo/org.wezfurlong.wezterm.appdata.xml",- "install -Dm644 ./assets/wezterm.desktop /app/share/applications/org.wezfurlong.wezterm.desktop",+ "install -Dm644 ./assets/icon/terminal.png /app/share/icons/hicolor/128x128/apps/com.roversx.thinkterm.png",+ "install -Dm644 com.roversx.thinkterm.appdata.xml /app/share/metainfo/com.roversx.thinkterm.appdata.xml",+ "install -Dm644 ./assets/wezterm.desktop /app/share/applications/com.roversx.thinkterm.desktop","install -Dm755 ./target/release/wezterm -t /app/bin/","install -Dm755 ./target/release/wezterm-gui -t /app/bin/","install -Dm755 ./target/release/wezterm-mux-server -t /app/bin/",@@ -51,7 +52,7 @@},{"type": "file",- "path": "org.wezfurlong.wezterm.appdata.xml"+ "path": "com.roversx.thinkterm.appdata.xml"},"generated-sources.json"]diff --git a/assets/flatpak/org.wezfurlong.wezterm.appdata.template.xml b/assets/flatpak/org.wezfurlong.wezterm.appdata.template.xmldeleted file mode 100644index 554f03db..00000000--- a/assets/flatpak/org.wezfurlong.wezterm.appdata.template.xml+++ /dev/null@@ -1,79 +0,0 @@-<?xml version="1.0" encoding="UTF-8"?>-<component type="desktop-application">- <content_rating type="oars-1.0" />- <id>org.wezfurlong.wezterm</id>- <metadata_license>MIT</metadata_license>- <project_license>MIT</project_license>- <name>WezTerm</name>- <summary>Powerful terminal and multiplexer</summary>- <description>- <p>- WezTerm is a terminal emulator with support for modern features such as- fonts with ligatures, hyperlinks, multiple windows, tabs and split panes.- </p>-- <p>- Configuration is expressed using Lua and many powerful functions are- provided to help you customize your terminal to your workflow.- </p>-- <p>- Integrated ssh allows using multiple tabs and panes without requiring- tmux to be installed on the remote host, and remote wezterm multiplexer- support allows tmux+mosh style workflows without using tmux or mosh,- while providing a fully native GUI locally.- </p>- </description>-- <launchable type="desktop-id">org.wezfurlong.wezterm.desktop</launchable>-- <url type="homepage">https://wezterm.org/</url>- <url type="help">https://wezterm.org/help.html</url>- <url type="bugtracker">https://github.com/wezterm/wezterm/issues</url>- <url type="donation">https://github.com/sponsors/wez</url>-- <screenshots>- <screenshot type="default">- <caption>Use background image attachments</caption>- <image>https://wezterm.org/screenshots/wezterm-vday-screenshot.png</image>- </screenshot>- <screenshot>- <caption>Ligatures in VIM</caption>- <image>https://wezterm.org/screenshots/two.png</image>- </screenshot>- <screenshot>- <caption>Multiple windows, tabs and panes are supported</caption>- <video>https://wezterm.org/screenshots/wezterm-tabs.mp4</video>- </screenshot>- <screenshot>- <caption>Quickselect makes mouseless selection fast and convenient</caption>- <image>https://wezterm.org/screenshots/wezterm-quick-select.png</image>- </screenshot>- <screenshot>- <caption>Dynamically change color schemes via escape sequences</caption>- <video>https://wezterm.org/screenshots/wezterm-dynamic-colors.mp4</video>- </screenshot>- <screenshot>- <caption>Use gradients as background image attachments</caption>- <image>https://wezterm.org/screenshots/radial-gradient.png</image>- </screenshot>- <screenshot>- <caption>Compose multiple background layers with parallax scrolling</caption>- <video>https://wezterm.org/screenshots/wezterm-parallax-2.mp4</video>- </screenshot>- </screenshots>-- <developer_name>Wez Furlong</developer_name>-- <releases>- <release version="@TAG_NAME@" date="@DATE@">- <description>- <p>- A very long list of improvements to performance and- resource utilization as well as new features.- The changelog has a complete list!- </p>- </description>- </release>- </releases>-</component>diff --git a/assets/shell-completion/fish b/assets/shell-completion/fishindex 552a047c..fc0daed8 100644--- a/assets/shell-completion/fish+++ b/assets/shell-completion/fish@@ -1,6 +1,6 @@complete -c wezterm -n "__fish_use_subcommand" -l config-file -d 'Specify the configuration file to use, overrides the normal configuration file resolution' -r -Fcomplete -c wezterm -n "__fish_use_subcommand" -l config -d 'Override specific configuration values' -r-complete -c wezterm -n "__fish_use_subcommand" -s n -l skip-config -d 'Skip loading wezterm.lua'+complete -c wezterm -n "__fish_use_subcommand" -s n -l skip-config -d 'Skip loading the ThinkTerm configuration'complete -c wezterm -n "__fish_use_subcommand" -s h -l help -d 'Print help'complete -c wezterm -n "__fish_use_subcommand" -s V -l version -d 'Print version'complete -c wezterm -n "__fish_use_subcommand" -f -a "start" -d 'Start the GUI, optionally running an alternative program [aliases: -e]'@@ -18,7 +18,7 @@ complete -c wezterm -n "__fish_use_subcommand" -f -a "replay" -d 'Replay an ascicomplete -c wezterm -n "__fish_use_subcommand" -f -a "shell-completion" -d 'Generate shell completion information'complete -c wezterm -n "__fish_use_subcommand" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'complete -c wezterm -n "__fish_seen_subcommand_from start" -l cwd -d 'Specify the current working directory for the initially spawned program' -r -f -a "(__fish_complete_directories)"-complete -c wezterm -n "__fish_seen_subcommand_from start" -l class -d 'Override the default windowing system class. The default is "org.wezfurlong.wezterm". Under X11 and Windows this changes the window class. Under Wayland this changes the app_id. This changes the class for all windows spawned by this instance of wezterm, including error, update and ssh authentication dialogs' -r+complete -c wezterm -n "__fish_seen_subcommand_from start" -l class -d 'Override the default windowing system class. The default is "com.roversx.thinkterm". Under X11 and Windows this changes the window class. Under Wayland this changes the app_id. This changes the class for all windows spawned by this ThinkTerm instance, including error, update and ssh authentication dialogs' -rcomplete -c wezterm -n "__fish_seen_subcommand_from start" -l workspace -d 'Override the default workspace with the provided name. The default is "default"' -rcomplete -c wezterm -n "__fish_seen_subcommand_from start" -l position -d 'Override the position for the initial window launched by this process.' -rcomplete -c wezterm -n "__fish_seen_subcommand_from start" -l domain -d 'Name of the multiplexer domain section from the configuration to which you\'d like to connect. If omitted, the default domain will be used' -r@@ -29,7 +29,7 @@ complete -c wezterm -n "__fish_seen_subcommand_from start" -s e -d 'Dummy argumecomplete -c wezterm -n "__fish_seen_subcommand_from start" -l attach -d 'When used with --domain, if the domain already has running panes, wezterm will simply attach and will NOT spawn the specified PROG. If you omit --attach when using --domain, wezterm will attach AND then spawn PROG'complete -c wezterm -n "__fish_seen_subcommand_from start" -s h -l help -d 'Print help (see more with \'--help\')'complete -c wezterm -n "__fish_seen_subcommand_from blocking-start" -l cwd -d 'Specify the current working directory for the initially spawned program' -r -f -a "(__fish_complete_directories)"-complete -c wezterm -n "__fish_seen_subcommand_from blocking-start" -l class -d 'Override the default windowing system class. The default is "org.wezfurlong.wezterm". Under X11 and Windows this changes the window class. Under Wayland this changes the app_id. This changes the class for all windows spawned by this instance of wezterm, including error, update and ssh authentication dialogs' -r+complete -c wezterm -n "__fish_seen_subcommand_from blocking-start" -l class -d 'Override the default windowing system class. The default is "com.roversx.thinkterm". Under X11 and Windows this changes the window class. Under Wayland this changes the app_id. This changes the class for all windows spawned by this ThinkTerm instance, including error, update and ssh authentication dialogs' -rcomplete -c wezterm -n "__fish_seen_subcommand_from blocking-start" -l workspace -d 'Override the default workspace with the provided name. The default is "default"' -rcomplete -c wezterm -n "__fish_seen_subcommand_from blocking-start" -l position -d 'Override the position for the initial window launched by this process.' -rcomplete -c wezterm -n "__fish_seen_subcommand_from blocking-start" -l domain -d 'Name of the multiplexer domain section from the configuration to which you\'d like to connect. If omitted, the default domain will be used' -r@@ -40,15 +40,15 @@ complete -c wezterm -n "__fish_seen_subcommand_from blocking-start" -s e -d 'Dumcomplete -c wezterm -n "__fish_seen_subcommand_from blocking-start" -l attach -d 'When used with --domain, if the domain already has running panes, wezterm will simply attach and will NOT spawn the specified PROG. If you omit --attach when using --domain, wezterm will attach AND then spawn PROG'complete -c wezterm -n "__fish_seen_subcommand_from blocking-start" -s h -l help -d 'Print help (see more with \'--help\')'complete -c wezterm -n "__fish_seen_subcommand_from ssh" -s o -l ssh-option -d 'Override specific SSH configuration options. `wezterm ssh` is able to parse some (but not all!) options from your `~/.ssh/config` and `/etc/ssh/ssh_config` files. This command line switch allows you to override or otherwise specify ssh_config style options' -r-complete -c wezterm -n "__fish_seen_subcommand_from ssh" -l class -d 'Override the default windowing system class. The default is "org.wezfurlong.wezterm". Under X11 and Windows this changes the window class. Under Wayland this changes the app_id. This changes the class for all windows spawned by this instance of wezterm, including error, update and ssh authentication dialogs' -r+complete -c wezterm -n "__fish_seen_subcommand_from ssh" -l class -d 'Override the default windowing system class. The default is "com.roversx.thinkterm". Under X11 and Windows this changes the window class. Under Wayland this changes the app_id. This changes the class for all windows spawned by this ThinkTerm instance, including error, update and ssh authentication dialogs' -rcomplete -c wezterm -n "__fish_seen_subcommand_from ssh" -l position -d 'Override the position for the initial window launched by this process.' -rcomplete -c wezterm -n "__fish_seen_subcommand_from ssh" -s v -d 'Enable verbose ssh protocol tracing. The trace information is printed to the stderr stream of the process'complete -c wezterm -n "__fish_seen_subcommand_from ssh" -s h -l help -d 'Print help (see more with \'--help\')'complete -c wezterm -n "__fish_seen_subcommand_from serial" -l baud -d 'Set the baud rate. The default is 9600 baud' -r-complete -c wezterm -n "__fish_seen_subcommand_from serial" -l class -d 'Override the default windowing system class. The default is "org.wezfurlong.wezterm". Under X11 and Windows this changes the window class. Under Wayland this changes the app_id. This changes the class for all windows spawned by this instance of wezterm, including error, update and ssh authentication dialogs' -r+complete -c wezterm -n "__fish_seen_subcommand_from serial" -l class -d 'Override the default windowing system class. The default is "com.roversx.thinkterm". Under X11 and Windows this changes the window class. Under Wayland this changes the app_id. This changes the class for all windows spawned by this ThinkTerm instance, including error, update and ssh authentication dialogs' -rcomplete -c wezterm -n "__fish_seen_subcommand_from serial" -l position -d 'Override the position for the initial window launched by this process.' -rcomplete -c wezterm -n "__fish_seen_subcommand_from serial" -s h -l help -d 'Print help (see more with \'--help\')'-complete -c wezterm -n "__fish_seen_subcommand_from connect" -l class -d 'Override the default windowing system class. The default is "org.wezfurlong.wezterm". Under X11 and Windows this changes the window class. Under Wayland this changes the app_id. This changes the class for all windows spawned by this instance of wezterm, including error, update and ssh authentication dialogs' -r+complete -c wezterm -n "__fish_seen_subcommand_from connect" -l class -d 'Override the default windowing system class. The default is "com.roversx.thinkterm". Under X11 and Windows this changes the window class. Under Wayland this changes the app_id. This changes the class for all windows spawned by this ThinkTerm instance, including error, update and ssh authentication dialogs' -rcomplete -c wezterm -n "__fish_seen_subcommand_from connect" -l workspace -d 'Override the default workspace with the provided name. The default is "default"' -rcomplete -c wezterm -n "__fish_seen_subcommand_from connect" -l position -d 'Override the position for the initial window launched by this process.' -rcomplete -c wezterm -n "__fish_seen_subcommand_from connect" -l new-tab -d 'When spawning into an existing GUI instance, spawn a new tab into the active window rather than spawn a new window'diff --git a/assets/shell-completion/zsh b/assets/shell-completion/zshindex b7472700..6f267837 100644--- a/assets/shell-completion/zsh+++ b/assets/shell-completion/zsh@@ -17,8 +17,8 @@ _wezterm() {_arguments "${_arguments_options[@]}" \'(-n --skip-config)--config-file=[Specify the configuration file to use, overrides the normal configuration file resolution]:CONFIG_FILE:_files' \'*--config=[Override specific configuration values]:name=value: ' \-'-n[Skip loading wezterm.lua]' \-'--skip-config[Skip loading wezterm.lua]' \+'-n[Skip loading the ThinkTerm configuration]' \+'--skip-config[Skip loading the ThinkTerm configuration]' \'-h[Print help]' \'--help[Print help]' \'-V[Print version]' \@@ -35,7 +35,7 @@ _wezterm() {(start)_arguments "${_arguments_options[@]}" \'--cwd=[Specify the current working directory for the initially spawned program]:CWD:_files -/' \-'--class=[Override the default windowing system class. The default is "org.wezfurlong.wezterm". Under X11 and Windows this changes the window class. Under Wayland this changes the app_id. This changes the class for all windows spawned by this instance of wezterm, including error, update and ssh authentication dialogs]:CLASS: ' \+'--class=[Override the default windowing system class. The default is "com.roversx.thinkterm". Under X11 and Windows this changes the window class. Under Wayland this changes the app_id. This changes the class for all windows spawned by this ThinkTerm instance, including error, update and ssh authentication dialogs]:CLASS: ' \'--workspace=[Override the default workspace with the provided name. The default is "default"]:WORKSPACE: ' \'--position=[Override the position for the initial window launched by this process.]:POSITION: ' \'--domain=[Name of the multiplexer domain section from the configuration to which you'\''d like to connect. If omitted, the default domain will be used]:DOMAIN: ' \@@ -52,7 +52,7 @@ _arguments "${_arguments_options[@]}" \(blocking-start)_arguments "${_arguments_options[@]}" \'--cwd=[Specify the current working directory for the initially spawned program]:CWD:_files -/' \-'--class=[Override the default windowing system class. The default is "org.wezfurlong.wezterm". Under X11 and Windows this changes the window class. Under Wayland this changes the app_id. This changes the class for all windows spawned by this instance of wezterm, including error, update and ssh authentication dialogs]:CLASS: ' \+'--class=[Override the default windowing system class. The default is "com.roversx.thinkterm". Under X11 and Windows this changes the window class. Under Wayland this changes the app_id. This changes the class for all windows spawned by this ThinkTerm instance, including error, update and ssh authentication dialogs]:CLASS: ' \'--workspace=[Override the default workspace with the provided name. The default is "default"]:WORKSPACE: ' \'--position=[Override the position for the initial window launched by this process.]:POSITION: ' \'--domain=[Name of the multiplexer domain section from the configuration to which you'\''d like to connect. If omitted, the default domain will be used]:DOMAIN: ' \@@ -70,7 +70,7 @@ _arguments "${_arguments_options[@]}" \_arguments "${_arguments_options[@]}" \'*-o+[Override specific SSH configuration options. \`wezterm ssh\` is able to parse some (but not all!) options from your \`~/.ssh/config\` and \`/etc/ssh/ssh_config\` files. This command line switch allows you to override or otherwise specify ssh_config style options]:name=value: ' \'*--ssh-option=[Override specific SSH configuration options. \`wezterm ssh\` is able to parse some (but not all!) options from your \`~/.ssh/config\` and \`/etc/ssh/ssh_config\` files. This command line switch allows you to override or otherwise specify ssh_config style options]:name=value: ' \-'--class=[Override the default windowing system class. The default is "org.wezfurlong.wezterm". Under X11 and Windows this changes the window class. Under Wayland this changes the app_id. This changes the class for all windows spawned by this instance of wezterm, including error, update and ssh authentication dialogs]:CLASS: ' \+'--class=[Override the default windowing system class. The default is "com.roversx.thinkterm". Under X11 and Windows this changes the window class. Under Wayland this changes the app_id. This changes the class for all windows spawned by this ThinkTerm instance, including error, update and ssh authentication dialogs]:CLASS: ' \'--position=[Override the position for the initial window launched by this process.]:POSITION: ' \'-v[Enable verbose ssh protocol tracing. The trace information is printed to the stderr stream of the process]' \'-h[Print help (see more with '\''--help'\'')]' \@@ -82,7 +82,7 @@ _arguments "${_arguments_options[@]}" \(serial)_arguments "${_arguments_options[@]}" \'--baud=[Set the baud rate. The default is 9600 baud]:BAUD: ' \-'--class=[Override the default windowing system class. The default is "org.wezfurlong.wezterm". Under X11 and Windows this changes the window class. Under Wayland this changes the app_id. This changes the class for all windows spawned by this instance of wezterm, including error, update and ssh authentication dialogs]:CLASS: ' \+'--class=[Override the default windowing system class. The default is "com.roversx.thinkterm". Under X11 and Windows this changes the window class. Under Wayland this changes the app_id. This changes the class for all windows spawned by this ThinkTerm instance, including error, update and ssh authentication dialogs]:CLASS: ' \'--position=[Override the position for the initial window launched by this process.]:POSITION: ' \'-h[Print help (see more with '\''--help'\'')]' \'--help[Print help (see more with '\''--help'\'')]' \@@ -91,7 +91,7 @@ _arguments "${_arguments_options[@]}" \;;(connect)_arguments "${_arguments_options[@]}" \-'--class=[Override the default windowing system class. The default is "org.wezfurlong.wezterm". Under X11 and Windows this changes the window class. Under Wayland this changes the app_id. This changes the class for all windows spawned by this instance of wezterm, including error, update and ssh authentication dialogs]:CLASS: ' \+'--class=[Override the default windowing system class. The default is "com.roversx.thinkterm". Under X11 and Windows this changes the window class. Under Wayland this changes the app_id. This changes the class for all windows spawned by this ThinkTerm instance, including error, update and ssh authentication dialogs]:CLASS: ' \'--workspace=[Override the default workspace with the provided name. The default is "default"]:WORKSPACE: ' \'--position=[Override the position for the initial window launched by this process.]:POSITION: ' \'--new-tab[When spawning into an existing GUI instance, spawn a new tab into the active window rather than spawn a new window]' \diff --git a/assets/wezterm-nautilus.py b/assets/wezterm-nautilus.pyindex f3a33890..695510fe 100644--- a/assets/wezterm-nautilus.py+++ b/assets/wezterm-nautilus.py@@ -46,7 +46,7 @@ class OpenInWezTermAction(GObject.GObject, Nautilus.MenuProvider):pid = int(child.get_identifier())props = [("PIDs", GLib.Variant('au', [pid])),('CollectMode', GLib.Variant('s', 'inactive-or-failed'))]- name = 'app-nautilus-org.wezfurlong.wezterm-{}.scope'.format(pid)+ name = 'app-nautilus-com.roversx.thinkterm-{}.scope'.format(pid)args = GLib.Variant('(ssa(sv)a(sa(sv)))', (name, 'fail', props, []))self._systemd.call_sync('StartTransientUnit', args,Gio.DBusCallFlags.NO_AUTO_START, 500, None)@@ -56,8 +56,8 @@ class OpenInWezTermAction(GObject.GObject, Nautilus.MenuProvider):self._open_terminal(path)def _make_item(self, name, paths):- item = Nautilus.MenuItem(name=name, label='Open in WezTerm',- icon='org.wezfurlong.wezterm')+ item = Nautilus.MenuItem(name=name, label='Open in ThinkTerm',+ icon='com.roversx.thinkterm')item.connect('activate', self._menu_item_activated, paths)return itemdiff --git a/assets/wezterm.appdata.xml b/assets/wezterm.appdata.xmlindex 237bef22..897b3947 100644--- a/assets/wezterm.appdata.xml+++ b/assets/wezterm.appdata.xml@@ -1,15 +1,16 @@<?xml version="1.0" encoding="UTF-8"?><component type="desktop-application"><content_rating type="oars-1.0" />- <id>org.wezfurlong.wezterm</id>+ <id>com.roversx.thinkterm</id><metadata_license>MIT</metadata_license><project_license>MIT</project_license>- <name>Wez's Terminal Emulator</name>- <summary>A GPU-accelerated cross-platform terminal emulator and multiplexer</summary>+ <name>ThinkTerm</name>+ <summary>A workspace-first terminal emulator and multiplexer</summary><description><p>- WezTerm is a terminal emulator with support for modern features such as- fonts with ligatures, hyperlinks, multiple windows, tabs and split panes.+ ThinkTerm is a workspace-first terminal emulator with support for+ modern features such as fonts with ligatures, hyperlinks, multiple+ windows, tabs and split panes.</p><p>@@ -19,55 +20,19 @@<p>Integrated ssh allows using multiple tabs and panes without requiring- tmux to be installed on the remote host, and remote wezterm multiplexer- support allows tmux+mosh style workflows without using tmux or mosh,- while providing a fully native GUI locally.+ tmux to be installed on the remote host, and remote multiplexer support+ allows tmux+mosh style workflows without using tmux or mosh, while+ providing a fully native GUI locally.</p></description>- <launchable type="desktop-id">org.wezfurlong.wezterm.desktop</launchable>+ <launchable type="desktop-id">com.roversx.thinkterm.desktop</launchable>- <url type="homepage">https://wezterm.org/</url>- <url type="help">https://wezterm.org/help.html</url>- <url type="bugtracker">https://github.com/wezterm/wezterm/issues</url>- <url type="donation">https://github.com/sponsors/wez</url>+ <url type="homepage">https://github.com/RoversX/thinkterm</url>+ <url type="help">https://github.com/RoversX/thinkterm</url>+ <url type="bugtracker">https://github.com/RoversX/thinkterm/issues</url>- <screenshots>- <screenshot type="default">- <caption>Use background image attachments</caption>- <image>https://wezterm.org/screenshots/wezterm-vday-screenshot.png</image>- </screenshot>- <screenshot>- <caption>Ligatures in VIM</caption>- <image>https://wezterm.org/screenshots/two.png</image>- </screenshot>- <screenshot>- <caption>Multiple windows, tabs and panes are supported</caption>- <video>https://wezterm.org/screenshots/wezterm-tabs.mp4</video>- </screenshot>- <screenshot>- <caption>Quickselect makes mouseless selection fast and convenient</caption>- <image>https://wezterm.org/screenshots/wezterm-quick-select.png</image>- </screenshot>- <screenshot>- <caption>Dynamically change color schemes via escape sequences</caption>- <video>https://wezterm.org/screenshots/wezterm-dynamic-colors.mp4</video>- </screenshot>- <screenshot>- <caption>Use gradients as background image attachments</caption>- <image>https://wezterm.org/screenshots/radial-gradient.png</image>- </screenshot>- <screenshot>- <caption>Compose multiple background layers with parallax scrolling</caption>- <video>https://wezterm.org/screenshots/wezterm-parallax-2.mp4</video>- </screenshot>- <screenshot>- <caption>Split the screen into panes and use mouse-less pane selection mode to navigate them</caption>- <image>https://wezterm.org/screenshots/pane-select.png</image>- </screenshot>- </screenshots>-- <developer_name>Wez Furlong</developer_name>+ <developer_name>RoversX</developer_name><releases><release version="20220807-113146-c2fee766" date="2022-08-07">diff --git a/assets/wezterm.desktop b/assets/wezterm.desktopindex 6ad25398..99ffb8ed 100644--- a/assets/wezterm.desktop+++ b/assets/wezterm.desktop@@ -1,11 +1,11 @@[Desktop Entry]-Name=WezTerm-Comment=Wez's Terminal Emulator+Name=ThinkTerm+Comment=Workspace-first terminal emulatorKeywords=shell;prompt;command;commandline;cmd;-Icon=org.wezfurlong.wezterm-StartupWMClass=org.wezfurlong.wezterm+Icon=com.roversx.thinkterm+StartupWMClass=com.roversx.thinktermTryExec=wezterm-Exec=wezterm start --cwd .+Exec=wezterm start --class com.roversx.thinkterm --cwd .Type=ApplicationCategories=System;TerminalEmulator;Utility;Terminal=falsediff --git a/ci/PKGBUILD.template b/ci/PKGBUILD.templateindex 10e99cac..c0ba0535 100644--- a/ci/PKGBUILD.template+++ b/ci/PKGBUILD.template@@ -1,6 +1,6 @@# Maintainer: Wez Furlong <wez at wezfurlong dot org># NOTE: if you're looking at this on AUR, this file is generated from-# https://github.com/wezterm/wezterm/blob/main/ci/PKGBUILD.template+# https://github.com/RoversX/thinkterm/blob/main/ci/PKGBUILD.template# by automation in the wezterm repo.pkgname=wezterm-bin@@ -9,7 +9,7 @@ pkgver=$(echo $_tag | tr - .)pkgrel=2pkgdesc='A GPU-accelerated cross-platform terminal emulator and multiplexer implemented in Rust'arch=('i686' 'x86_64')-url='https://wezterm.org'+url='https://github.com/RoversX/thinkterm'license=('MIT')provides=('wezterm')conflicts=('wezterm')@@ -27,11 +27,11 @@ depends=('xcb-util-wm')optdepends=(- 'python-nautilus: WezTerm context menu in Nautilus'+ 'python-nautilus: ThinkTerm context menu in Nautilus')source=(- "wezterm::https://github.com/wezterm/wezterm/releases/download/${_tag}/WezTerm-${_tag}-Ubuntu16.04.AppImage"- 'LICENSE::https://github.com/wezterm/wezterm/raw/main/LICENSE.md'+ "wezterm::https://github.com/RoversX/thinkterm/releases/download/${_tag}/ThinkTerm-${_tag}-Ubuntu20.04.AppImage"+ 'LICENSE::https://github.com/RoversX/thinkterm/raw/main/LICENSE.md')sha256sums=('@SHA256@'@@ -55,10 +55,10 @@ package() {install -Dm755 squashfs-root/usr/bin/wezterm-gui -t "${pkgdir}/usr/bin/"install -Dm755 squashfs-root/usr/bin/wezterm-mux-server -t "${pkgdir}/usr/bin/"install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"- install -Dm644 squashfs-root/usr/share/icons/hicolor/128x128/apps/org.wezfurlong.wezterm.png \- "${pkgdir}/usr/share/icons/hicolor/128x128/apps/org.wezfurlong.wezterm.png"- install -Dm644 squashfs-root/usr/share/applications/org.wezfurlong.wezterm.desktop \- "${pkgdir}/usr/share/applications/org.wezfurlong.wezterm.desktop"+ install -Dm644 squashfs-root/usr/share/icons/hicolor/128x128/apps/com.roversx.thinkterm.png \+ "${pkgdir}/usr/share/icons/hicolor/128x128/apps/com.roversx.thinkterm.png"+ install -Dm644 squashfs-root/usr/share/applications/com.roversx.thinkterm.desktop \+ "${pkgdir}/usr/share/applications/com.roversx.thinkterm.desktop"install -Dm644 squashfs-root/usr/share/nautilus-python/extensions/wezterm-nautilus.py \"${pkgdir}/usr/share/nautilus-python/extensions/wezterm-nautilus.py"}diff --git a/ci/appimage.sh b/ci/appimage.shindex f1cf227e..f075c244 100755--- a/ci/appimage.sh+++ b/ci/appimage.sh@@ -9,9 +9,9 @@ install -Dsm755 -t AppDir/usr/bin target/release/wezterm-mux-serverinstall -Dsm755 -t AppDir/usr/bin target/release/wezterminstall -Dsm755 -t AppDir/usr/bin target/release/wezterm-guiinstall -Dsm755 -t AppDir/usr/bin target/release/strip-ansi-escapes-install -Dm644 assets/icon/terminal.png AppDir/usr/share/icons/hicolor/128x128/apps/org.wezfurlong.wezterm.png-install -Dm644 assets/wezterm.desktop AppDir/usr/share/applications/org.wezfurlong.wezterm.desktop-install -Dm644 assets/wezterm.appdata.xml AppDir/usr/share/metainfo/org.wezfurlong.wezterm.appdata.xml+install -Dm644 assets/icon/terminal.png AppDir/usr/share/icons/hicolor/128x128/apps/com.roversx.thinkterm.png+install -Dm644 assets/wezterm.desktop AppDir/usr/share/applications/com.roversx.thinkterm.desktop+install -Dm644 assets/wezterm.appdata.xml AppDir/usr/share/metainfo/com.roversx.thinkterm.appdata.xmlinstall -Dm644 assets/wezterm-nautilus.py AppDir/usr/share/nautilus-python/extensions/wezterm-nautilus.py[ -x /tmp/linuxdeploy ] || ( curl -L 'https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage' -o /tmp/linuxdeploy && chmod +x /tmp/linuxdeploy )@@ -23,11 +23,11 @@ distver=$(lsb_release -rs 2>/dev/null || sh -c "source /etc/os-release && echo \# Embed appropriate update info# https://github.com/AppImage/AppImageSpec/blob/master/draft.md#github-releasesif [[ "$BUILD_REASON" == "Schedule" ]] ; then- UPDATE="gh-releases-zsync|wez|wezterm|nightly|WezTerm-*.AppImage.zsync"- OUTPUT=WezTerm-nightly-$distro$distver.AppImage+ UPDATE="gh-releases-zsync|RoversX|thinkterm|nightly|ThinkTerm-*.AppImage.zsync"+ OUTPUT=ThinkTerm-nightly-$distro$distver.AppImageelse- UPDATE="gh-releases-zsync|wez|wezterm|latest|WezTerm-*.AppImage.zsync"- OUTPUT=WezTerm-$TAG_NAME-$distro$distver.AppImage+ UPDATE="gh-releases-zsync|RoversX|thinkterm|latest|ThinkTerm-*.AppImage.zsync"+ OUTPUT=ThinkTerm-$TAG_NAME-$distro$distver.AppImagefi# Munge the path so that it finds our appstreamcli wrapperdiff --git a/ci/check-rust-version.sh b/ci/check-rust-version.shindex 4f3f8364..57d8786e 100755--- a/ci/check-rust-version.sh+++ b/ci/check-rust-version.sh@@ -19,7 +19,7 @@ if ! check_rust_version ; thenecho "use rustup to manage installed versions of Rust"echo "https://www.rust-lang.org/en-US/install.html"echo- echo "See https://wezterm.org/install/source.html for complete"+ echo "See https://github.com/RoversX/thinkterm for complete"echo "installation instructions for wezterm"exit 1fidiff --git a/ci/create-release.sh b/ci/create-release.shindex afa911f4..763e286f 100755--- a/ci/create-release.sh+++ b/ci/create-release.sh@@ -3,14 +3,11 @@ set -xname="$1"notes=$(cat <<EOT-See https://wezterm.org/changelog.html#$name for the changelog+See https://github.com/RoversX/thinkterm/releases/tag/$name for the release notesIf you're looking for nightly downloads or more detailed installation instructions:-[Windows](https://wezterm.org/install/windows.html)-[macOS](https://wezterm.org/install/macos.html)-[Linux](https://wezterm.org/install/linux.html)-[FreeBSD](https://wezterm.org/install/freebsd.html)+[ThinkTerm releases](https://github.com/RoversX/thinkterm/releases)EOT)diff --git a/ci/deploy.sh b/ci/deploy.shindex 4803d364..960b61e7 100755--- a/ci/deploy.sh+++ b/ci/deploy.sh@@ -102,13 +102,13 @@ case $OSTYPE in;;msys)- zipdir=WezTerm-windows-$TAG_NAME+ zipdir=ThinkTerm-windows-$TAG_NAMEif [[ "$BUILD_REASON" == "Schedule" ]] ; then- zipname=WezTerm-windows-nightly.zip- instname=WezTerm-nightly-setup+ zipname=ThinkTerm-windows-nightly.zip+ instname=ThinkTerm-nightly-setupelsezipname=$zipdir.zip- instname=WezTerm-${TAG_NAME}-setup+ instname=ThinkTerm-${TAG_NAME}-setupfirm -rf $zipdir $zipnamemkdir $zipdir@@ -189,23 +189,23 @@ BUILDEOFEOFName: weztermVersion: ${WEZTERM_RPM_VERSION}Release: ${SPEC_RELEASE}-Packager: Wez Furlong <[email protected]>+Packager: RoversXLicense: MIT-URL: https://wezterm.org/-Summary: Wez's Terminal Emulator.+URL: https://github.com/RoversX/thinkterm+Summary: ThinkTerm workspace-first terminal emulator.${BUILD_REQUIRES}Requires: wezterm-common, wezterm-gui, wezterm-mux-server%global debug_package %{nil}%description-wezterm is a terminal emulator with support for modern features+ThinkTerm is a terminal emulator with support for modern featuressuch as fonts with ligatures, hyperlinks, tabs and multiplewindows.# Subpackage: wezterm-common%package -n wezterm-common-Summary: Wez's Terminal Emulator - Common CLI components+Summary: ThinkTerm - Common CLI componentsRequires: openssl%description -n wezterm-commonwezterm-common provides the base CLI launcher and utilities shared by@@ -213,7 +213,7 @@ all wezterm components.# Subpackage: wezterm-gui%package -n wezterm-gui-Summary: Wez's Terminal Emulator - GUI and multiplexer+Summary: ThinkTerm - GUI and multiplexerRequires: wezterm-common%if 0%{?suse_version}Requires: dbus-1, fontconfig, libxcb1, libxkbcommon0, libxkbcommon-x11-0, libwayland-client0, libwayland-egl1, libwayland-cursor0, Mesa-libEGL1, libxcb-keysyms1, libxcb-ewmh2, libxcb-icccm4@@ -227,7 +227,7 @@ tabs and multiple windows.# Subpackage: wezterm-mux-server%package -n wezterm-mux-server-Summary: Wez's Terminal Emulator - Multiplexer server (headless)+Summary: ThinkTerm - Multiplexer server (headless)Requires: openssl%description -n wezterm-mux-serverwezterm-mux-server is a headless terminal multiplexer that can be used@@ -248,9 +248,9 @@ install -Dsm755 $TARGET_DIR/release/strip-ansi-escapes -t %{buildroot}/usr/bininstall -Dm644 assets/shell-integration/* -t %{buildroot}/etc/profile.dinstall -Dm644 assets/shell-completion/zsh %{buildroot}/usr/share/zsh/site-functions/_wezterminstall -Dm644 assets/shell-completion/bash %{buildroot}/etc/bash_completion.d/wezterm-install -Dm644 assets/icon/terminal.png %{buildroot}/usr/share/icons/hicolor/128x128/apps/org.wezfurlong.wezterm.png-install -Dm644 assets/wezterm.desktop %{buildroot}/usr/share/applications/org.wezfurlong.wezterm.desktop-install -Dm644 assets/wezterm.appdata.xml %{buildroot}/usr/share/metainfo/org.wezfurlong.wezterm.appdata.xml+install -Dm644 assets/icon/terminal.png %{buildroot}/usr/share/icons/hicolor/128x128/apps/com.roversx.thinkterm.png+install -Dm644 assets/wezterm.desktop %{buildroot}/usr/share/applications/com.roversx.thinkterm.desktop+install -Dm644 assets/wezterm.appdata.xml %{buildroot}/usr/share/metainfo/com.roversx.thinkterm.appdata.xmlinstall -Dm644 assets/wezterm-nautilus.py %{buildroot}/usr/share/nautilus-python/extensions/wezterm-nautilus.py%files@@ -266,9 +266,9 @@ install -Dm644 assets/wezterm-nautilus.py %{buildroot}/usr/share/nautilus-python%files -n wezterm-gui/usr/bin/open-wezterm-here/usr/bin/wezterm-gui-/usr/share/icons/hicolor/128x128/apps/org.wezfurlong.wezterm.png-/usr/share/applications/org.wezfurlong.wezterm.desktop-/usr/share/metainfo/org.wezfurlong.wezterm.appdata.xml+/usr/share/icons/hicolor/128x128/apps/com.roversx.thinkterm.png+/usr/share/applications/com.roversx.thinkterm.desktop+/usr/share/metainfo/com.roversx.thinkterm.appdata.xml/usr/share/nautilus-python/extensions/wezterm-nautilus.py*%files -n wezterm-mux-server@@ -304,16 +304,16 @@ Package: $pkgnameVersion: ${TAG_NAME#nightly-}Conflicts: $conflictsArchitecture: $(dpkg-architecture -q DEB_BUILD_ARCH_CPU)-Maintainer: Wez Furlong <[email protected]>+Maintainer: RoversXSection: utilsPriority: optional-Homepage: https://wezterm.org/-Description: Wez's Terminal Emulator.- wezterm is a terminal emulator with support for modern features+Homepage: https://github.com/RoversX/thinkterm+Description: ThinkTerm workspace-first terminal emulator.+ ThinkTerm is a terminal emulator with support for modern featuressuch as fonts with ligatures, hyperlinks, tabs and multiplewindows.Provides: x-terminal-emulator-Source: https://wezterm.org/+Source: https://github.com/RoversX/thinktermEOFcat > pkg/debian/postinst <<EOF@@ -348,9 +348,9 @@ EOFecho $deps | sed -e 's/shlibs:Depends=/Depends: /' >> pkg/debian/DEBIAN/controlcat pkg/debian/DEBIAN/control- install -Dm644 assets/icon/terminal.png pkg/debian/usr/share/icons/hicolor/128x128/apps/org.wezfurlong.wezterm.png- install -Dm644 assets/wezterm.desktop pkg/debian/usr/share/applications/org.wezfurlong.wezterm.desktop- install -Dm644 assets/wezterm.appdata.xml pkg/debian/usr/share/metainfo/org.wezfurlong.wezterm.appdata.xml+ install -Dm644 assets/icon/terminal.png pkg/debian/usr/share/icons/hicolor/128x128/apps/com.roversx.thinkterm.png+ install -Dm644 assets/wezterm.desktop pkg/debian/usr/share/applications/com.roversx.thinkterm.desktop+ install -Dm644 assets/wezterm.appdata.xml pkg/debian/usr/share/metainfo/com.roversx.thinkterm.appdata.xmlinstall -Dm644 assets/wezterm-nautilus.py pkg/debian/usr/share/nautilus-python/extensions/wezterm-nautilus.pyinstall -Dm644 assets/shell-completion/bash pkg/debian/usr/share/bash-completion/completions/wezterminstall -Dm644 assets/shell-completion/zsh pkg/debian/usr/share/zsh/functions/Completion/Unix/_wezterm@@ -394,11 +394,11 @@ pkgname=weztermpkgver=$(echo "$pkgver" | cut -d'-' -f1-2 | tr - .)_pkgver=$pkgverpkgrel=0-pkgdesc="A GPU-accelerated cross-platform terminal emulator and multiplexer written in Rust"+pkgdesc="A workspace-first terminal emulator and multiplexer written in Rust"license="MIT"arch="all"options="!check"-url="https://wezterm.org/"+url="https://github.com/RoversX/thinkterm"makedepends="cmd:tic"source="$TARGET_DIR/release/wezterm@@ -423,12 +423,12 @@ package() {install -Dm755 -t "\$pkgdir"/usr/bin "\$srcdir"/wezterm-guiinstall -Dm755 -t "\$pkgdir"/usr/bin "\$srcdir"/wezterm-mux-server- install -Dm644 -t "\$pkgdir"/usr/share/applications "\$srcdir"/wezterm.desktop- install -Dm644 -t "\$pkgdir"/usr/share/metainfo "\$srcdir"/wezterm.appdata.xml- install -Dm644 "\$srcdir"/terminal.png "\$pkgdir"/usr/share/pixmaps/wezterm.png- install -Dm644 "\$srcdir"/wezterm-icon.svg "\$pkgdir"/usr/share/pixmaps/wezterm.svg- install -Dm644 "\$srcdir"/terminal.png "\$pkgdir"/usr/share/icons/hicolor/128x128/apps/wezterm.png- install -Dm644 "\$srcdir"/wezterm-icon.svg "\$pkgdir"/usr/share/icons/hicolor/scalable/apps/wezterm.svg+ install -Dm644 "\$srcdir"/wezterm.desktop "\$pkgdir"/usr/share/applications/com.roversx.thinkterm.desktop+ install -Dm644 "\$srcdir"/wezterm.appdata.xml "\$pkgdir"/usr/share/metainfo/com.roversx.thinkterm.appdata.xml+ install -Dm644 "\$srcdir"/terminal.png "\$pkgdir"/usr/share/pixmaps/com.roversx.thinkterm.png+ install -Dm644 "\$srcdir"/wezterm-icon.svg "\$pkgdir"/usr/share/pixmaps/com.roversx.thinkterm.svg+ install -Dm644 "\$srcdir"/terminal.png "\$pkgdir"/usr/share/icons/hicolor/128x128/apps/com.roversx.thinkterm.png+ install -Dm644 "\$srcdir"/wezterm-icon.svg "\$pkgdir"/usr/share/icons/hicolor/scalable/apps/com.roversx.thinkterm.svginstall -Dm644 "\$builddir"/wezterm.terminfo "\$pkgdir"/usr/share/terminfo/w/wezterm}EOFdiff --git a/ci/flatpak.sh b/ci/flatpak.shindex 2d84f4c8..95494b35 100755--- a/ci/flatpak.sh+++ b/ci/flatpak.sh@@ -18,6 +18,6 @@ if [ "${CI}" != "yes" ] ; thenflatpak-builder \--state-dir /var/tmp/wezterm-flatpak-builder \--install /var/tmp/wezterm-flatpak-repo \- assets/flatpak/org.wezfurlong.wezterm.json \+ assets/flatpak/com.roversx.thinkterm.json \--force-clean --user -yfidiff --git a/ci/generate-workflows.py b/ci/generate-workflows.pyindex e7c72d16..710028c7 100755--- a/ci/generate-workflows.py+++ b/ci/generate-workflows.py@@ -562,9 +562,9 @@ rustup default {toolchain}if self.uses_yum() or self.uses_zypper():patterns += ["wezterm-*.rpm"]elif "win" in self.name:- patterns += ["WezTerm-*.zip", "WezTerm-*.exe"]+ patterns += ["ThinkTerm-*.zip", "ThinkTerm-*.exe"]elif "mac" in self.name:- patterns += ["WezTerm-*.zip"]+ patterns += ["ThinkTerm-*.zip"]elif ("ubuntu" in self.name) or ("debian" in self.name):patterns += ["wezterm-*.deb", "wezterm-*.xz"]elif "alpine" in self.name:@@ -703,10 +703,10 @@ rustup default {toolchain}return []return [ActionStep(- "Checkout flathub/org.wezfurlong.wezterm",+ "Checkout flathub/com.roversx.thinkterm",action="actions/checkout@v4",params={- "repository": "flathub/org.wezfurlong.wezterm",+ "repository": "flathub/com.roversx.thinkterm","path": "flathub","token": "${{ secrets.GH_PAT }}",},@@ -717,7 +717,7 @@ rustup default {toolchain}),RunStep("Submit PR",- 'cd flathub && gh pr create --fill --body "PR automatically created by release automation in the wezterm repo"',+ 'cd flathub && gh pr create --fill --body "PR automatically created by release automation in the ThinkTerm repo"',env={"GITHUB_TOKEN": "${{ secrets.GH_PAT }}",},@@ -725,93 +725,17 @@ rustup default {toolchain}]def create_winget_pr(self):- steps = []- if "windows" in self.name:- steps += [- ActionStep(- "Checkout winget-pkgs",- action="actions/checkout@v4",- params={- "repository": "wez/winget-pkgs",- "path": "winget-pkgs",- "token": "${{ secrets.GH_PAT }}",- },- ),- RunStep(- "Setup email for winget repo",- "cd winget-pkgs && git config user.email [email protected]",- ),- RunStep(- "Setup name for winget repo",- "cd winget-pkgs && git config user.name 'Wez Furlong'",- ),- RunStep(- "Create winget manifest and push to fork",- "bash ci/make-winget-pr.sh winget-pkgs WezTerm-*.exe",- ),- RunStep(- "Submit PR",- 'cd winget-pkgs && gh pr create --fill --body "PR automatically created by release automation in the wezterm repo"',- env={- "GITHUB_TOKEN": "${{ secrets.GH_PAT }}",- },- ),- ]-- return steps+ # ThinkTerm release uploads are enabled for RoversX/thinkterm, but the+ # upstream Winget automation still targets wez-owned forks and paths.+ # Keep publishing to GitHub releases; re-enable this after a ThinkTerm+ # Winget fork/package id is configured.+ return []def update_homebrew_tap(self):- steps = []- if "macos" in self.name:- steps += [- ActionStep(- "Checkout homebrew tap",- action="actions/checkout@v4",- params={- "repository": "wez/homebrew-wezterm",- "path": "homebrew-wezterm",- "token": "${{ secrets.GH_PAT }}",- },- ),- RunStep(- "Update homebrew tap formula",- "cp wezterm.rb homebrew-wezterm/Casks/wezterm.rb",- ),- ActionStep(- "Commit homebrew tap changes",- action="stefanzweifel/git-auto-commit-action@v5",- params={- "commit_message": "Automated update to match latest tag",- "repository": "homebrew-wezterm",- },- ),- ]- elif self.app_image:- steps += [- ActionStep(- "Checkout linuxbrew tap",- action="actions/checkout@v4",- params={- "repository": "wez/homebrew-wezterm-linuxbrew",- "path": "linuxbrew-wezterm",- "token": "${{ secrets.GH_PAT }}",- },- ),- RunStep(- "Update linuxbrew tap formula",- "cp wezterm-linuxbrew.rb linuxbrew-wezterm/Formula/wezterm.rb",- ),- ActionStep(- "Commit linuxbrew tap changes",- action="stefanzweifel/git-auto-commit-action@v5",- params={- "commit_message": "Automated update to match latest tag",- "repository": "linuxbrew-wezterm",- },- ),- ]-- return steps+ # The upstream tap automation still targets Wez-owned Homebrew taps.+ # Do not run it from ThinkTerm tag uploads; configure ThinkTerm-owned+ # taps before restoring this.+ return []def global_env(self):self.env["CARGO_INCREMENTAL"] = "0"@@ -1087,7 +1011,7 @@ jobs:upload:runs-on: ubuntu-latestneeds: build- if: github.repository == 'wezterm/wezterm'+ if: github.repository == 'RoversX/thinkterm'permissions:contents: writepages: writediff --git a/ci/make-flathub-pr.sh b/ci/make-flathub-pr.shindex 1ad03db7..7e0eae20 100755--- a/ci/make-flathub-pr.sh+++ b/ci/make-flathub-pr.sh@@ -6,20 +6,20 @@ python3 -m pip install toml aiohttpcurl -L 'https://github.com/flatpak/flatpak-builder-tools/raw/master/cargo/flatpak-cargo-generator.py' > /tmp/flatpak-cargo-generator.pypython3 /tmp/flatpak-cargo-generator.py Cargo.lock -o flathub/generated-sources.json-URL="https://github.com/wezterm/wezterm/releases/download/${TAG_NAME}/wezterm-${TAG_NAME}-src.tar.gz"+URL="https://github.com/RoversX/thinkterm/releases/download/${TAG_NAME}/wezterm-${TAG_NAME}-src.tar.gz"# We require that something has obtained the source archive already and left it# in the current dir. This is handled by actions/download-artifact in CISHA256=$(sha256sum wezterm*-src.tar.gz | cut -d' ' -f1)-sed -e "s,@URL@,$URL,g" -e "s/@SHA256@/$SHA256/g" < assets/flatpak/org.wezfurlong.wezterm.template.json > flathub/org.wezfurlong.wezterm.json+sed -e "s,@URL@,$URL,g" -e "s/@SHA256@/$SHA256/g" < assets/flatpak/com.roversx.thinkterm.template.json > flathub/com.roversx.thinkterm.jsonRELEASE_DATE=$(git -c "core.abbrev=8" show -s "--format=%cd" "--date=format:%Y-%m-%d")-sed -e "s,@TAG_NAME@,$TAG_NAME,g" -e "s/@DATE@/$RELEASE_DATE/g" < assets/flatpak/org.wezfurlong.wezterm.appdata.template.xml > flathub/org.wezfurlong.wezterm.appdata.xml+sed -e "s,@TAG_NAME@,$TAG_NAME,g" -e "s/@DATE@/$RELEASE_DATE/g" < assets/flatpak/com.roversx.thinkterm.appdata.template.xml > flathub/com.roversx.thinkterm.appdata.xmlcd flathub-git config user.email [email protected]-git config user.name 'Wez Furlong'+git config user.email [email protected]+git config user.name 'ThinkTerm Release Bot'git checkout -b "$TAG_NAME" origin/mastergit add --allgit diff --cacheddiff --git a/ci/make-winget-pr.sh b/ci/make-winget-pr.shindex 4c3ce664..c5e600f2 100755--- a/ci/make-winget-pr.sh+++ b/ci/make-winget-pr.sh@@ -17,10 +17,10 @@ exehash=$(sha256sum -b ../$setup_exe | cut -f1 -d' ' | tr a-f A-F)release_date=$(git show -s "--format=%cd" "--date=format:%Y-%m-%d")# Create the directory structure-mkdir manifests/w/wezterm/wezterm/$TAG_NAME+mkdir -p manifests/r/RoversX/ThinkTerm/$TAG_NAME-cat > manifests/w/wezterm/wezterm/$TAG_NAME/wez.wezterm.installer.yaml <<-EOT-PackageIdentifier: wez.wezterm+cat > manifests/r/RoversX/ThinkTerm/$TAG_NAME/RoversX.ThinkTerm.installer.yaml <<-EOT+PackageIdentifier: RoversX.ThinkTermPackageVersion: $TAG_NAMEMinimumOSVersion: 10.0.17763.0InstallerType: inno@@ -28,33 +28,33 @@ UpgradeBehavior: installReleaseDate: $release_dateInstallers:- Architecture: x64- InstallerUrl: https://github.com/wezterm/wezterm/releases/download/$TAG_NAME/$setup_exe+ InstallerUrl: https://github.com/RoversX/thinkterm/releases/download/$TAG_NAME/$setup_exeInstallerSha256: $exehash- ProductCode: '{BCF6F0DA-5B9A-408D-8562-F680AE6E1EAF}_is1'+ ProductCode: '{56CBA99B-8F65-4EC0-8CE4-F13BFCB70274}_is1'ManifestType: installerManifestVersion: 1.1.0EOT-cat > manifests/w/wezterm/wezterm/$TAG_NAME/wez.wezterm.locale.en-US.yaml <<-EOT-PackageIdentifier: wez.wezterm+cat > manifests/r/RoversX/ThinkTerm/$TAG_NAME/RoversX.ThinkTerm.locale.en-US.yaml <<-EOT+PackageIdentifier: RoversX.ThinkTermPackageVersion: $TAG_NAMEPackageLocale: en-US-Publisher: Wez Furlong-PublisherUrl: https://wezfurlong.org/-PublisherSupportUrl: https://github.com/wezterm/wezterm/issues-Author: Wez Furlong-PackageName: WezTerm-PackageUrl: http://wezterm.org+Publisher: RoversX+PublisherUrl: https://github.com/RoversX/thinkterm+PublisherSupportUrl: https://github.com/RoversX/thinkterm/issues+Author: RoversX+PackageName: ThinkTerm+PackageUrl: https://github.com/RoversX/thinktermLicense: MIT-LicenseUrl: https://github.com/wezterm/wezterm/blob/main/LICENSE.md-ShortDescription: A GPU-accelerated cross-platform terminal emulator and multiplexer implemented in Rust-ReleaseNotesUrl: https://wezterm.org/changelog.html#$TAG_NAME+LicenseUrl: https://github.com/RoversX/thinkterm/blob/main/LICENSE.md+ShortDescription: A workspace-first terminal emulator and multiplexer implemented in Rust+ReleaseNotesUrl: https://github.com/RoversX/thinkterm/releases/tag/$TAG_NAMEManifestType: defaultLocaleManifestVersion: 1.1.0EOT-cat > manifests/w/wezterm/wezterm/$TAG_NAME/wez.wezterm.yaml <<-EOT-PackageIdentifier: wez.wezterm+cat > manifests/r/RoversX/ThinkTerm/$TAG_NAME/RoversX.ThinkTerm.yaml <<-EOT+PackageIdentifier: RoversX.ThinkTermPackageVersion: $TAG_NAMEDefaultLocale: en-USManifestType: version@@ -63,5 +63,5 @@ EOTgit add --allgit diff --cached-git commit -m "New version: wez.wezterm version $TAG_NAME"+git commit -m "New version: RoversX.ThinkTerm version $TAG_NAME"git push --set-upstream origin "$TAG_NAME" --quietdiff --git a/ci/subst-release-info.py b/ci/subst-release-info.pyindex 7602adb6..fd8f471e 100755--- a/ci/subst-release-info.py+++ b/ci/subst-release-info.py@@ -18,9 +18,9 @@ CATEGORIZE = {r"Ubuntu20.04.tar.xz$": "linux_raw_bin",r"^wezterm-\d+-\d+-[a-f0-9]+.tar.xz$": "linux_raw_bin",r"src.tar.gz$": "src",- r"^WezTerm-macos-.*.zip$": "macos_zip",- r"^WezTerm-windows-.*.zip$": "windows_zip",- r"^WezTerm-.*.setup.exe$": "windows_exe",+ r"^ThinkTerm-macos-.*.zip$": "macos_zip",+ r"^ThinkTerm-windows-.*.zip$": "windows_zip",+ r"^ThinkTerm-.*.setup.exe$": "windows_exe",r"alpine(\d+)\.(\d+)(:?-\S+)?.apk": "alpine\\1_\\2_apk",}diff --git a/ci/wezterm-homebrew-macos.rb.template b/ci/wezterm-homebrew-macos.rb.templateindex 7b987205..b821f2a7 100644--- a/ci/wezterm-homebrew-macos.rb.template+++ b/ci/wezterm-homebrew-macos.rb.template@@ -9,7 +9,7 @@ cask "thinkterm" dourl "https://github.com/RoversX/thinkterm/releases/download/#{version}/ThinkTerm-macos-#{version}.zip"name "ThinkTerm"- desc "A workspace-first terminal based on WezTerm"+ desc "A workspace-first terminal"homepage "https://github.com/RoversX/thinkterm"conflicts_with cask: [diff --git a/ci/wezterm-linuxbrew.rb.template b/ci/wezterm-linuxbrew.rb.templateindex d0df5dff..0d469698 100644--- a/ci/wezterm-linuxbrew.rb.template+++ b/ci/wezterm-linuxbrew.rb.template@@ -1,13 +1,13 @@# Note: if you are viewing this from the tap repo, this file is automatically# updated from:-# https://github.com/wezterm/wezterm/blob/main/ci/wezterm-linuxbrew.rb.template+# https://github.com/RoversX/thinkterm/blob/main/ci/wezterm-linuxbrew.rb.template# by automation in the wezterm repo.class Wezterm < Formuladesc "A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust"- homepage "https://wezterm.org/"- url "https://github.com/wezterm/wezterm/releases/download/@TAG@/WezTerm-@[email protected]"+ homepage "https://github.com/RoversX/thinkterm"+ url "https://github.com/RoversX/thinkterm/releases/download/@TAG@/ThinkTerm-@[email protected]"sha256 "@SHA256@"- head "https://github.com/wezterm/wezterm/releases/download/nightly/WezTerm-nightly-Ubuntu20.04.AppImage"+ head "https://github.com/RoversX/thinkterm/releases/download/nightly/ThinkTerm-nightly-Ubuntu20.04.AppImage"def installDir.glob("*.AppImage").each do |img|diff --git a/ci/windows-installer.iss b/ci/windows-installer.issindex 59d16102..099b7b79 100644--- a/ci/windows-installer.iss+++ b/ci/windows-installer.iss@@ -2,14 +2,14 @@; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!; vim:ts=2:sw=2:et:-#define MyAppName "WezTerm"+#define MyAppName "ThinkTerm";#define MyAppVersion "1.5"-#define MyAppPublisher "Wez Furlong"-#define MyAppURL "http://wezterm.org"+#define MyAppPublisher "RoversX"+#define MyAppURL "https://github.com/RoversX/thinkterm"#define MyAppExeName "wezterm-gui.exe"[Setup]-AppId={{BCF6F0DA-5B9A-408D-8562-F680AE6E1EAF}+AppId={{56CBA99B-8F65-4EC0-8CE4-F13BFCB70274}ArchitecturesAllowed=x64 arm64ArchitecturesInstallIn64BitMode=x64 arm64AppName={#MyAppName}@@ -26,7 +26,7 @@ DisableProgramGroupPage=yes;PrivilegesRequired=lowest;PrivilegesRequiredOverridesAllowed=dialogOutputDir=..-OutputBaseFilename=WezTerm-Setup+OutputBaseFilename=ThinkTerm-SetupSetupIconFile=..\assets\windows\terminal.icoUninstallDisplayIcon={app}\{#MyAppExeName}Compression=lzma@@ -55,22 +55,22 @@ Source: "..\target\release\strip-ansi-escapes.exe"; DestDir: "{app}"; Flags: ign; NOTE: Don't use "Flags: ignoreversion" on any shared system files[Icons]-Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; AppUserModelID: "org.wezfurlong.wezterm"-Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon; AppUserModelID: "org.wezfurlong.wezterm"+Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; AppUserModelID: "com.roversx.thinkterm"+Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon; AppUserModelID: "com.roversx.thinkterm"[Run]Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent[Registry]-Root: HKA; Subkey: "Software\Classes\Drive\shell\Open WezTerm here"; Flags: uninsdeletekey-Root: HKA; Subkey: "Software\Classes\Drive\shell\Open WezTerm here"; ValueName: "icon"; ValueType: string; ValueData: "{app}\{#MyAppExeName}"; Flags: uninsdeletekey;-Root: HKA; Subkey: "Software\Classes\Drive\shell\Open WezTerm here\command"; ValueType: string; ValueData: """{app}\{#MyAppExeName}"" start --no-auto-connect --cwd ""%V\"""; Flags: uninsdeletekey;-Root: HKA; Subkey: "Software\Classes\Directory\Background\shell\Open WezTerm here"; Flags: uninsdeletekey-Root: HKA; Subkey: "Software\Classes\Directory\Background\shell\Open WezTerm here"; ValueName: "icon"; ValueType: string; ValueData: "{app}\{#MyAppExeName}"; Flags: uninsdeletekey;-Root: HKA; Subkey: "Software\Classes\Directory\Background\shell\Open WezTerm here\command"; ValueType: string; ValueData: """{app}\{#MyAppExeName}"" start --no-auto-connect --cwd ""%V"; Flags: uninsdeletekey;-Root: HKA; Subkey: "Software\Classes\Directory\shell\Open WezTerm here"; Flags: uninsdeletekey-Root: HKA; Subkey: "Software\Classes\Directory\shell\Open WezTerm here"; ValueName: "icon"; ValueType: string; ValueData: "{app}\{#MyAppExeName}"; Flags: uninsdeletekey;-Root: HKA; Subkey: "Software\Classes\Directory\shell\Open WezTerm here\command"; ValueType: string; ValueData: """{app}\{#MyAppExeName}"" start --no-auto-connect --cwd ""%V\\"""; Flags: uninsdeletekey;+Root: HKA; Subkey: "Software\Classes\Drive\shell\Open ThinkTerm here"; Flags: uninsdeletekey+Root: HKA; Subkey: "Software\Classes\Drive\shell\Open ThinkTerm here"; ValueName: "icon"; ValueType: string; ValueData: "{app}\{#MyAppExeName}"; Flags: uninsdeletekey;+Root: HKA; Subkey: "Software\Classes\Drive\shell\Open ThinkTerm here\command"; ValueType: string; ValueData: """{app}\{#MyAppExeName}"" start --no-auto-connect --cwd ""%V\"""; Flags: uninsdeletekey;+Root: HKA; Subkey: "Software\Classes\Directory\Background\shell\Open ThinkTerm here"; Flags: uninsdeletekey+Root: HKA; Subkey: "Software\Classes\Directory\Background\shell\Open ThinkTerm here"; ValueName: "icon"; ValueType: string; ValueData: "{app}\{#MyAppExeName}"; Flags: uninsdeletekey;+Root: HKA; Subkey: "Software\Classes\Directory\Background\shell\Open ThinkTerm here\command"; ValueType: string; ValueData: """{app}\{#MyAppExeName}"" start --no-auto-connect --cwd ""%V"; Flags: uninsdeletekey;+Root: HKA; Subkey: "Software\Classes\Directory\shell\Open ThinkTerm here"; Flags: uninsdeletekey+Root: HKA; Subkey: "Software\Classes\Directory\shell\Open ThinkTerm here"; ValueName: "icon"; ValueType: string; ValueData: "{app}\{#MyAppExeName}"; Flags: uninsdeletekey;+Root: HKA; Subkey: "Software\Classes\Directory\shell\Open ThinkTerm here\command"; ValueType: string; ValueData: """{app}\{#MyAppExeName}"" start --no-auto-connect --cwd ""%V\\"""; Flags: uninsdeletekey;[Code]{ https://stackoverflow.com/a/46609047/149111 }diff --git a/config/src/config.rs b/config/src/config.rsindex 8d437873..c2e7af55 100644--- a/config/src/config.rs+++ b/config/src/config.rs@@ -49,6 +49,14 @@ use wezterm_input_types::{use wezterm_term::TerminalSize;const MACOS_DEFAULT_COLOR_SCHEME: &str = "Apple System Colors";+const PRODUCT_DIR_NAME: &str = "thinkterm";+const LEGACY_PRODUCT_DIR_NAME: &str = "wezterm";+const DURABLE_LEGACY_DATA_ITEMS: &[&str] = &[+ "plugins",+ "recent-commands.json",+ "recent-emoji.json",+ "repl-history",+];#[derive(Debug, Clone, FromDynamic, ToDynamic, ConfigMeta)]pub struct Config {@@ -1031,15 +1039,10 @@ impl Config {// multiple. In addition, it spawns a lot of subprocesses,// so we do this bit "by-hand"- let mut paths = vec![- PathPossibility::optional(- HOME_DIR- .join(".config")- .join("thinkterm")- .join("wezterm.lua"),- ),- PathPossibility::optional(HOME_DIR.join(".thinkterm.lua")),- ];+ let mut paths = active_thinkterm_config_candidates(&HOME_DIR)+ .into_iter()+ .map(PathPossibility::optional)+ .collect::<Vec<_>>();if cfg!(windows) {// On Windows, a common use case is to maintain a thumb drive@@ -1053,6 +1056,7 @@ impl Config {if let Ok(exe_name) = std::env::current_exe() {if let Some(exe_dir) = exe_name.parent() {paths.insert(0, PathPossibility::optional(exe_dir.join("wezterm.lua")));+ paths.insert(0, PathPossibility::optional(exe_dir.join("thinkterm.lua")));}}}@@ -1060,6 +1064,10 @@ impl Config {log::trace!("Note: WEZTERM_CONFIG_FILE is set in the environment");paths.insert(0, PathPossibility::required(path.into()));}+ if let Some(path) = std::env::var_os("THINKTERM_CONFIG_FILE") {+ log::trace!("Note: THINKTERM_CONFIG_FILE is set in the environment");+ paths.insert(0, PathPossibility::required(path.into()));+ }if let Some(path) = CONFIG_FILE_OVERRIDE.lock().unwrap().as_ref() {log::trace!("Note: config file override is set");@@ -1085,9 +1093,11 @@ impl Config {}}- // We didn't find (or were asked to skip) a wezterm.lua file, so+ // We didn't find (or were asked to skip) a config file, so// update the environment to make it simpler to understand this// state.+ std::env::remove_var("THINKTERM_CONFIG_FILE");+ std::env::remove_var("THINKTERM_CONFIG_DIR");std::env::remove_var("WEZTERM_CONFIG_FILE");std::env::remove_var("WEZTERM_CONFIG_DIR");@@ -1118,12 +1128,22 @@ impl Config {pub fn load_file_for_import(path: &Path) -> anyhow::Result<ConfigImportResult> {struct EnvRestore {+ thinkterm_config_file: Option<std::ffi::OsString>,+ thinkterm_config_dir: Option<std::ffi::OsString>,config_file: Option<std::ffi::OsString>,config_dir: Option<std::ffi::OsString>,}impl Drop for EnvRestore {fn drop(&mut self) {+ match self.thinkterm_config_file.take() {+ Some(value) => std::env::set_var("THINKTERM_CONFIG_FILE", value),+ None => std::env::remove_var("THINKTERM_CONFIG_FILE"),+ }+ match self.thinkterm_config_dir.take() {+ Some(value) => std::env::set_var("THINKTERM_CONFIG_DIR", value),+ None => std::env::remove_var("THINKTERM_CONFIG_DIR"),+ }match self.config_file.take() {Some(value) => std::env::set_var("WEZTERM_CONFIG_FILE", value),None => std::env::remove_var("WEZTERM_CONFIG_FILE"),@@ -1136,6 +1156,8 @@ impl Config {}let _env_restore = EnvRestore {+ thinkterm_config_file: std::env::var_os("THINKTERM_CONFIG_FILE"),+ thinkterm_config_dir: std::env::var_os("THINKTERM_CONFIG_DIR"),config_file: std::env::var_os("WEZTERM_CONFIG_FILE"),config_dir: std::env::var_os("WEZTERM_CONFIG_DIR"),};@@ -1208,8 +1230,10 @@ impl Config {// problems earlier than we use them.let _ = cfg.key_bindings();+ std::env::set_var("THINKTERM_CONFIG_FILE", p);std::env::set_var("WEZTERM_CONFIG_FILE", p);if let Some(dir) = p.parent() {+ std::env::set_var("THINKTERM_CONFIG_DIR", dir);std::env::set_var("WEZTERM_CONFIG_DIR", dir);}Ok((cfg, raw_keys))@@ -1697,7 +1721,9 @@ impl Config {if !wsl_env.is_empty() {wsl_env.push(':');}- wsl_env.push_str("TERM:COLORTERM:TERM_PROGRAM:TERM_PROGRAM_VERSION");+ wsl_env.push_str(+ "TERM:COLORTERM:TERM_PROGRAM:TERM_PROGRAM_VERSION:THINKTERM:THINKTERM_VERSION",+ );cmd.env("WSLENV", wsl_env);}@@ -1706,9 +1732,13 @@ impl Config {cmd.env("TERM", &self.term);cmd.env("COLORTERM", "truecolor");// TERM_PROGRAM and TERM_PROGRAM_VERSION are an emerging- // de-facto standard for identifying the terminal.+ // de-facto standard for terminal capability detection. Keep the+ // WezTerm identity for compatibility with third-party tools; use the+ // THINKTERM variables below for ThinkTerm-specific detection.cmd.env("TERM_PROGRAM", "WezTerm");cmd.env("TERM_PROGRAM_VERSION", crate::wezterm_version());+ cmd.env("THINKTERM", "1");+ cmd.env("THINKTERM_VERSION", crate::wezterm_version());}}@@ -1846,33 +1876,91 @@ fn default_font_size() -> f64 {}pub(crate) fn compute_cache_dir() -> anyhow::Result<PathBuf> {- if let Some(runtime) = dirs_next::cache_dir() {- return Ok(runtime.join("wezterm"));+ if let Some(cache) = dirs_next::cache_dir() {+ return Ok(cache.join(PRODUCT_DIR_NAME));}- Ok(crate::HOME_DIR.join(".local/share/wezterm"))+ Ok(crate::HOME_DIR.join(".local/share").join(PRODUCT_DIR_NAME))}pub(crate) fn compute_data_dir() -> anyhow::Result<PathBuf> {- if let Some(runtime) = dirs_next::data_dir() {- return Ok(runtime.join("wezterm"));- }+ let base = dirs_next::data_dir().unwrap_or_else(|| crate::HOME_DIR.join(".local/share"));+ let data_dir = base.join(PRODUCT_DIR_NAME);+ migrate_legacy_data_dir(&base, &data_dir);- Ok(crate::HOME_DIR.join(".local/share/wezterm"))+ Ok(data_dir)}pub(crate) fn compute_runtime_dir() -> anyhow::Result<PathBuf> {if let Some(runtime) = dirs_next::runtime_dir() {- return Ok(runtime.join("wezterm"));+ return Ok(runtime.join(PRODUCT_DIR_NAME));}- Ok(crate::HOME_DIR.join(".local/share/wezterm"))+ Ok(crate::HOME_DIR.join(".local/share").join(PRODUCT_DIR_NAME))}pub fn pki_dir() -> anyhow::Result<PathBuf> {compute_runtime_dir().map(|d| d.join("pki"))}+fn active_thinkterm_config_candidates(home: &Path) -> Vec<PathBuf> {+ vec![+ home.join(".config")+ .join(PRODUCT_DIR_NAME)+ .join("thinkterm.lua"),+ home.join(".config")+ .join(PRODUCT_DIR_NAME)+ .join("wezterm.lua"),+ home.join(".thinkterm.lua"),+ ]+}++fn migrate_legacy_data_dir(base: &Path, data_dir: &Path) {+ let legacy_dir = base.join(LEGACY_PRODUCT_DIR_NAME);+ if !legacy_dir.exists() {+ return;+ }++ if let Err(err) = crate::create_user_owned_dirs(data_dir) {+ log::warn!(+ "failed to create ThinkTerm data dir {} for legacy migration: {err:#}",+ data_dir.display()+ );+ return;+ }++ for item in DURABLE_LEGACY_DATA_ITEMS {+ let from = legacy_dir.join(item);+ let to = data_dir.join(item);+ if !from.exists() || to.exists() {+ continue;+ }+ if let Err(err) = copy_legacy_data_item(&from, &to) {+ log::warn!(+ "failed to migrate legacy WezTerm data item {}: {err:#}",+ from.display()+ );+ }+ }+}++fn copy_legacy_data_item(from: &Path, to: &Path) -> anyhow::Result<()> {+ let meta = std::fs::symlink_metadata(from)?;+ if meta.is_file() {+ if let Some(parent) = to.parent() {+ crate::create_user_owned_dirs(parent)?;+ }+ std::fs::copy(from, to)?;+ } else if meta.is_dir() {+ crate::create_user_owned_dirs(to)?;+ for entry in std::fs::read_dir(from)? {+ let entry = entry?;+ copy_legacy_data_item(&entry.path(), &to.join(entry.file_name()))?;+ }+ }+ Ok(())+}+pub fn default_read_timeout() -> Duration {Duration::from_secs(60)}@@ -2304,9 +2392,17 @@ fn default_colr_rasterizer() -> FontRasterizerSelection {#[cfg(test)]mod tests {- use super::{Config, HOME_DIR};+ use super::{+ active_thinkterm_config_candidates, copy_legacy_data_item, migrate_legacy_data_dir, Config,+ HOME_DIR, LEGACY_PRODUCT_DIR_NAME, PRODUCT_DIR_NAME,+ };+ use std::sync::Mutex;++ static ENV_LOCK: Mutex<()> = Mutex::new(());struct EnvGuard {+ thinkterm_config_file: Option<std::ffi::OsString>,+ thinkterm_config_dir: Option<std::ffi::OsString>,config_file: Option<std::ffi::OsString>,config_dir: Option<std::ffi::OsString>,}@@ -2314,6 +2410,8 @@ mod tests {impl EnvGuard {fn new() -> Self {Self {+ thinkterm_config_file: std::env::var_os("THINKTERM_CONFIG_FILE"),+ thinkterm_config_dir: std::env::var_os("THINKTERM_CONFIG_DIR"),config_file: std::env::var_os("WEZTERM_CONFIG_FILE"),config_dir: std::env::var_os("WEZTERM_CONFIG_DIR"),}@@ -2322,6 +2420,14 @@ mod tests {impl Drop for EnvGuard {fn drop(&mut self) {+ match self.thinkterm_config_file.take() {+ Some(value) => std::env::set_var("THINKTERM_CONFIG_FILE", value),+ None => std::env::remove_var("THINKTERM_CONFIG_FILE"),+ }+ match self.thinkterm_config_dir.take() {+ Some(value) => std::env::set_var("THINKTERM_CONFIG_DIR", value),+ None => std::env::remove_var("THINKTERM_CONFIG_DIR"),+ }match self.config_file.take() {Some(value) => std::env::set_var("WEZTERM_CONFIG_FILE", value),None => std::env::remove_var("WEZTERM_CONFIG_FILE"),@@ -2340,7 +2446,10 @@ mod tests {#[test]fn import_loader_restores_env_and_collects_raw_keys() {+ let _env_lock = ENV_LOCK.lock().unwrap();let _guard = EnvGuard::new();+ std::env::set_var("THINKTERM_CONFIG_FILE", "/tmp/original-thinkterm.lua");+ std::env::set_var("THINKTERM_CONFIG_DIR", "/tmp/original-thinkterm-dir");std::env::set_var("WEZTERM_CONFIG_FILE", "/tmp/original-wezterm.lua");std::env::set_var("WEZTERM_CONFIG_DIR", "/tmp/original-wezterm-dir");@@ -2362,6 +2471,14 @@ return configassert_eq!(imported.config.font_size, 17.5);assert!(imported.raw_keys.contains("font_size"));assert!(imported.raw_keys.contains("color_scheme"));+ assert_eq!(+ std::env::var_os("THINKTERM_CONFIG_FILE").as_deref(),+ Some(std::ffi::OsStr::new("/tmp/original-thinkterm.lua"))+ );+ assert_eq!(+ std::env::var_os("THINKTERM_CONFIG_DIR").as_deref(),+ Some(std::ffi::OsStr::new("/tmp/original-thinkterm-dir"))+ );assert_eq!(std::env::var_os("WEZTERM_CONFIG_FILE").as_deref(),Some(std::ffi::OsStr::new("/tmp/original-wezterm.lua"))@@ -2371,4 +2488,148 @@ return configSome(std::ffi::OsStr::new("/tmp/original-wezterm-dir")));}++ fn write_test_config(path: &std::path::Path, font_size: f64) {+ std::fs::write(+ path,+ format!(+ r#"+local wezterm = require "wezterm"+local config = wezterm.config_builder and wezterm.config_builder() or {{}}+config.font_size = {font_size}+return config+"#+ ),+ )+ .unwrap();+ }++ #[test]+ fn thinkterm_config_env_takes_precedence_over_legacy_env() {+ let _env_lock = ENV_LOCK.lock().unwrap();+ let _guard = EnvGuard::new();+ let dir = tempfile::tempdir().unwrap();+ let thinkterm = dir.path().join("thinkterm.lua");+ let wezterm = dir.path().join("wezterm.lua");+ write_test_config(&thinkterm, 18.0);+ write_test_config(&wezterm, 9.0);++ std::env::set_var("THINKTERM_CONFIG_FILE", &thinkterm);+ std::env::remove_var("THINKTERM_CONFIG_DIR");+ std::env::set_var("WEZTERM_CONFIG_FILE", &wezterm);+ std::env::remove_var("WEZTERM_CONFIG_DIR");++ let loaded = Config::load_with_overrides(&wezterm_dynamic::Value::default());+ assert_eq!(loaded.config.unwrap().font_size, 18.0);+ assert_eq!(+ std::env::var_os("THINKTERM_CONFIG_FILE").as_deref(),+ Some(thinkterm.as_os_str())+ );+ assert_eq!(+ std::env::var_os("WEZTERM_CONFIG_FILE").as_deref(),+ Some(thinkterm.as_os_str())+ );+ }++ #[test]+ fn active_config_candidates_do_not_auto_load_upstream_wezterm_configs() {+ let home = std::path::Path::new("/home/example");+ let paths = active_thinkterm_config_candidates(home);++ assert_eq!(+ paths,+ vec![+ home.join(".config").join("thinkterm").join("thinkterm.lua"),+ home.join(".config").join("thinkterm").join("wezterm.lua"),+ home.join(".thinkterm.lua"),+ ]+ );+ assert!(!paths+ .iter()+ .any(|path| path == &home.join(".config").join("wezterm").join("wezterm.lua")));+ assert!(!paths.iter().any(|path| path == &home.join(".wezterm.lua")));+ }++ #[test]+ fn terminal_identity_preserves_wezterm_capabilities_and_adds_thinkterm_markers() {+ let config = Config::default();+ let mut cmd = portable_pty::CommandBuilder::new("sh");+ config.apply_cmd_defaults(&mut cmd, None, None);++ assert_eq!(+ cmd.get_env("TERM_PROGRAM").as_deref(),+ Some(std::ffi::OsStr::new("WezTerm"))+ );+ assert_eq!(+ cmd.get_env("THINKTERM").as_deref(),+ Some(std::ffi::OsStr::new("1"))+ );+ assert_eq!(+ cmd.get_env("THINKTERM_VERSION"),+ cmd.get_env("TERM_PROGRAM_VERSION")+ );+ }++ #[test]+ fn legacy_data_migration_only_copies_durable_items() {+ let dir = tempfile::tempdir().unwrap();+ let legacy = dir.path().join(LEGACY_PRODUCT_DIR_NAME);+ let next = dir.path().join(PRODUCT_DIR_NAME);+ std::fs::create_dir_all(legacy.join("plugins/example/plugin")).unwrap();+ std::fs::write(legacy.join("plugins/example/plugin/init.lua"), "return {}").unwrap();+ std::fs::write(legacy.join("recent-commands.json"), "[]").unwrap();+ std::fs::write(legacy.join("recent-emoji.json"), "[]").unwrap();+ std::fs::write(legacy.join("repl-history"), "help()").unwrap();+ std::fs::write(legacy.join("check_update"), "{}").unwrap();+ std::fs::write(legacy.join("gui-sock-1"), "").unwrap();++ migrate_legacy_data_dir(dir.path(), &next);++ assert!(next.join("plugins/example/plugin/init.lua").exists());+ assert_eq!(+ std::fs::read_to_string(next.join("recent-commands.json")).unwrap(),+ "[]"+ );+ assert!(next.join("recent-emoji.json").exists());+ assert!(next.join("repl-history").exists());+ assert!(!next.join("check_update").exists());+ assert!(!next.join("gui-sock-1").exists());+ }++ #[test]+ fn legacy_data_migration_does_not_modify_existing_data_dir() {+ let dir = tempfile::tempdir().unwrap();+ let legacy = dir.path().join(LEGACY_PRODUCT_DIR_NAME);+ let next = dir.path().join(PRODUCT_DIR_NAME);+ std::fs::create_dir_all(&legacy).unwrap();+ std::fs::create_dir_all(&next).unwrap();+ std::fs::write(legacy.join("recent-commands.json"), "[\"legacy\"]").unwrap();+ std::fs::write(legacy.join("recent-emoji.json"), "[\"emoji\"]").unwrap();+ std::fs::write(next.join("recent-commands.json"), "[\"new\"]").unwrap();++ migrate_legacy_data_dir(dir.path(), &next);++ assert_eq!(+ std::fs::read_to_string(next.join("recent-commands.json")).unwrap(),+ "[\"new\"]"+ );+ assert_eq!(+ std::fs::read_to_string(next.join("recent-emoji.json")).unwrap(),+ "[\"emoji\"]"+ );+ }++ #[test]+ fn legacy_data_copy_skips_symlinks() {+ let dir = tempfile::tempdir().unwrap();+ let from = dir.path().join("from");+ let to = dir.path().join("to");++ #[cfg(unix)]+ {+ std::os::unix::fs::symlink("/tmp/target", &from).unwrap();+ copy_legacy_data_item(&from, &to).unwrap();+ assert!(!to.exists());+ }+ }}diff --git a/config/src/lib.rs b/config/src/lib.rsindex 2d5f6582..72c9713a 100644--- a/config/src/lib.rs+++ b/config/src/lib.rs@@ -382,20 +382,24 @@ pub fn create_user_owned_dirs(p: &Path) -> anyhow::Result<()> {Ok(())}-fn xdg_config_home() -> PathBuf {- match std::env::var_os("XDG_CONFIG_HOME").map(|s| PathBuf::from(s).join("wezterm")) {+fn xdg_config_home(product_dir: &str) -> PathBuf {+ match std::env::var_os("XDG_CONFIG_HOME").map(|s| PathBuf::from(s).join(product_dir)) {Some(p) => p,- None => HOME_DIR.join(".config").join("wezterm"),+ None => HOME_DIR.join(".config").join(product_dir),}}fn config_dirs() -> Vec<PathBuf> {let mut dirs = Vec::new();- dirs.push(xdg_config_home());+ dirs.push(xdg_config_home("thinkterm"));+ dirs.push(xdg_config_home("wezterm"));#[cfg(unix)]if let Some(d) = std::env::var_os("XDG_CONFIG_DIRS") {- dirs.extend(std::env::split_paths(&d).map(|s| PathBuf::from(s).join("wezterm")));+ for base in std::env::split_paths(&d) {+ dirs.push(base.join("thinkterm"));+ dirs.push(base.join("wezterm"));+ }}dirsdiff --git a/config/src/lua.rs b/config/src/lua.rsindex 0749063f..ecb2d883 100644--- a/config/src/lua.rs+++ b/config/src/lua.rs@@ -229,7 +229,9 @@ pub fn make_lua_context(config_file: &Path) -> anyhow::Result<Lua> {prefix_path(&mut path_array, config_dir);prefix_path(&mut path_array, &crate::HOME_DIR.join(".wezterm"));- for dir in crate::CONFIG_DIRS.iter() {+ // prefix_path inserts at the front, so walk backwards to preserve+ // CONFIG_DIRS precedence.+ for dir in crate::CONFIG_DIRS.iter().rev() {prefix_path(&mut path_array, dir);}path_array.insert(diff --git a/config/src/ssh.rs b/config/src/ssh.rsindex f1cac1a9..d8f2c00a 100644--- a/config/src/ssh.rs+++ b/config/src/ssh.rs@@ -81,7 +81,7 @@ pub struct SshDomain {#[dynamic(default)]pub overlay_lag_indicator: bool,- /// The path to the wezterm binary on the remote host+ /// The path to a compatible ThinkTerm/WezTerm mux binary on the remote hostpub remote_wezterm_path: Option<String>,/// Override the entire `wezterm cli proxy` invocation that would otherwise/// be computed from remote_wezterm_path and other information.@@ -91,7 +91,7 @@ pub struct SshDomain {/// If false, then don't use a multiplexer connection,/// just connect directly using ssh. This doesn't require- /// that the remote host have wezterm installed, and is equivalent+ /// that the remote host have a compatible mux binary installed, and is equivalent/// to using `wezterm ssh` to connect.#[dynamic(default)]pub multiplexing: SshMultiplexing,diff --git a/config/src/tls.rs b/config/src/tls.rsindex 2c9adf57..e97ffced 100644--- a/config/src/tls.rs+++ b/config/src/tls.rs@@ -85,7 +85,7 @@ pub struct TlsDomainClient {#[dynamic(default = "default_local_echo_threshold_ms")]pub local_echo_threshold_ms: Option<u64>,- /// The path to the wezterm binary on the remote host+ /// The path to a compatible ThinkTerm/WezTerm mux binary on the remote hostpub remote_wezterm_path: Option<String>,/// Show time since last response when waiting for a response.diff --git a/env-bootstrap/src/lib.rs b/env-bootstrap/src/lib.rsindex 490f54e9..b9226fc8 100644--- a/env-bootstrap/src/lib.rs+++ b/env-bootstrap/src/lib.rs@@ -82,10 +82,12 @@ pub fn fixup_appimage() {}/// Our config stuff exports these env vars to help portable apps locate- /// the correct environment when it is launched via wezterm.- /// However, if we are using the system wezterm to spawn a portable+ /// the correct environment when it is launched via ThinkTerm.+ /// However, if we are using the system ThinkTerm to spawn a portable/// AppImage then we want these to not take effect.- fn clean_wezterm_config_env() {+ fn clean_thinkterm_config_env() {+ std::env::remove_var("THINKTERM_CONFIG_FILE");+ std::env::remove_var("THINKTERM_CONFIG_DIR");std::env::remove_var("WEZTERM_CONFIG_FILE");std::env::remove_var("WEZTERM_CONFIG_DIR");}@@ -97,7 +99,7 @@ pub fn fixup_appimage() {"HOME",dirs_next::home_dir().expect("can't resolve HOME dir"),);- clean_wezterm_config_env();+ clean_thinkterm_config_env();}if std::env::var("XDG_CONFIG_HOME")@@ -107,7 +109,7 @@ pub fn fixup_appimage() {.unwrap_or_default(){std::env::remove_var("XDG_CONFIG_HOME");- clean_wezterm_config_env();+ clean_thinkterm_config_env();}}}diff --git a/mux/src/domain.rs b/mux/src/domain.rsindex 32666039..ccc4f366 100644--- a/mux/src/domain.rs+++ b/mux/src/domain.rs@@ -613,7 +613,7 @@ impl Domain for LocalDomain {let mut terminal = wezterm_term::Terminal::new(size,std::sync::Arc::new(config::TermConfig::new()),- "WezTerm",+ "ThinkTerm",config::wezterm_version(),Box::new(writer.clone()),);diff --git a/mux/src/lib.rs b/mux/src/lib.rsindex 00ef3247..f3bf4a1a 100644--- a/mux/src/lib.rs+++ b/mux/src/lib.rs@@ -301,7 +301,7 @@ fn read_from_pane_pty(localpane::emit_output_for_pane(pane_id,&format!(- "⚠️ wezterm: read_from_pane_pty: \+ "⚠️ ThinkTerm: read_from_pane_pty: \Unable to allocate a socketpair: {err:#}"),);diff --git a/mux/src/localpane.rs b/mux/src/localpane.rsindex 51cdbcc0..1313f5bd 100644--- a/mux/src/localpane.rs+++ b/mux/src/localpane.rs@@ -466,7 +466,7 @@ impl Pane for LocalPane {let title = self.terminal.lock().get_title().to_string();// If the title is the default pane title, then try to spice// things up a bit by returning the process basename instead- if title == "wezterm" {+ if title == "thinkterm" {if let Some(proc_name) = self.get_foreground_process_name(CachePolicy::AllowStale) {let proc_name = std::path::Path::new(&proc_name);if let Some(name) = proc_name.file_name() {diff --git a/mux/src/ssh.rs b/mux/src/ssh.rsindex c5b0fb6e..07ebd97d 100644--- a/mux/src/ssh.rs+++ b/mux/src/ssh.rs@@ -879,7 +879,7 @@ impl Domain for RemoteSshDomain {let terminal = wezterm_term::Terminal::new(size,std::sync::Arc::new(config::TermConfig::new()),- "WezTerm",+ "ThinkTerm",config::wezterm_version(),Box::new(writer.clone()),);diff --git a/mux/src/ssh_agent.rs b/mux/src/ssh_agent.rsindex aea64898..6a00166c 100644--- a/mux/src/ssh_agent.rs+++ b/mux/src/ssh_agent.rs@@ -84,6 +84,13 @@ impl AgentProxy {let pid = unsafe { libc::getpid() };let sock_path = config::RUNTIME_DIR.join(format!("agent.{pid}"));+ if let Err(err) = config::create_user_owned_dirs(&*config::RUNTIME_DIR) {+ log::error!(+ "failed to create runtime dir {:?} for SSH agent socket: {err:#}",+ &*config::RUNTIME_DIR+ );+ }+if let Some(inherited) = Self::default_ssh_auth_sock() {if let Err(err) = update_symlink(&inherited, &sock_path) {log::error!("failed to set {sock_path:?} to initial inherited SSH_AUTH_SOCK value of {inherited:?}: {err:#}");diff --git a/mux/src/termwiztermtab.rs b/mux/src/termwiztermtab.rsindex 5e3c7192..80b06e10 100644--- a/mux/src/termwiztermtab.rs+++ b/mux/src/termwiztermtab.rs@@ -108,7 +108,7 @@ impl TermWizTerminalPane {let terminal = Mutex::new(wezterm_term::Terminal::new(size,term_config.unwrap_or_else(|| Arc::new(config::TermConfig::new())),- "WezTerm",+ "ThinkTerm",config::wezterm_version(),Box::new(Vec::new()), // FIXME: connect to something?));diff --git a/mux/src/tmux_commands.rs b/mux/src/tmux_commands.rsindex 37d9cba8..c307613c 100644--- a/mux/src/tmux_commands.rs+++ b/mux/src/tmux_commands.rs@@ -214,7 +214,7 @@ impl TmuxDomainState {let terminal = wezterm_term::Terminal::new(size,std::sync::Arc::new(config::TermConfig::new()),- "WezTerm",+ "ThinkTerm",config::wezterm_version(),Box::new(writer.clone()),);diff --git a/nix/flake.nix b/nix/flake.nixindex f4c03b9e..76dd8c0c 100644--- a/nix/flake.nix+++ b/nix/flake.nix@@ -158,9 +158,9 @@mkdir -p $out/nix-supportecho "${passthru.terminfo}" >> $out/nix-support/propagated-user-env-packages- install -Dm644 assets/icon/terminal.png $out/share/icons/hicolor/128x128/apps/org.wezfurlong.wezterm.png- install -Dm644 assets/wezterm.desktop $out/share/applications/org.wezfurlong.wezterm.desktop- install -Dm644 assets/wezterm.appdata.xml $out/share/metainfo/org.wezfurlong.wezterm.appdata.xml+ install -Dm644 assets/icon/terminal.png $out/share/icons/hicolor/128x128/apps/com.roversx.thinkterm.png+ install -Dm644 assets/wezterm.desktop $out/share/applications/com.roversx.thinkterm.desktop+ install -Dm644 assets/wezterm.appdata.xml $out/share/metainfo/com.roversx.thinkterm.appdata.xmlinstall -Dm644 assets/shell-integration/wezterm.sh -t $out/etc/profile.dinstallShellCompletion --cmd wezterm \diff --git a/term/src/terminalstate/mod.rs b/term/src/terminalstate/mod.rsindex ac2a6022..83c67f79 100644--- a/term/src/terminalstate/mod.rs+++ b/term/src/terminalstate/mod.rs@@ -552,7 +552,7 @@ impl TerminalState {newline_mode: false,current_mouse_buttons: vec![],tabs: TabStop::new(size.cols, 8),- title: "wezterm".to_string(),+ title: "thinkterm".to_string(),icon_title: None,palette: None,pixel_height: size.pixel_height,diff --git a/term/src/test/mod.rs b/term/src/test/mod.rsindex d8a655a0..2edf634c 100644--- a/term/src/test/mod.rs+++ b/term/src/test/mod.rs@@ -72,7 +72,7 @@ impl TestTerm {dpi: 0,},Arc::new(TestTermConfig { scrollback }),- "WezTerm",+ "ThinkTerm","O_o",Box::new(Vec::new()),);diff --git a/termwiz/src/caps/mod.rs b/termwiz/src/caps/mod.rsindex c9b94e8d..b8bd6e07 100644--- a/termwiz/src/caps/mod.rs+++ b/termwiz/src/caps/mod.rs@@ -302,7 +302,7 @@ impl Capabilities {"2.9.20150512",)}- Some("WezTerm") => true,+ Some("WezTerm" | "ThinkTerm") => true,_ => false,}});@@ -559,5 +559,11 @@ mod test {).unwrap();assert_eq!(caps.iterm2_image(), true);++ let caps = Capabilities::new_with_hints(+ ProbeHints::default().term_program(Some("ThinkTerm".into())),+ )+ .unwrap();+ assert_eq!(caps.iterm2_image(), true);}}diff --git a/wezterm-client/src/client.rs b/wezterm-client/src/client.rsindex 9dc24206..c84eff00 100644--- a/wezterm-client/src/client.rs+++ b/wezterm-client/src/client.rs@@ -63,7 +63,7 @@ pub struct Client {#[derive(Error, Debug, Clone, PartialEq, Eq)]#[error(- "Please install the same version of wezterm on both the client and server!\n\+ "Please install a compatible ThinkTerm/WezTerm remote mux binary on the server!\n\The server version is {} (codec version {}),\n\which is not compatible with our version \n\{} (codec version {}).",@@ -660,18 +660,21 @@ impl Reconnectable {}}- /// Resolve the path to wezterm for the remote system.+ /// Build a command that runs a compatible mux binary on the remote system./// We can't simply derive this from the current executable because/// we are being asked to produce a path for the remote system and/// we don't really know anything about it./// `path` comes from the SshDoman::remote_wezterm_path option; if set/// then the user has told us where to look.- /// Otherwise, we have to rely on the `PATH` environment for the remote- /// system, and we don't know if it is even running unix, or whether- /// any given shell syntax will help us provide a more meaningful- /// message to the user.- fn wezterm_bin_path(path: &Option<String>) -> String {- path.as_deref().unwrap_or("wezterm").to_string()+ /// Otherwise, use `wezterm` for compatibility with existing remote hosts.+ /// This string is passed directly to SSH exec, so avoid shell-specific+ /// fallback logic here; users can set remote_wezterm_path or+ /// override_proxy_command when their remote binary has another name.+ fn remote_mux_command(path: &Option<String>, args: &str) -> String {+ match path {+ Some(path) => format!("{path} {args}"),+ None => format!("wezterm {args}"),+ }}fn ssh_connect(@@ -683,14 +686,15 @@ impl Reconnectable {let ssh_config = mux::ssh::ssh_domain_to_ssh_config(&ssh_dom)?;let sess = ssh_connect_with_ui(ssh_config, ui)?;- let proxy_bin = Self::wezterm_bin_path(&ssh_dom.remote_wezterm_path);-let cmd = if let Some(cmd) = ssh_dom.override_proxy_command.clone() {cmd} else if initial {- format!("{} cli --prefer-mux proxy", proxy_bin)+ Self::remote_mux_command(&ssh_dom.remote_wezterm_path, "cli --prefer-mux proxy")} else {- format!("{} cli --prefer-mux --no-auto-start proxy", proxy_bin)+ Self::remote_mux_command(+ &ssh_dom.remote_wezterm_path,+ "cli --prefer-mux --no-auto-start proxy",+ )};ui.output_str(&format!("Running: {}\n", cmd));log::debug!("going to run {}", cmd);@@ -882,10 +886,8 @@ impl Reconnectable {let creds = ui.run_and_log_error(|| {// The `tlscreds` command will start the server if needed and then// obtain client credentials that we can use for tls.- let cmd = format!(- "{} cli tlscreds",- Self::wezterm_bin_path(&tls_client.remote_wezterm_path)- );+ let cmd =+ Self::remote_mux_command(&tls_client.remote_wezterm_path, "cli tlscreds");ui.output_str(&format!("Running: {}\n", cmd));let mut exec = smol::block_on(sess.exec(&cmd, None))@@ -1073,7 +1075,7 @@ impl Client {}let mut ui = ConnectionUI::new();- ui.title("wezterm: Reconnecting...");+ ui.title("ThinkTerm: Reconnecting...");loop {ui.sleep_with_reason(@@ -1199,8 +1201,8 @@ impl Client {.to_string()} else {format!(- "Please install the same version of wezterm on both \- the client and server! \+ "Please install a compatible ThinkTerm/WezTerm remote mux binary \+ on the server! \The server reported error '{err}' while being asked for its \version. This likely means that the server is older \than the client, but it could also happen if the remote \@@ -1390,3 +1392,27 @@ impl Client {);rpc!(adjust_pane_size, AdjustPaneSize, UnitResponse);}++#[cfg(test)]+mod tests {+ use super::Reconnectable;++ #[test]+ fn remote_mux_command_uses_configured_path() {+ assert_eq!(+ Reconnectable::remote_mux_command(+ &Some("/opt/bin/wezterm".to_string()),+ "cli tlscreds"+ ),+ "/opt/bin/wezterm cli tlscreds"+ );+ }++ #[test]+ fn remote_mux_command_defaults_to_wezterm_without_shell_fallback() {+ assert_eq!(+ Reconnectable::remote_mux_command(&None, "cli --prefer-mux proxy"),+ "wezterm cli --prefer-mux proxy"+ );+ }+}diff --git a/wezterm-client/src/domain.rs b/wezterm-client/src/domain.rsindex 75709263..835baaa5 100644--- a/wezterm-client/src/domain.rs+++ b/wezterm-client/src/domain.rs@@ -846,7 +846,7 @@ impl Domain for ClientDomain {result.tab_id,result.pane_id,size,- "wezterm",+ "thinkterm",));let tab = Arc::new(Tab::new(&size));tab.assign_pane(&pane);@@ -908,7 +908,7 @@ impl Domain for ClientDomain {result.tab_id,result.pane_id,result.size,- "wezterm",+ "thinkterm",));let pane_index = match tab@@ -942,7 +942,7 @@ impl Domain for ClientDomain {window_id,..Default::default()});- ui.title("wezterm: Connecting...");+ ui.title("ThinkTerm: Connecting...");ui.async_run_and_log_error({let ui = ui.clone();diff --git a/wezterm-client/src/pane/renderable.rs b/wezterm-client/src/pane/renderable.rsindex 68fa518f..6767552e 100644--- a/wezterm-client/src/pane/renderable.rs+++ b/wezterm-client/src/pane/renderable.rs@@ -764,7 +764,7 @@ impl RenderableState {if inner.client.overlay_lag_indicator && idx == inner.dimensions.physical_top {if inner.is_tardy() {let status = format!(- "wezterm: {:.0?}⏳since last response",+ "ThinkTerm: {:.0?}⏳since last response",inner.last_recv_time.elapsed());// Right align it in the tabdiff --git a/wezterm-gui/src/commands.rs b/wezterm-gui/src/commands.rsindex a0e151c8..45c92d0f 100644--- a/wezterm-gui/src/commands.rs+++ b/wezterm-gui/src/commands.rs@@ -1825,25 +1825,25 @@ pub fn derive_command_from_key_assignment(action: &KeyAssignment) -> Option<Commicon: Some("md_pipe_disconnected"),},OpenUri(uri) => match uri.as_ref() {- "https://wezterm.org/" => CommandDef {+ "https://github.com/RoversX/thinkterm" => CommandDef {brief: "Documentation".into(),- doc: "Visit the wezterm documentation website".into(),+ doc: "Visit the ThinkTerm project page".into(),keys: vec![],args: &[],menubar: &["Help"],icon: Some("md_help"),},- "https://github.com/wezterm/wezterm/discussions/" => CommandDef {+ "https://github.com/RoversX/thinkterm/discussions/" => CommandDef {brief: "Discuss on GitHub".into(),- doc: "Visit wezterm's GitHub discussion".into(),+ doc: "Visit ThinkTerm's GitHub discussions".into(),keys: vec![],args: &[],menubar: &["Help"],icon: Some("oct_comment_discussion"),},- "https://github.com/wezterm/wezterm/issues/" => CommandDef {+ "https://github.com/RoversX/thinkterm/issues/" => CommandDef {brief: "Search or report issue on GitHub".into(),- doc: "Visit wezterm's GitHub issues".into(),+ doc: "Visit ThinkTerm's GitHub issues".into(),keys: vec![],args: &[],menubar: &["Help"],@@ -2293,9 +2293,9 @@ fn compute_default_actions() -> Vec<KeyAssignment> {ShowLauncher,ShowTabNavigator,// ----------------- Help- OpenUri("https://wezterm.org/".to_string()),- OpenUri("https://github.com/wezterm/wezterm/discussions/".to_string()),- OpenUri("https://github.com/wezterm/wezterm/issues/".to_string()),+ OpenUri("https://github.com/RoversX/thinkterm".to_string()),+ OpenUri("https://github.com/RoversX/thinkterm/discussions/".to_string()),+ OpenUri("https://github.com/RoversX/thinkterm/issues/".to_string()),ShowDebugOverlay,// ----------------- MiscOpenLinkAtMouseCursor,diff --git a/wezterm-gui/src/main.rs b/wezterm-gui/src/main.rsindex 424a026e..dfee0ec7 100644--- a/wezterm-gui/src/main.rs+++ b/wezterm-gui/src/main.rs@@ -82,7 +82,7 @@ pub use termwindow::{set_window_class, set_window_position, TermWindow, ICON_DATversion = config::wezterm_version())]struct Opt {- /// Skip loading wezterm.lua+ /// Skip loading the ThinkTerm configuration#[arg(long, short = 'n')]skip_config: bool,@@ -421,6 +421,9 @@ async fn async_run_terminal_gui(opts: StartCommand,should_publish: bool,) -> anyhow::Result<()> {+ config::create_user_owned_dirs(&*config::RUNTIME_DIR)?;+ config::create_user_owned_dirs(&*config::CACHE_DIR)?;+let unix_socket_path =config::RUNTIME_DIR.join(format!("gui-sock-{}", unsafe { libc::getpid() }));std::env::set_var("WEZTERM_UNIX_SOCKET", unix_socket_path.clone());@@ -571,9 +574,10 @@ impl Publish {anyhow::bail!("Running GUI is a different executable from us, will start a new one");}- if vers.config_file_path- != std::env::var_os("WEZTERM_CONFIG_FILE").map(Into::into)- {+ let config_file_path = std::env::var_os("THINKTERM_CONFIG_FILE")+ .or_else(|| std::env::var_os("WEZTERM_CONFIG_FILE"))+ .map(Into::into);+ if vers.config_file_path != config_file_path {*self = Publish::NoConnectNoPublish;anyhow::bail!("Running GUI has different config from us, will start a new one"@@ -632,8 +636,8 @@ impl Publish {match res {Ok(res) => {log::info!(- "Spawned your command via the existing GUI instance. \- Use wezterm start --always-new-process if you do not want this behavior. \+ "Spawned your command via the existing ThinkTerm GUI instance. \+ Use thinkterm start --always-new-process if you do not want this behavior. \Result={:?}",res);@@ -1188,7 +1192,7 @@ fn run() -> anyhow::Result<()> {{unsafe {::windows::Win32::UI::Shell::SetCurrentProcessExplicitAppUserModelID(- ::windows::core::PCWSTR(wide_string("org.wezfurlong.wezterm").as_ptr()),+ ::windows::core::PCWSTR(wide_string("com.roversx.thinkterm").as_ptr()),).unwrap();}diff --git a/wezterm-gui/src/overlay/confirm_close_pane.rs b/wezterm-gui/src/overlay/confirm_close_pane.rsindex 17d6488b..bc11bc37 100644--- a/wezterm-gui/src/overlay/confirm_close_pane.rs+++ b/wezterm-gui/src/overlay/confirm_close_pane.rs@@ -75,7 +75,7 @@ pub fn confirm_quit_program(window: ::window::Window,tab_id: TabId,) -> anyhow::Result<()> {- if confirm::run_confirmation("🛑 Really Quit WezTerm?", &mut term)? {+ if confirm::run_confirmation("🛑 Really Quit ThinkTerm?", &mut term)? {promise::spawn::spawn_into_main_thread(async move {use ::window::{Connection, ConnectionOps};let con = Connection::get().expect("call on gui thread");diff --git a/wezterm-gui/src/settings_window.rs b/wezterm-gui/src/settings_window.rsindex 574171ef..363594f5 100644--- a/wezterm-gui/src/settings_window.rs+++ b/wezterm-gui/src/settings_window.rs@@ -17,7 +17,7 @@ use anyhow::Context;use config::{configuration, Dimension, GeometryOrigin};use std::cell::RefCell;use std::fs;-use std::path::PathBuf;+use std::path::{Path, PathBuf};use std::process::Command;use std::rc::Rc;use std::time::{Duration, Instant, SystemTime, UNIX_EPOCH};@@ -918,6 +918,56 @@ TOTAL 94.4M 19.3M 19.3M 0K}}+#[cfg(test)]+mod config_candidate_tests {+ use super::*;++ #[test]+ fn wezterm_import_candidates_do_not_search_thinkterm_config_dir() {+ let candidates = SettingsWindow::wezterm_config_candidates();+ let legacy_user_config_dir = std::env::var_os("XDG_CONFIG_HOME")+ .map(|dir| PathBuf::from(dir).join("wezterm"))+ .unwrap_or_else(|| config::HOME_DIR.join(".config").join("wezterm"));+ assert!(candidates.contains(&legacy_user_config_dir.join("wezterm.lua")));+ assert!(!candidates.contains(+ &config::HOME_DIR+ .join(".config")+ .join("thinkterm")+ .join("wezterm.lua")+ ));+ }++ #[test]+ fn thinkterm_import_entry_defaults_to_thinkterm_lua() {+ let dir = tempfile::tempdir().unwrap();+ assert_eq!(+ SettingsWindow::preferred_thinkterm_config_entry(dir.path()),+ dir.path().join("thinkterm.lua")+ );+ }++ #[test]+ fn thinkterm_import_entry_prefers_existing_thinkterm_lua() {+ let dir = tempfile::tempdir().unwrap();+ fs::write(dir.path().join("thinkterm.lua"), "").unwrap();+ fs::write(dir.path().join("wezterm.lua"), "").unwrap();+ assert_eq!(+ SettingsWindow::preferred_thinkterm_config_entry(dir.path()),+ dir.path().join("thinkterm.lua")+ );+ }++ #[test]+ fn thinkterm_import_entry_preserves_legacy_wezterm_lua_without_native_file() {+ let dir = tempfile::tempdir().unwrap();+ fs::write(dir.path().join("wezterm.lua"), "").unwrap();+ assert_eq!(+ SettingsWindow::preferred_thinkterm_config_entry(dir.path()),+ dir.path().join("wezterm.lua")+ );+ }+}+#[derive(Debug, Clone, Copy)]struct ProcessMemoryInfo {resident_size: u64,@@ -3275,7 +3325,7 @@ impl SettingsWindow {row_x,first_row_y + row_step * 2.0,row_width,- "Small ThinkTerm-native state; terminal config stays in ThinkTerm's own wezterm.lua.",+ "Small ThinkTerm-native state; terminal config stays in ThinkTerm's own thinkterm.lua.",true,)?;self.paint_main_renderer_row(layers, row_x, first_row_y + row_step * 3.0, row_width, true)?;@@ -6663,16 +6713,32 @@ impl SettingsWindow {}fn thinkterm_compatible_config_path() -> PathBuf {- config::HOME_DIR- .join(".config")- .join("thinkterm")- .join("wezterm.lua")+ Self::preferred_thinkterm_config_entry(&config::HOME_DIR.join(".config").join("thinkterm"))+ }++ fn preferred_thinkterm_config_entry(config_dir: &Path) -> PathBuf {+ let thinkterm = config_dir.join("thinkterm.lua");+ let legacy = config_dir.join("wezterm.lua");+ if thinkterm.exists() || !legacy.exists() {+ thinkterm+ } else {+ legacy+ }}fn wezterm_config_candidates() -> Vec<PathBuf> {let mut paths = vec![config::HOME_DIR.join(".wezterm.lua")];- for dir in config::CONFIG_DIRS.iter() {- paths.push(dir.join("wezterm.lua"));++ let legacy_user_config_dir = std::env::var_os("XDG_CONFIG_HOME")+ .map(|dir| PathBuf::from(dir).join("wezterm"))+ .unwrap_or_else(|| config::HOME_DIR.join(".config").join("wezterm"));+ paths.push(legacy_user_config_dir.join("wezterm.lua"));++ #[cfg(unix)]+ if let Some(dirs) = std::env::var_os("XDG_CONFIG_DIRS") {+ for base in std::env::split_paths(&dirs) {+ paths.push(base.join("wezterm").join("wezterm.lua"));+ }}paths}diff --git a/wezterm-gui/src/termwindow/mod.rs b/wezterm-gui/src/termwindow/mod.rsindex 1473daf4..2845b298 100644--- a/wezterm-gui/src/termwindow/mod.rs+++ b/wezterm-gui/src/termwindow/mod.rs@@ -1367,7 +1367,7 @@ impl TermWindow {let window = Window::new_window(&get_window_class(),- "wezterm",+ "ThinkTerm",geometry,Some(&config),Rc::clone(&fontconfig),diff --git a/wezterm-gui/src/termwindow/ui/right_sidebar.rs b/wezterm-gui/src/termwindow/ui/right_sidebar.rsindex 61464de2..4a8b081f 100644--- a/wezterm-gui/src/termwindow/ui/right_sidebar.rs+++ b/wezterm-gui/src/termwindow/ui/right_sidebar.rs@@ -45,6 +45,7 @@ const SNIPPET_ROW_GAP: usize = 16;const SNIPPET_LIST_TOP_GAP: usize = 18;const SNIPPET_LIST_BOTTOM_PADDING: usize = 40;const RIGHT_SIDEBAR_SCROLLBAR_VISIBLE_MS: u64 = 900;+const SNIPPET_CARET_WIDTH: f32 = 3.0;#[derive(Debug, Clone, Copy)]pub struct RightSidebarRect {@@ -266,14 +267,15 @@ impl crate::TermWindow {let Some(pane) = self.get_active_pane_or_overlay() else {return;};- if let Err(err) = pane.send_paste(&snippet.body) {- log::error!("failed to paste snippet {id}: {err:#}");- return;- }if run {- if let Err(err) = pane.writer().write_all(b"\r") {+ let Some(buffer) = snippet_run_buffer(&snippet.body) else {+ return;+ };+ if let Err(err) = pane.writer().write_all(&buffer) {log::error!("failed to run snippet {id}: {err:#}");}+ } else if let Err(err) = pane.send_paste(&snippet.body) {+ log::error!("failed to paste snippet {id}: {err:#}");}}@@ -613,6 +615,16 @@ impl crate::TermWindow {.is_some_and(|until| until > Instant::now())}+ fn right_sidebar_snippet_cursor_on(&self) -> bool {+ let blink_ms = (self.config.cursor_blink_rate as u64).max(100);+ self.update_next_frame_time(Some(Instant::now() + Duration::from_millis(blink_ms)));+ let ms = std::time::SystemTime::now()+ .duration_since(std::time::UNIX_EPOCH)+ .map(|d| d.as_millis())+ .unwrap_or(0);+ snippet_cursor_visible(ms, blink_ms)+ }+fn filtered_snippet_count(&self) -> usize {let needle = self.right_sidebar_snippet_search@@ -1710,24 +1722,28 @@ impl crate::TermWindow {let line_height = ui_metrics.cell_size.height as usize + 4;let max_lines = height.saturating_sub(SIDEBAR_INSET * 2).max(1) / line_height.max(1);let mut line_y = y + SIDEBAR_INSET + 2;- let mut last_line = "";+ let text_width = width.saturating_sub((text_x - x) + text_pad);+ let visible_lines = wrap_snippet_text_for_width(text, max_lines.max(1), focused, |s| {+ self.sidebar_text_width(ui_font, s).unwrap_or(f32::MAX) / text_width.max(1) as f32+ });+ let mut last_line = visible_lines.last().map(String::as_str).unwrap_or("");let mut last_line_y = line_y;- for line in text.lines().take(max_lines.max(1)) {+ for line in &visible_lines {last_line = line;last_line_y = line_y;- self.paint_sidebar_text(+ self.paint_ui_title_text(layers,ui_font,- ui_metrics,+ &ui_metrics,line,text_x,line_y,- width.saturating_sub((text_x - x) + text_pad),+ text_width,text_color,)?;line_y += line_height;}- if focused {+ if focused && self.right_sidebar_snippet_cursor_on() {let caret_x = text_x+ (self.sidebar_text_width(ui_font, last_line)?.ceil() as usize).min(width.saturating_sub((text_x - x) + text_pad));@@ -1737,10 +1753,10 @@ impl crate::TermWindow {euclid::rect(caret_x as f32,last_line_y as f32,- 2.0,+ SNIPPET_CARET_WIDTH,(ui_metrics.cell_size.height as f32).max(1.0),),- chrome.selected_bg,+ chrome.text,).context("right sidebar snippet body caret")?;}@@ -1755,7 +1771,7 @@ impl crate::TermWindow {width.saturating_sub((text_x - x) + text_pad),text_color,)?;- if focused {+ if focused && self.right_sidebar_snippet_cursor_on() {let caret_x = text_x+ (self.sidebar_text_width(ui_font, text)?.ceil() as usize).min(width.saturating_sub((text_x - x) + text_pad));@@ -1766,10 +1782,10 @@ impl crate::TermWindow {caret_x as f32,(y + (height.saturating_sub(ui_metrics.cell_size.height as usize)) / 2)as f32,- 2.0,+ SNIPPET_CARET_WIDTH,(ui_metrics.cell_size.height as f32).max(1.0),),- chrome.selected_bg,+ chrome.text,).context("right sidebar snippet text caret")?;}@@ -1924,3 +1940,303 @@ fn snippet_preview(body: &str) -> String {.take(96).collect()}++fn snippet_run_buffer(body: &str) -> Option<Vec<u8>> {+ let normalized = body.replace("\r\n", "\n").replace('\r', "\n");+ let lines: Vec<_> = normalized.split('\n').collect();+ let start = lines.iter().position(|line| !line.trim().is_empty())?;+ let end = lines.iter().rposition(|line| !line.trim().is_empty())?;+ let trimmed = lines[start..=end].join("\n");++ let mut buffer = String::with_capacity(trimmed.len() + 1);+ buffer.push_str(&trimmed);+ buffer.push('\n');+ Some(buffer.replace('\n', "\r").into_bytes())+}++fn wrap_snippet_text_for_width<F>(+ text: &str,+ max_lines: usize,+ focused: bool,+ mut measure: F,+) -> Vec<String>+where+ F: FnMut(&str) -> f32,+{+ let max_lines = max_lines.max(1);+ let mut lines = if focused {+ let tail = bounded_snippet_tail(text, max_lines);+ let budget = max_lines.saturating_mul(16).max(max_lines);+ let mut lines = wrap_snippet_text_from_head(&tail, budget, &mut measure);+ if lines.len() > max_lines {+ lines.split_off(lines.len() - max_lines)+ } else {+ lines+ }+ } else {+ wrap_snippet_text_from_head(text, max_lines, &mut measure)+ };++ if lines.is_empty() {+ lines.push(String::new());+ }+ lines+}++fn wrap_snippet_text_from_head<F>(text: &str, max_lines: usize, measure: &mut F) -> Vec<String>+where+ F: FnMut(&str) -> f32,+{+ let max_lines = max_lines.max(1);+ let mut lines = vec![];+ for hard_line in text.split('\n') {+ wrap_snippet_hard_line(hard_line, measure, &mut lines, max_lines);+ if lines.len() >= max_lines {+ break;+ }+ }+ lines+}++fn wrap_snippet_hard_line<F>(+ line: &str,+ measure: &mut F,+ wrapped: &mut Vec<String>,+ max_lines: usize,+) where+ F: FnMut(&str) -> f32,+{+ if wrapped.len() >= max_lines {+ return;+ }+ if line.is_empty() || measure(line) <= 1.0 {+ wrapped.push(line.to_string());+ return;+ }++ let mut current = String::new();+ for token in whitespace_tokens(line) {+ let token_is_whitespace = token.chars().all(char::is_whitespace);+ if current.is_empty() && token_is_whitespace {+ current.push_str(token);+ continue;+ }++ let candidate = format!("{current}{token}");+ if measure(&candidate) <= 1.0 {+ current = candidate;+ continue;+ }++ if !current.trim().is_empty() {+ wrapped.push(current.trim_end().to_string());+ if wrapped.len() >= max_lines {+ return;+ }+ }+ current.clear();++ let token = if token_is_whitespace {+ ""+ } else {+ token.trim_start()+ };+ if token.is_empty() {+ continue;+ }+ if measure(token) <= 1.0 {+ current.push_str(token);+ } else {+ current = wrap_long_snippet_token(token, measure, wrapped, max_lines);+ if wrapped.len() >= max_lines {+ return;+ }+ }+ }++ if !current.trim().is_empty() && wrapped.len() < max_lines {+ wrapped.push(current.trim_end().to_string());+ }+}++fn bounded_snippet_tail(text: &str, max_lines: usize) -> String {+ const TAIL_CHARS_PER_VISIBLE_LINE: usize = 256;++ let hard_line_limit = max_lines.max(1);+ let char_limit = hard_line_limit.saturating_mul(TAIL_CHARS_PER_VISIBLE_LINE);+ let mut lines = text+ .rsplit('\n')+ .take(hard_line_limit)+ .map(|line| tail_chars(line, char_limit))+ .collect::<Vec<_>>();+ lines.reverse();+ lines.join("\n")+}++fn tail_chars(text: &str, max_chars: usize) -> &str {+ if max_chars == 0 {+ return "";+ }++ let mut seen = 0;+ for (idx, _) in text.char_indices().rev() {+ seen += 1;+ if seen == max_chars {+ return &text[idx..];+ }+ }+ text+}++fn whitespace_tokens(text: &str) -> Vec<&str> {+ let mut tokens = vec![];+ let mut start = 0;+ let mut current_is_whitespace = None;+ for (idx, ch) in text.char_indices() {+ let is_whitespace = ch.is_whitespace();+ match current_is_whitespace {+ Some(kind) if kind != is_whitespace => {+ tokens.push(&text[start..idx]);+ start = idx;+ current_is_whitespace = Some(is_whitespace);+ }+ None => current_is_whitespace = Some(is_whitespace),+ _ => {}+ }+ }+ if start < text.len() {+ tokens.push(&text[start..]);+ }+ tokens+}++fn wrap_long_snippet_token<F>(+ token: &str,+ measure: &mut F,+ wrapped: &mut Vec<String>,+ max_lines: usize,+) -> String+where+ F: FnMut(&str) -> f32,+{+ let mut current = String::new();+ for ch in token.chars() {+ if wrapped.len() >= max_lines {+ return current;+ }+ let mut candidate = current.clone();+ candidate.push(ch);+ if !current.is_empty() && measure(&candidate) > 1.0 {+ wrapped.push(std::mem::take(&mut current));+ if wrapped.len() >= max_lines {+ return String::new();+ }+ current.push(ch);+ } else {+ current = candidate;+ }+ }+ current+}++fn snippet_cursor_visible(now_ms: u128, blink_ms: u64) -> bool {+ let blink_ms = u128::from(blink_ms.max(1));+ (now_ms / blink_ms) % 2 == 0+}++#[cfg(test)]+mod tests {+ use super::{snippet_cursor_visible, snippet_run_buffer, wrap_snippet_text_for_width};++ #[test]+ fn snippet_run_buffer_appends_single_enter() {+ assert_eq!(+ snippet_run_buffer("sudo apt update").unwrap(),+ b"sudo apt update\r"+ );+ }++ #[test]+ fn snippet_run_buffer_trims_outer_blank_lines() {+ assert_eq!(snippet_run_buffer("\n\ncmd\r\n").unwrap(), b"cmd\r");+ }++ #[test]+ fn snippet_run_buffer_preserves_internal_script_lines() {+ assert_eq!(snippet_run_buffer("one\ntwo").unwrap(), b"one\rtwo\r");+ }++ #[test]+ fn snippet_run_buffer_ignores_blank_body() {+ assert!(snippet_run_buffer("\n \r\n\t").is_none());+ }++ #[test]+ fn wrap_snippet_text_wraps_at_word_boundaries() {+ let lines = wrap_snippet_text_for_width("sudo apt update", 8, false, |s| {+ s.chars().count() as f32 / 8.0+ });+ assert_eq!(lines, vec!["sudo apt", "update"]);+ }++ #[test]+ fn wrap_snippet_text_falls_back_to_char_boundaries_for_long_tokens() {+ let lines =+ wrap_snippet_text_for_width("abcdef", 8, false, |s| s.chars().count() as f32 / 3.0);+ assert_eq!(lines, vec!["abc", "def"]);+ }++ #[test]+ fn wrap_snippet_text_preserves_explicit_newlines() {+ let lines = wrap_snippet_text_for_width("one\ntwo", 8, false, |_| 0.5);+ assert_eq!(lines, vec!["one", "two"]);+ }++ #[test]+ fn wrap_snippet_text_shows_tail_when_focused() {+ let lines = wrap_snippet_text_for_width("one\ntwo\nthree", 2, true, |_| 0.5);+ assert_eq!(lines, vec!["two", "three"]);+ }++ #[test]+ fn wrap_snippet_text_shows_head_when_unfocused() {+ let lines = wrap_snippet_text_for_width("one\ntwo\nthree", 2, false, |_| 0.5);+ assert_eq!(lines, vec!["one", "two"]);+ }++ #[test]+ fn wrap_snippet_text_stops_after_visible_unfocused_lines() {+ let text = format!("{}\nshould-not-be-measured", "abcdefghij ".repeat(1000));+ let mut calls = 0;+ let lines = wrap_snippet_text_for_width(&text, 2, false, |s| {+ calls += 1;+ s.chars().count() as f32 / 5.0+ });+ assert_eq!(lines.len(), 2);+ assert!(calls < 100, "measure called {} times", calls);+ }++ #[test]+ fn wrap_snippet_text_focus_uses_bounded_tail_lines() {+ let text = (0..1000)+ .map(|idx| format!("line{idx}"))+ .collect::<Vec<_>>()+ .join("\n");+ let mut calls = 0;+ let lines = wrap_snippet_text_for_width(&text, 2, true, |_| {+ calls += 1;+ 0.5+ });+ assert_eq!(lines, vec!["line998", "line999"]);+ assert!(calls < 20, "measure called {} times", calls);+ }++ #[test]+ fn snippet_cursor_visible_alternates_by_blink_period() {+ assert!(snippet_cursor_visible(0, 500));+ assert!(snippet_cursor_visible(499, 500));+ assert!(!snippet_cursor_visible(500, 500));+ assert!(!snippet_cursor_visible(999, 500));+ assert!(snippet_cursor_visible(1000, 500));+ }+}diff --git a/wezterm-gui/src/update.rs b/wezterm-gui/src/update.rsindex cf6ad5ef..c3f7cad9 100644--- a/wezterm-gui/src/update.rs+++ b/wezterm-gui/src/update.rs@@ -39,10 +39,7 @@ fn get_github_release_info(uri: &str) -> anyhow::Result<Release> {let mut latest = Vec::new();let _res = Request::new(&uri).version(HttpVersion::Http10)- .header(- "User-Agent",- &format!("wezterm/wezterm-{}", wezterm_version()),- )+ .header("User-Agent", &format!("thinkterm/{}", wezterm_version())).send(&mut latest).map_err(|e| anyhow!("failed to query github releases: {}", e))?;@@ -56,12 +53,12 @@ fn get_github_release_info(uri: &str) -> anyhow::Result<Release> {}pub fn get_latest_release_info() -> anyhow::Result<Release> {- get_github_release_info("https://api.github.com/repos/wezterm/wezterm/releases/latest")+ get_github_release_info("https://api.github.com/repos/RoversX/thinkterm/releases/latest")}#[allow(unused)]pub fn get_nightly_release_info() -> anyhow::Result<Release> {- get_github_release_info("https://api.github.com/repos/wezterm/wezterm/releases/tags/nightly")+ get_github_release_info("https://api.github.com/repos/RoversX/thinkterm/releases/tags/nightly")}lazy_static::lazy_static! {@@ -81,7 +78,7 @@ pub fn load_last_release_info_and_set_banner() {};let current = wezterm_version();- let force_ui = std::env::var_os("WEZTERM_ALWAYS_SHOW_UPDATE_UI").is_some();+ let force_ui = always_show_update_ui();if latest.tag_name.as_str() <= current && !force_ui {return;}@@ -92,7 +89,10 @@ pub fn load_last_release_info_and_set_banner() {fn set_banner_from_release_info(latest: &Release) {let mux = crate::Mux::get();- let url = format!("https://wezterm.org/changelog.html#{}", latest.tag_name);+ let url = format!(+ "https://github.com/RoversX/thinkterm/releases/tag/{}",+ latest.tag_name+ );let icon = ITermFileData {name: None,@@ -119,7 +119,7 @@ fn set_banner_from_release_info(latest: &Release) {let reset = CSI::Sgr(Sgr::Reset);let link_off = OperatingSystemCommand::SetHyperlink(None);mux.set_banner(Some(format!(- "{}{}WezTerm Update Available\r\n{}{}{}{}Click to see what's new{}{}\r\n",+ "{}{}ThinkTerm Update Available\r\n{}{}{}{}Click to see what's new{}{}\r\n",icon,top_line_pos,second_line_pos,@@ -154,7 +154,7 @@ fn update_checker() {let update_interval = Duration::from_secs(configuration().check_for_updates_interval_seconds);let initial_interval = Duration::from_secs(10);- let force_ui = std::env::var_os("WEZTERM_ALWAYS_SHOW_UPDATE_UI").is_some();+ let force_ui = always_show_update_ui();let update_file_name = config::DATA_DIR.join("check_update");let delay = update_file_name@@ -191,11 +191,14 @@ fn update_checker() {current);- let url = format!("https://wezterm.org/changelog.html#{}", latest.tag_name);+ let url = format!(+ "https://github.com/RoversX/thinkterm/releases/tag/{}",+ latest.tag_name+ );if force_ui || socks.is_empty() || socks[0] == my_sock {persistent_toast_notification_with_click_to_open_url(- "WezTerm Update Available",+ "ThinkTerm Update Available","Click to see what's new",&url,);@@ -222,6 +225,11 @@ fn update_checker() {}}+fn always_show_update_ui() -> bool {+ std::env::var_os("THINKTERM_ALWAYS_SHOW_UPDATE_UI").is_some()+ || std::env::var_os("WEZTERM_ALWAYS_SHOW_UPDATE_UI").is_some()+}+pub fn start_update_checker() {static CHECKER_STARTED: AtomicBool = AtomicBool::new(false);if let Ok(false) =diff --git a/wezterm-toast-notification/src/dbus.rs b/wezterm-toast-notification/src/dbus.rsindex 55d985cf..b6669412 100644--- a/wezterm-toast-notification/src/dbus.rs+++ b/wezterm-toast-notification/src/dbus.rs@@ -104,9 +104,9 @@ async fn show_notif_impl(notif: ToastNotification) -> Result<(), Box<dyn std::erhints.insert("urgency", Value::U8(2 /* Critical */));let notification = proxy.notify(- "wezterm",+ "ThinkTerm",0,- "org.wezfurlong.wezterm",+ "com.roversx.thinkterm",¬if.title,¬if.message,if notif.url.is_some() {diff --git a/wezterm-toast-notification/src/windows.rs b/wezterm-toast-notification/src/windows.rsindex 5e6a8165..ef204490 100644--- a/wezterm-toast-notification/src/windows.rs+++ b/wezterm-toast-notification/src/windows.rs@@ -78,7 +78,7 @@ fn show_notif_impl(toast: TN) -> Result<(), Box<dyn std::error::Error>> {*/let notifier = ToastNotificationManager::CreateToastNotifierWithId(HSTRING::from(- "org.wezfurlong.wezterm",+ "com.roversx.thinkterm",))?;notifier.Show(¬if)?;diff --git a/window/src/os/macos/app.rs b/window/src/os/macos/app.rsindex 50101e81..d5501594 100644--- a/window/src/os/macos/app.rs+++ b/window/src/os/macos/app.rs@@ -36,8 +36,8 @@ extern "C" fn application_should_terminate(WindowCloseConfirmation::AlwaysPrompt => {let alert: id = msg_send![class!(NSAlert), alloc];let alert: id = msg_send![alert, init];- let message_text = nsstring("Terminate WezTerm?");- let info_text = nsstring("Detach and close all panes and terminate wezterm?");+ let message_text = nsstring("Terminate ThinkTerm?");+ let info_text = nsstring("Detach and close all panes and terminate ThinkTerm?");let cancel = nsstring("Cancel");let ok = nsstring("Ok");