mirror of
https://github.com/rust-kotlin/ashell.git
synced 2026-10-07 00:00:32 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f1186e4c84 | ||
|
|
2595cc4853 | ||
|
|
2ae28df8f8 | ||
|
|
58fd03386a | ||
|
|
890ce85cfc | ||
|
|
d5fb956161 | ||
|
|
4bad75e522 | ||
|
|
9e28e78319 | ||
|
|
0cfd3a2fc2 | ||
|
|
6dfa199dcb |
@@ -8,6 +8,16 @@
|
|||||||
|
|
||||||
This project focuses on providing a high-performance and visually appealing shell workspace by combining local and remote environments with a rich set of built-in features.
|
This project focuses on providing a high-performance and visually appealing shell workspace by combining local and remote environments with a rich set of built-in features.
|
||||||
|
|
||||||
|
## 🚀 v0.3 Massive Update!
|
||||||
|
|
||||||
|
The brand-new v0.3 introduces comprehensive upgrades to both architecture and user experience:
|
||||||
|
- ✨ **Global Real-Time Font Settings** (Thanks to [@ancion](https://github.com/ancion) for [PR #6](https://github.com/rust-kotlin/ashell/pull/6)): Customize your global UI fonts and terminal rendering fonts independently. Adjust text size in real-time with automatic persistence.
|
||||||
|
- ✨ **Concurrent SFTP Transfers**: A dedicated Transfers dialog now supports highly optimized, concurrent file uploads and downloads with precise progress display.
|
||||||
|
- ✨ **Persistent Workspace State**: Your sidebar width adjustments, terminal themes, font settings, and file visibility preferences are completely restored upon your next launch!
|
||||||
|
- ✨ **Intelligent SSH Disconnect/Reconnect**: Greatly enhanced SSH connection resilience. Provides a beautiful and localized overlay for one-click re-connection on unexpected disconnections.
|
||||||
|
- ✨ **Hot-Swappable i18n System**: Deeply optimized internationalization. Switch instantly between English and Simplified Chinese without restarting the application.
|
||||||
|
- ✨ **Smart Right-Click Actions**: Added intelligent right-click copy and paste for the terminal, featuring a dedicated settings toggle and OS-native keyboard shortcut hints.
|
||||||
|
|
||||||
## Download
|
## Download
|
||||||
|
|
||||||
You can download the latest pre-compiled releases for macOS, Windows, and Linux from the [GitHub Releases page](https://github.com/rust-kotlin/ashell/releases/latest).
|
You can download the latest pre-compiled releases for macOS, Windows, and Linux from the [GitHub Releases page](https://github.com/rust-kotlin/ashell/releases/latest).
|
||||||
|
|||||||
@@ -8,6 +8,16 @@
|
|||||||
|
|
||||||
该项目旨在通过结合本地和远程环境,并内置丰富的核心功能,提供一个高性能且美观的 Shell 工作区。
|
该项目旨在通过结合本地和远程环境,并内置丰富的核心功能,提供一个高性能且美观的 Shell 工作区。
|
||||||
|
|
||||||
|
## 🚀 v0.3 版本重磅更新!
|
||||||
|
|
||||||
|
全新发布的 v0.3 迎来了架构和体验的全面升级:
|
||||||
|
- ✨ **全局实时字体设置与字号调节**(感谢 [@ancion](https://github.com/ancion) 提供的 [PR #6](https://github.com/rust-kotlin/ashell/pull/6)):支持自定义全局 UI 字体和终端渲染字体,支持实时字号调节并自动记忆。
|
||||||
|
- ✨ **SFTP 多任务并发传输队列**:引入全新的独立传输对话框,支持多文件并发上传下载,提供精准的进度展示。
|
||||||
|
- ✨ **持久化工作区记忆**:您对侧边栏的尺寸拖拽、终端主题、字体、隐藏文件开关等一切设置都会在下次启动时原样恢复!
|
||||||
|
- ✨ **智能断线重连与状态感知**:全面增强的 SSH 网络异常处理机制,断线后直接提供美观的覆盖层用于一键重连或关闭。
|
||||||
|
- ✨ **多语言热切换增强**:深度优化的 i18n 系统,包含中文与英文在内的所有界面文案现在均支持热切换。
|
||||||
|
- ✨ **智能右键快捷操作**:新增终端右键智能复制与粘贴功能,提供专属设置项自由控制开关,并支持根据不同操作系统自适应显示原生快捷键提示。
|
||||||
|
|
||||||
## 下载
|
## 下载
|
||||||
|
|
||||||
您可以从 [GitHub Releases 页面](https://github.com/rust-kotlin/ashell/releases/latest) 下载 macOS、Windows 和 Linux 版本的最新预编译程序。
|
您可以从 [GitHub Releases 页面](https://github.com/rust-kotlin/ashell/releases/latest) 下载 macOS、Windows 和 Linux 版本的最新预编译程序。
|
||||||
|
|||||||
@@ -51,7 +51,11 @@ add_ssh: "+ ssh"
|
|||||||
open_local_or_ssh: "Open a local terminal or pick an SSH session."
|
open_local_or_ssh: "Open a local terminal or pick an SSH session."
|
||||||
open_session: "Open Session"
|
open_session: "Open Session"
|
||||||
settings: "Settings"
|
settings: "Settings"
|
||||||
|
ui_font_size: "UI Font Size"
|
||||||
terminal_font_size: "Terminal Font Size"
|
terminal_font_size: "Terminal Font Size"
|
||||||
|
system_default: "System Default"
|
||||||
|
ui_font_family: "UI Font"
|
||||||
|
terminal_font_family: "Terminal Font"
|
||||||
theme_management_hint: "Theme mode and light/dark theme families are managed from the top-bar theme button."
|
theme_management_hint: "Theme mode and light/dark theme families are managed from the top-bar theme button."
|
||||||
local_host: "local host"
|
local_host: "local host"
|
||||||
local_terminal_opened: "local terminal opened"
|
local_terminal_opened: "local terminal opened"
|
||||||
@@ -86,3 +90,8 @@ completed: "Completed"
|
|||||||
failed: "Failed"
|
failed: "Failed"
|
||||||
cancelled: "Cancelled"
|
cancelled: "Cancelled"
|
||||||
session: "Session"
|
session: "Session"
|
||||||
|
|
||||||
|
software_builtin: "Built-in"
|
||||||
|
retry: "Retry"
|
||||||
|
right_click_copy_paste: "Right-click Copy/Paste"
|
||||||
|
copy_paste_hint: "Tip: Regardless of this switch, you can always use %{key} + C/V to copy/paste."
|
||||||
@@ -51,7 +51,11 @@ add_ssh: "+ SSH"
|
|||||||
open_local_or_ssh: "打开本地终端或选择一个 SSH 会话。"
|
open_local_or_ssh: "打开本地终端或选择一个 SSH 会话。"
|
||||||
open_session: "打开会话"
|
open_session: "打开会话"
|
||||||
settings: "设置"
|
settings: "设置"
|
||||||
|
ui_font_size: "界面字体大小"
|
||||||
terminal_font_size: "终端字体大小"
|
terminal_font_size: "终端字体大小"
|
||||||
|
system_default: "系统默认"
|
||||||
|
ui_font_family: "界面字体"
|
||||||
|
terminal_font_family: "终端字体"
|
||||||
theme_management_hint: "主题模式和亮/暗主题系列可通过顶栏的主题按钮管理。"
|
theme_management_hint: "主题模式和亮/暗主题系列可通过顶栏的主题按钮管理。"
|
||||||
local_host: "本地主机"
|
local_host: "本地主机"
|
||||||
local_terminal_opened: "已打开本地终端"
|
local_terminal_opened: "已打开本地终端"
|
||||||
@@ -86,3 +90,8 @@ completed: "已完成"
|
|||||||
failed: "失败"
|
failed: "失败"
|
||||||
cancelled: "已取消"
|
cancelled: "已取消"
|
||||||
session: "会话"
|
session: "会话"
|
||||||
|
|
||||||
|
software_builtin: "软件内置"
|
||||||
|
retry: "重试"
|
||||||
|
right_click_copy_paste: "右键复制/粘贴"
|
||||||
|
copy_paste_hint: "提示:不管是否开启此开关,都可以使用 %{key} + C/V 快捷键进行复制和粘贴。"
|
||||||
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 292 KiB After Width: | Height: | Size: 279 KiB |
@@ -107,6 +107,14 @@ pub struct ConfigFile {
|
|||||||
pub locale: String,
|
pub locale: String,
|
||||||
#[serde(default = "default_terminal_font_size")]
|
#[serde(default = "default_terminal_font_size")]
|
||||||
pub terminal_font_size: f32,
|
pub terminal_font_size: f32,
|
||||||
|
#[serde(default = "default_ui_font_size")]
|
||||||
|
pub ui_font_size: f32,
|
||||||
|
#[serde(default)]
|
||||||
|
pub right_click_copy_paste: bool,
|
||||||
|
#[serde(default = "default_ui_font_family")]
|
||||||
|
pub ui_font_family: String,
|
||||||
|
#[serde(default = "default_terminal_font_family")]
|
||||||
|
pub terminal_font_family: String,
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub sessions: Vec<Session>,
|
pub sessions: Vec<Session>,
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
@@ -127,6 +135,20 @@ fn default_terminal_font_size() -> f32 {
|
|||||||
13.0
|
13.0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn default_ui_font_size() -> f32 {
|
||||||
|
12.0
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn default_ui_font_family() -> String {
|
||||||
|
// ".SystemUIFont" is a GPUI sentinel that resolves to the platform system UI font.
|
||||||
|
// This matches gpui-component's own Theme default.
|
||||||
|
".SystemUIFont".to_string()
|
||||||
|
}
|
||||||
|
|
||||||
|
fn default_terminal_font_family() -> String {
|
||||||
|
"Maple Mono NF CN".to_string()
|
||||||
|
}
|
||||||
|
|
||||||
pub struct ConfigStore {
|
pub struct ConfigStore {
|
||||||
path: PathBuf,
|
path: PathBuf,
|
||||||
cache: ConfigFile,
|
cache: ConfigFile,
|
||||||
@@ -258,6 +280,50 @@ impl ConfigStore {
|
|||||||
self.cache.terminal_font_size = terminal_font_size.max(10.0);
|
self.cache.terminal_font_size = terminal_font_size.max(10.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn ui_font_size(&self) -> f32 {
|
||||||
|
if self.cache.ui_font_size <= 0.0 {
|
||||||
|
default_ui_font_size()
|
||||||
|
} else {
|
||||||
|
self.cache.ui_font_size
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn set_ui_font_size(&mut self, ui_font_size: f32) {
|
||||||
|
self.cache.ui_font_size = ui_font_size.max(8.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn ui_font_family(&self) -> &str {
|
||||||
|
if self.cache.ui_font_family.is_empty() {
|
||||||
|
".SystemUIFont"
|
||||||
|
} else {
|
||||||
|
&self.cache.ui_font_family
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn set_ui_font_family(&mut self, family: &str) {
|
||||||
|
self.cache.ui_font_family = family.to_string();
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn right_click_copy_paste(&self) -> bool {
|
||||||
|
self.cache.right_click_copy_paste
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn set_right_click_copy_paste(&mut self, val: bool) {
|
||||||
|
self.cache.right_click_copy_paste = val;
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn terminal_font_family(&self) -> &str {
|
||||||
|
if self.cache.terminal_font_family.is_empty() {
|
||||||
|
"Maple Mono NF CN"
|
||||||
|
} else {
|
||||||
|
&self.cache.terminal_font_family
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn set_terminal_font_family(&mut self, family: &str) {
|
||||||
|
self.cache.terminal_font_family = family.to_string();
|
||||||
|
}
|
||||||
|
|
||||||
pub fn get(&self, id: &str) -> Option<&Session> {
|
pub fn get(&self, id: &str) -> Option<&Session> {
|
||||||
self.cache.sessions.iter().find(|s| s.id == id)
|
self.cache.sessions.iter().find(|s| s.id == id)
|
||||||
}
|
}
|
||||||
|
|||||||
+599
-167
File diff suppressed because it is too large
Load Diff
@@ -4,7 +4,7 @@ use alacritty_terminal::{
|
|||||||
};
|
};
|
||||||
use gpui::{
|
use gpui::{
|
||||||
App, Bounds, Element, ElementId, Entity, FocusHandle, Font, FontStyle, FontWeight,
|
App, Bounds, Element, ElementId, Entity, FocusHandle, Font, FontStyle, FontWeight,
|
||||||
GlobalElementId, Hsla, InputHandler, IntoElement, LayoutId, Pixels, Point, Rgba,
|
GlobalElementId, Hsla, InputHandler, IntoElement, LayoutId, Pixels, Point, Rgba, SharedString,
|
||||||
StrikethroughStyle, TextRun, TextStyle, UTF16Selection, UnderlineStyle, Window, fill, point,
|
StrikethroughStyle, TextRun, TextStyle, UTF16Selection, UnderlineStyle, Window, fill, point,
|
||||||
px, relative, rgb,
|
px, relative, rgb,
|
||||||
};
|
};
|
||||||
@@ -127,7 +127,7 @@ pub struct TerminalElement {
|
|||||||
focus_handle: FocusHandle,
|
focus_handle: FocusHandle,
|
||||||
snapshot: RenderSnapshot,
|
snapshot: RenderSnapshot,
|
||||||
marked_text: Option<String>,
|
marked_text: Option<String>,
|
||||||
font_family: &'static str,
|
font_family: SharedString,
|
||||||
font_size: Pixels,
|
font_size: Pixels,
|
||||||
line_height: Pixels,
|
line_height: Pixels,
|
||||||
cell_width: Pixels,
|
cell_width: Pixels,
|
||||||
@@ -250,7 +250,7 @@ impl TerminalElement {
|
|||||||
focus_handle: FocusHandle,
|
focus_handle: FocusHandle,
|
||||||
snapshot: RenderSnapshot,
|
snapshot: RenderSnapshot,
|
||||||
marked_text: Option<String>,
|
marked_text: Option<String>,
|
||||||
font_family: &'static str,
|
font_family: SharedString,
|
||||||
font_size: Pixels,
|
font_size: Pixels,
|
||||||
line_height: Pixels,
|
line_height: Pixels,
|
||||||
cell_width: Pixels,
|
cell_width: Pixels,
|
||||||
@@ -270,7 +270,7 @@ impl TerminalElement {
|
|||||||
fn base_text_style(&self, cx: &App) -> TextStyle {
|
fn base_text_style(&self, cx: &App) -> TextStyle {
|
||||||
TextStyle {
|
TextStyle {
|
||||||
color: cx.theme().foreground,
|
color: cx.theme().foreground,
|
||||||
font_family: self.font_family.into(),
|
font_family: self.font_family.clone(),
|
||||||
font_size: self.font_size.into(),
|
font_size: self.font_size.into(),
|
||||||
line_height: self.line_height.into(),
|
line_height: self.line_height.into(),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
@@ -319,7 +319,7 @@ impl TerminalElement {
|
|||||||
color: fg,
|
color: fg,
|
||||||
background_color: None,
|
background_color: None,
|
||||||
font: Font {
|
font: Font {
|
||||||
family: self.font_family.into(),
|
family: self.font_family.clone(),
|
||||||
weight,
|
weight,
|
||||||
style,
|
style,
|
||||||
..Font::default()
|
..Font::default()
|
||||||
@@ -514,7 +514,7 @@ impl Element for TerminalElement {
|
|||||||
&[TextRun {
|
&[TextRun {
|
||||||
len: marked_text.len(),
|
len: marked_text.len(),
|
||||||
font: Font {
|
font: Font {
|
||||||
family: self.font_family.into(),
|
family: self.font_family.clone(),
|
||||||
..Font::default()
|
..Font::default()
|
||||||
},
|
},
|
||||||
color: base_style.color,
|
color: base_style.color,
|
||||||
|
|||||||
Reference in New Issue
Block a user