This commit is contained in:
crschnick
2026-03-21 06:40:21 +00:00
parent ada66ebf50
commit 8ec9ae6120
24 changed files with 51 additions and 27 deletions
@@ -6,12 +6,15 @@ import io.xpipe.app.comp.RegionStructureBuilder;
import io.xpipe.app.core.AppLayoutModel;
import io.xpipe.app.platform.PlatformThread;
import io.xpipe.app.terminal.TerminalDockHubManager;
import javafx.beans.binding.Bindings;
import javafx.beans.value.ObservableValue;
import javafx.scene.Node;
import javafx.scene.Parent;
import javafx.scene.control.ButtonBase;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyCodeCombination;
import javafx.scene.input.KeyCombination;
import javafx.scene.input.KeyEvent;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.Region;
@@ -56,6 +59,13 @@ public class AppLayoutComp extends RegionStructureBuilder<BorderPane, AppLayoutC
event.consume();
}
});
if (new KeyCodeCombination(KeyCode.T, KeyCombination.SHORTCUT_DOWN).match(event)) {
if (TerminalDockHubManager.get().getEnabled().get()) {
TerminalDockHubManager.get().toggleDock();
event.consume();
}
}
});
pane.getStyleClass().add("layout");
return new Structure(pane, multiR, sidebarR, new ArrayList<>(multiR.getChildren()));
@@ -20,6 +20,9 @@ import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.collections.ListChangeListener;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyCodeCombination;
import javafx.scene.input.KeyCombination;
import lombok.Getter;
import org.kordamp.ikonli.javafx.FontIcon;
import org.kordamp.ikonli.materialdesign2.MaterialDesignC;
@@ -116,7 +119,7 @@ public class TerminalDockHubManager {
: new Rect(rect.getX(), rect.getY() - topAdjust, rect.getW(), rect.getH() + topAdjust);
});
private final AppLayoutModel.QueueEntry queueEntry = new AppLayoutModel.QueueEntry(
AppI18n.observable("toggleTerminalDock"),
AppI18n.observable("toggleTerminalDock", new KeyCodeCombination(KeyCode.T, KeyCombination.SHORTCUT_DOWN).toString()),
new LabelGraphic.NodeGraphic(() -> {
var inner = new FontIcon();
inner.iconCodeProperty()
@@ -214,6 +217,7 @@ public class TerminalDockHubManager {
dockModel.trackTerminal(controllable.get(), dock);
dockModel.closeOtherTerminals(session.getRequest());
enableDock();
showDock();
}
@Override
@@ -267,11 +271,6 @@ public class TerminalDockHubManager {
}
hubRequests.add(request);
if (!enabled.get()) {
enableDock();
} else if (!showing.get()) {
showDock();
}
}
private boolean shouldOpen() {
@@ -316,6 +315,18 @@ public class TerminalDockHubManager {
});
}
public void toggleDock() {
if (!enabled.get()) {
return;
}
if (showing.get()) {
hideDock();
} else {
showDock();
}
}
public void showDock() {
PlatformThread.runLaterIfNeeded(() -> {
if (showing.get()) {
@@ -80,7 +80,6 @@ public class TerminalMultiplexerManager {
// We timed out
pendingMultiplexerLaunch = null;
runningMultiplexerContainer = null;
}
// Synchronize between multiple existing tab launches as well as some multiplexers might break there
@@ -87,9 +87,12 @@ public class ZellijTerminalMultiplexer implements TerminalMultiplexer {
asyncLines.addAll(List.of(
"sleep 0.5",
"zellij -s xpipe action new-tab --name \"" + escape(config.getColoredTitle(), false, true) + "\"",
"sleep 0.5",
"zellij -s xpipe action write-chars -- " + escape(" " + firstCommand, true, true) + "\\;exit",
"zellij -s xpipe action write 10",
"zellij -s xpipe action clear"));
"zellij -s xpipe action clear",
"zellij -s xpipe action go-to-previous-tab",
"zellij -s xpipe action close-tab"));
if (config.getPanes().size() > 1) {
var splitIterator =
@@ -18,7 +18,7 @@ public class BeaconServerErrorResponse {
public void throwError() throws BeaconServerException {
var message = error.getMessage();
if (documentationLink != null) {
message = message + "\n\nFor more information, see: " + documentationLink;
message = message + "\n\nFor more information and troubleshooting steps, see: " + documentationLink;
}
throw new BeaconServerException(message, error);
}
+1
View File
@@ -78,3 +78,4 @@ The filtering performance also has been improved, so any filter changes now upda
- Fix SSH being broken when a custom alias to a modified ssh command was set in a shell rc file
- Fix shell scripts for mixed environments, e.g. a powershell script in cmd environment, not properly running
- The SSH connection property `proxy` in the API has been renamed to `gateway` to be more consistent with other connections
- Add ctrl+t shortcut for terminal dock
+1 -1
View File
@@ -1891,7 +1891,7 @@ extractReusableIdentities=Udtræk af genanvendelige identiteter
identitiesAdded=Identiteter tilføjet
syncMode=Synkroniseringstilstand
syncModeDescription=Styrer, hvordan ændringer skal synkroniseres.\n\nØjeblikkelig tilstand skubber og trækker ændringer så hurtigt som muligt, opstarts- og afslutningsmodus synkroniserer alle ændringer, der er foretaget i løbet af en session, på én gang, og manuel tilstand synkroniserer kun, når du igangsætter det.
toggleTerminalDock=Toggle terminal dock
toggleTerminalDock=Toggle terminal dock\n\n($SHORTCUT$)
scriptDirectory=Placering af mappe
scriptDirectoryDescription=Den lokale mappe, der indeholder shell-script-filer
scriptSourceUrl=URL til depot
+1 -1
View File
@@ -1886,7 +1886,7 @@ extractReusableIdentities=Wiederverwendbare Identitäten extrahieren
identitiesAdded=Hinzugefügte Identitäten
syncMode=Sync-Modus
syncModeDescription=Steuert, wie Änderungen synchronisiert werden sollen.\n\nIm Sofortmodus werden Änderungen so schnell wie möglich gepusht und gezogen, im Start- und Beendigungsmodus werden alle während einer Sitzung vorgenommenen Änderungen auf einmal synchronisiert und im manuellen Modus erfolgt die Synchronisierung nur, wenn du sie initiierst.
toggleTerminalDock=Terminal-Dock umschalten
toggleTerminalDock=Terminal-Dock umschalten\n\n($SHORTCUT$)
scriptDirectory=Verzeichnisstandort
scriptDirectoryDescription=Das lokale Verzeichnis, das Shell-Skriptdateien enthält
scriptSourceUrl=Repository-URL
+1 -1
View File
@@ -1923,7 +1923,7 @@ extractReusableIdentities=Extract reusable identities
identitiesAdded=Identities added
syncMode=Sync mode
syncModeDescription=Controls how changes should be synced.\n\nInstant mode will push and pull changes as soon as possible, startup and exit mode will sync all changes made during a session at once, and manual mode will only sync when you initiate it.
toggleTerminalDock=Toggle terminal dock
toggleTerminalDock=Toggle terminal dock\n\n($SHORTCUT$)
scriptDirectory=Directory location
scriptDirectoryDescription=The local directory containing shell script files
scriptSourceUrl=Repository URL
+1 -1
View File
@@ -1850,7 +1850,7 @@ extractReusableIdentities=Extraer identidades reutilizables
identitiesAdded=Identidades añadidas
syncMode=Modo de sincronización
syncModeDescription=Controla cómo deben sincronizarse los cambios.\n\nEl modo instantáneo introducirá y extraerá los cambios tan pronto como sea posible, el modo de inicio y salida sincronizará todos los cambios realizados durante una sesión a la vez, y el modo manual sólo sincronizará cuando tú lo inicies.
toggleTerminalDock=Conmutar el muelle del terminal
toggleTerminalDock=Conmutar el muelle del terminal\n\n($SHORTCUT$)
scriptDirectory=Ubicación del directorio
scriptDirectoryDescription=El directorio local que contiene archivos de script de shell
scriptSourceUrl=URL del repositorio
+1 -1
View File
@@ -1890,7 +1890,7 @@ extractReusableIdentities=Extraire des identités réutilisables
identitiesAdded=Identités ajoutées
syncMode=Mode de synchronisation
syncModeDescription=Contrôle la façon dont les changements doivent être synchronisés.\n\nLe mode instantané pousse et tire les changements dès que possible, le mode de démarrage et de sortie synchronise toutes les modifications effectuées au cours d'une session en une seule fois, et le mode manuel ne synchronise que lorsque tu l'inities.
toggleTerminalDock=Dock de terminal à bascule
toggleTerminalDock=Dock de terminal à bascule\n\n($SHORTCUT$)
scriptDirectory=Emplacement du répertoire
scriptDirectoryDescription=Le répertoire local contenant les fichiers de scripts de l'interpréteur de commandes
scriptSourceUrl=URL du dépôt
+1 -1
View File
@@ -1850,7 +1850,7 @@ extractReusableIdentities=Mengekstrak identitas yang dapat digunakan kembali
identitiesAdded=Identitas ditambahkan
syncMode=Mode sinkronisasi
syncModeDescription=Mengontrol bagaimana perubahan harus disinkronkan.\n\nMode instan akan mendorong dan menarik perubahan sesegera mungkin, mode pengaktifan dan keluar akan menyinkronkan semua perubahan yang dibuat selama sesi sekaligus, dan mode manual hanya akan menyinkronkan saat Anda memulainya.
toggleTerminalDock=Beralih dok terminal
toggleTerminalDock=Beralih dok terminal\n\n($SHORTCUT$)
scriptDirectory=Lokasi direktori
scriptDirectoryDescription=Direktori lokal yang berisi file skrip shell
scriptSourceUrl=URL repositori
+1 -1
View File
@@ -1850,7 +1850,7 @@ extractReusableIdentities=Estrarre identità riutilizzabili
identitiesAdded=Identità aggiunte
syncMode=Modalità di sincronizzazione
syncModeDescription=Controlla la modalità di sincronizzazione delle modifiche.\n\nLa modalità istantanea spinge e tira le modifiche il prima possibile, la modalità di avvio e di uscita sincronizza tutte le modifiche apportate durante una sessione in una sola volta, mentre la modalità manuale sincronizza solo quando sei tu ad avviarla.
toggleTerminalDock=Dock del terminale
toggleTerminalDock=Dock del terminale\n\n($SHORTCUT$)
scriptDirectory=Posizione della directory
scriptDirectoryDescription=La directory locale contenente i file di script di shell
scriptSourceUrl=URL del repository
+1 -1
View File
@@ -1850,7 +1850,7 @@ extractReusableIdentities=再利用可能なIDを抽出する
identitiesAdded=IDが追加された
syncMode=同期モード
syncModeDescription=変更の同期方法を制御する。\n\nインスタントモードはできるだけ早く変更をプッシュし、プルする。スタートアップと終了モードはセッション中に行われたすべての変更を一度に同期する。
toggleTerminalDock=トグル・ターミナル・ドック
toggleTerminalDock=トグル・ターミナル・ドック\n\n($SHORTCUT$)
scriptDirectory=ディレクトリの場所
scriptDirectoryDescription=シェルスクリプトファイルを含むローカルディレクトリ
scriptSourceUrl=リポジトリのURL
+1 -1
View File
@@ -1903,7 +1903,7 @@ extractReusableIdentities=재사용 가능한 ID 추출
identitiesAdded=추가된 ID
syncMode=동기화 모드
syncModeDescription=변경 사항을 동기화하는 방법을 제어합니다.\n\n즉시 모드는 가능한 한 빨리 변경 내용을 푸시 및 당기고, 시작 및 종료 모드는 세션 중에 이루어진 모든 변경 내용을 한 번에 동기화하며, 수동 모드는 사용자가 세션을 시작할 때만 동기화합니다.
toggleTerminalDock=터미널 독 토글
toggleTerminalDock=터미널 독 토글\n\n($SHORTCUT$)
scriptDirectory=디렉토리 위치
scriptDirectoryDescription=셸 스크립트 파일이 포함된 로컬 디렉터리
scriptSourceUrl=리포지토리 URL
+1 -1
View File
@@ -1850,7 +1850,7 @@ extractReusableIdentities=Herbruikbare identiteiten extraheren
identitiesAdded=Identiteiten toegevoegd
syncMode=Synchronisatiemodus
syncModeDescription=Regelt hoe wijzigingen moeten worden gesynchroniseerd.\n\nInstant modus zal wijzigingen zo snel mogelijk pushen en pullen, de opstart- en afsluitmodus zal alle wijzigingen die tijdens een sessie zijn gemaakt in één keer synchroniseren, en de handmatige modus zal alleen synchroniseren als jij het start.
toggleTerminalDock=Terminal dock schakelen
toggleTerminalDock=Terminal dock schakelen\n\n($SHORTCUT$)
scriptDirectory=Directory-locatie
scriptDirectoryDescription=De lokale map met shellscriptbestanden
scriptSourceUrl=URL archief
+1 -1
View File
@@ -1851,7 +1851,7 @@ extractReusableIdentities=Wyodrębnij tożsamości wielokrotnego użytku
identitiesAdded=Dodane tożsamości
syncMode=Tryb synchronizacji
syncModeDescription=Kontroluje sposób synchronizacji zmian.\n\nTryb natychmiastowy wypycha i ściąga zmiany tak szybko, jak to możliwe, tryb uruchamiania i zamykania synchronizuje wszystkie zmiany wprowadzone podczas sesji jednocześnie, a tryb ręczny synchronizuje tylko wtedy, gdy go zainicjujesz.
toggleTerminalDock=Przełącz terminal dokujący
toggleTerminalDock=Przełącz terminal dokujący\n\n($SHORTCUT$)
scriptDirectory=Lokalizacja katalogu
scriptDirectoryDescription=Lokalny katalog zawierający pliki skryptów powłoki
scriptSourceUrl=Adres URL repozytorium
+1 -1
View File
@@ -1850,7 +1850,7 @@ extractReusableIdentities=Extrai identidades reutilizáveis
identitiesAdded=Identificações adicionadas
syncMode=Modo de sincronização
syncModeDescription=Controla a forma como as alterações devem ser sincronizadas.\n\nO modo instantâneo envia e recebe as alterações assim que possível, o modo de arranque e de saída sincroniza todas as alterações efectuadas durante uma sessão de uma só vez e o modo manual só sincroniza quando tu o inicias.
toggleTerminalDock=Alterna a doca do terminal
toggleTerminalDock=Alterna a doca do terminal\n\n($SHORTCUT$)
scriptDirectory=Localização do diretório
scriptDirectoryDescription=O diretório local que contém ficheiros de scripts da shell
scriptSourceUrl=URL do repositório
+1 -1
View File
@@ -1962,7 +1962,7 @@ extractReusableIdentities=Извлечение многократно испол
identitiesAdded=Добавлены идентификаторы
syncMode=Режим синхронизации
syncModeDescription=Управляет тем, как изменения должны синхронизироваться.\n\nМгновенный режим будет подталкивать и вытаскивать изменения как можно быстрее, режим запуска и выхода синхронизирует все изменения, сделанные во время сессии, сразу, а ручной режим синхронизирует только тогда, когда ты его инициируешь.
toggleTerminalDock=Переключаемая терминальная док-станция
toggleTerminalDock=Переключаемая терминальная док-станция\n\n($SHORTCUT$)
scriptDirectory=Расположение каталога
scriptDirectoryDescription=Локальная директория, содержащая файлы сценариев оболочки
scriptSourceUrl=URL-адрес репозитория
+1 -1
View File
@@ -1850,7 +1850,7 @@ extractReusableIdentities=Extrahera återanvändbara identiteter
identitiesAdded=Identiteter tillagda
syncMode=Synkroniseringsläge
syncModeDescription=Styr hur ändringar ska synkroniseras.\n\nOmedelbart läge skickar och hämtar ändringar så snart som möjligt, start- och avslutningsläge synkroniserar alla ändringar som görs under en session på en gång och manuellt läge synkroniserar endast när du initierar det.
toggleTerminalDock=Växla terminalens dockningsstation
toggleTerminalDock=Växla terminalens dockningsstation\n\n($SHORTCUT$)
scriptDirectory=Plats i katalog
scriptDirectoryDescription=Den lokala katalogen som innehåller shell-skriptfiler
scriptSourceUrl=Förvarets URL
+1 -1
View File
@@ -1850,7 +1850,7 @@ extractReusableIdentities=Yeniden kullanılabilir kimlikleri ayıklayın
identitiesAdded=Kimlikler eklendi
syncMode=Senkronizasyon modu
syncModeDescription=Değişikliklerin nasıl senkronize edileceğini kontrol eder.\n\nAnlık mod değişiklikleri mümkün olan en kısa sürede itecek ve çekecek, başlangıç ve çıkış modu bir oturum sırasında yapılan tüm değişiklikleri bir kerede senkronize edecek ve manuel mod yalnızca siz başlattığınızda senkronize edecektir.
toggleTerminalDock=Terminal yuvasını değiştir
toggleTerminalDock=Terminal yuvasını değiştir\n\n($SHORTCUT$)
scriptDirectory=Dizin konumu
scriptDirectoryDescription=Kabuk betik dosyalarını içeren yerel dizin
scriptSourceUrl=Depo URL'si
+1 -1
View File
@@ -1850,7 +1850,7 @@ extractReusableIdentities=Trích xuất các danh tính có thể tái sử dụ
identitiesAdded=Thêm danh tính
syncMode=Chế độ đồng bộ hóa
syncModeDescription=Quy định cách thức đồng bộ hóa các thay đổi.\n\nChế độ tức thì sẽ đẩy và kéo các thay đổi ngay lập tức, chế độ khởi động và thoát sẽ đồng bộ hóa tất cả các thay đổi được thực hiện trong một phiên làm việc cùng một lúc, và chế độ thủ công chỉ đồng bộ hóa khi cậu khởi động nó.
toggleTerminalDock=Chuyển đổi chế độ gắn kết terminal
toggleTerminalDock=Chuyển đổi thanh công cụ terminal\n\n($SHORTCUT$)
scriptDirectory=Vị trí thư mục
scriptDirectoryDescription=Thư mục cục bộ chứa các tệp kịch bản shell
scriptSourceUrl=URL kho lưu trữ
+1 -1
View File
@@ -2474,7 +2474,7 @@ extractReusableIdentities=提取可重复使用的身份
identitiesAdded=添加的身份信息
syncMode=同步模式
syncModeDescription=控制同步更改的方式。\n\n即时模式会尽快推拉更改,启动和退出模式会一次性同步会话中的所有更改,而手动模式只有在你启动时才会同步。
toggleTerminalDock=切换终端基座
toggleTerminalDock=切换终端基座\n\n($SHORTCUT$)
scriptDirectory=目录位置
scriptDirectoryDescription=包含 shell 脚本文件的本地目录
scriptSourceUrl=仓库 URL
+1 -1
View File
@@ -1850,7 +1850,7 @@ extractReusableIdentities=擷取可重複使用的身分
identitiesAdded=新增的身分
syncMode=同步模式
syncModeDescription=控制同步變更的方式。\n\n即時模式會儘快推拔變更,啟動和退出模式會一次同步處理會話中的所有變更,而手動模式則只會在您啟動時同步處理。
toggleTerminalDock=切換終端機塢座
toggleTerminalDock=切換終端機塢座\n\n($SHORTCUT$)
scriptDirectory=目錄位置
scriptDirectoryDescription=包含 shell 指令碼檔案的本機目錄
scriptSourceUrl=儲存庫 URL