mirror of
https://github.com/wez/wezterm.git
synced 2024-12-26 23:04:49 +03:00
Add open-wezterm-here script
The .deb package registers that script as the alternative for a terminal emulator in the hope that various "open terminal here..." functions in other tools will use that to detect wezterm and run thing in the cwd. refs: https://github.com/wez/wezterm/issues/2103
This commit is contained in:
parent
743ab695e8
commit
60d7d214c1
5
assets/open-wezterm-here
Executable file
5
assets/open-wezterm-here
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
# This script is a helper that starts a new terminal window
|
||||
# in the cwd of the calling process, rather than using the
|
||||
# default cwd which is usually the home directory.
|
||||
wezterm start --cwd $PWD -- "$@"
|
@ -159,6 +159,7 @@ echo "Doing the build bit here"
|
||||
set -x
|
||||
cd ${HERE}
|
||||
mkdir -p %{buildroot}/usr/bin %{buildroot}/etc/profile.d
|
||||
install -Dsm755 assets/open-wezterm-here -t %{buildroot}/usr/bin
|
||||
install -Dsm755 target/release/wezterm -t %{buildroot}/usr/bin
|
||||
install -Dsm755 target/release/wezterm-mux-server -t %{buildroot}/usr/bin
|
||||
install -Dsm755 target/release/wezterm-gui -t %{buildroot}/usr/bin
|
||||
@ -172,6 +173,7 @@ install -Dm644 assets/wezterm.appdata.xml %{buildroot}/usr/share/metainfo/org.we
|
||||
install -Dm644 assets/wezterm-nautilus.py %{buildroot}/usr/share/nautilus-python/extensions/wezterm-nautilus.py
|
||||
|
||||
%files
|
||||
/usr/bin/open-wezterm-here
|
||||
/usr/bin/wezterm
|
||||
/usr/bin/wezterm-gui
|
||||
/usr/bin/wezterm-mux-server
|
||||
@ -211,7 +213,7 @@ EOF
|
||||
#!/bin/sh
|
||||
set -e
|
||||
if [ "\$1" = "configure" ] ; then
|
||||
update-alternatives --install /usr/bin/x-terminal-emulator x-terminal-emulator /usr/bin/wezterm 20
|
||||
update-alternatives --install /usr/bin/x-terminal-emulator x-terminal-emulator /usr/bin/open-wezterm-here 20
|
||||
fi
|
||||
EOF
|
||||
|
||||
@ -219,13 +221,14 @@ EOF
|
||||
#!/bin/sh
|
||||
set -e
|
||||
if [ "\$1" = "remove" ]; then
|
||||
update-alternatives --remove x-terminal-emulator /usr/bin/wezterm
|
||||
update-alternatives --remove x-terminal-emulator /usr/bin/open-wezterm-here
|
||||
fi
|
||||
EOF
|
||||
|
||||
install -Dsm755 -t pkg/debian/usr/bin target/release/wezterm-mux-server
|
||||
install -Dsm755 -t pkg/debian/usr/bin target/release/wezterm-gui
|
||||
install -Dsm755 -t pkg/debian/usr/bin target/release/wezterm
|
||||
install -Dsm755 -t pkg/debian/usr/bin assets/open-wezterm-here
|
||||
install -Dsm755 -t pkg/debian/usr/bin target/release/strip-ansi-escapes
|
||||
|
||||
deps=$(cd pkg && dpkg-shlibdeps -O -e debian/usr/bin/*)
|
||||
@ -283,6 +286,7 @@ source="
|
||||
target/release/wezterm
|
||||
target/release/wezterm-gui
|
||||
target/release/wezterm-mux-server
|
||||
assets/open-wezterm-here
|
||||
assets/wezterm.desktop
|
||||
assets/wezterm.appdata.xml
|
||||
assets/icon/terminal.png
|
||||
@ -296,6 +300,7 @@ build() {
|
||||
}
|
||||
|
||||
package() {
|
||||
install -Dm755 -t "\$pkgdir"/usr/bin "\$srcdir"/open-wezterm-here
|
||||
install -Dm755 -t "\$pkgdir"/usr/bin "\$srcdir"/wezterm
|
||||
install -Dm755 -t "\$pkgdir"/usr/bin "\$srcdir"/wezterm-gui
|
||||
install -Dm755 -t "\$pkgdir"/usr/bin "\$srcdir"/wezterm-mux-server
|
||||
|
Loading…
Reference in New Issue
Block a user