add a setting to control show/hide terminal button for status bar (#10593)
Release Notes: - Added a setting to show/hide the terminal button in the status bar: `{"terminal": {"button": false}}` to hide it. (#10513) --------- Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
This commit is contained in:
parent
f3192b6fa6
commit
2cfb1ffa77
4 changed files with 22 additions and 2 deletions
|
@ -490,6 +490,8 @@
|
||||||
// Whether or not selecting text in the terminal will automatically
|
// Whether or not selecting text in the terminal will automatically
|
||||||
// copy to the system clipboard.
|
// copy to the system clipboard.
|
||||||
"copy_on_select": false,
|
"copy_on_select": false,
|
||||||
|
// Whether to show the terminal button in the status bar
|
||||||
|
"button": true,
|
||||||
// Any key-value pairs added to this list will be added to the terminal's
|
// Any key-value pairs added to this list will be added to the terminal's
|
||||||
// environment. Use `:` to separate multiple values.
|
// environment. Use `:` to separate multiple values.
|
||||||
"env": {
|
"env": {
|
||||||
|
|
|
@ -36,6 +36,7 @@ pub struct TerminalSettings {
|
||||||
pub alternate_scroll: AlternateScroll,
|
pub alternate_scroll: AlternateScroll,
|
||||||
pub option_as_meta: bool,
|
pub option_as_meta: bool,
|
||||||
pub copy_on_select: bool,
|
pub copy_on_select: bool,
|
||||||
|
pub button: bool,
|
||||||
pub dock: TerminalDockPosition,
|
pub dock: TerminalDockPosition,
|
||||||
pub default_width: Pixels,
|
pub default_width: Pixels,
|
||||||
pub default_height: Pixels,
|
pub default_height: Pixels,
|
||||||
|
@ -138,6 +139,10 @@ pub struct TerminalSettingsContent {
|
||||||
///
|
///
|
||||||
/// Default: false
|
/// Default: false
|
||||||
pub copy_on_select: Option<bool>,
|
pub copy_on_select: Option<bool>,
|
||||||
|
/// Whether to show the terminal button in the status bar.
|
||||||
|
///
|
||||||
|
/// Default: true
|
||||||
|
pub button: Option<bool>,
|
||||||
pub dock: Option<TerminalDockPosition>,
|
pub dock: Option<TerminalDockPosition>,
|
||||||
/// Default width when the terminal is docked to the left or right.
|
/// Default width when the terminal is docked to the left or right.
|
||||||
///
|
///
|
||||||
|
|
|
@ -726,8 +726,10 @@ impl Panel for TerminalPanel {
|
||||||
"TerminalPanel"
|
"TerminalPanel"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn icon(&self, _cx: &WindowContext) -> Option<IconName> {
|
fn icon(&self, cx: &WindowContext) -> Option<IconName> {
|
||||||
Some(IconName::Terminal)
|
TerminalSettings::get_global(cx)
|
||||||
|
.button
|
||||||
|
.then(|| IconName::Terminal)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn icon_tooltip(&self, _cx: &WindowContext) -> Option<&'static str> {
|
fn icon_tooltip(&self, _cx: &WindowContext) -> Option<&'static str> {
|
||||||
|
|
|
@ -908,6 +908,7 @@ These values take in the same options as the root-level settings with the same n
|
||||||
"font_features": null,
|
"font_features": null,
|
||||||
"font_size": null,
|
"font_size": null,
|
||||||
"option_as_meta": false,
|
"option_as_meta": false,
|
||||||
|
"button": false
|
||||||
"shell": {},
|
"shell": {},
|
||||||
"toolbar": {
|
"toolbar": {
|
||||||
"title": true
|
"title": true
|
||||||
|
@ -1086,6 +1087,16 @@ See Buffer Font Features
|
||||||
|
|
||||||
At the moment, only the `title` option is available, it controls displaying of the terminal title that can be changed via `PROMPT_COMMAND`. If the title is hidden, the terminal toolbar is not displayed.
|
At the moment, only the `title` option is available, it controls displaying of the terminal title that can be changed via `PROMPT_COMMAND`. If the title is hidden, the terminal toolbar is not displayed.
|
||||||
|
|
||||||
|
### Terminal Button
|
||||||
|
|
||||||
|
- Description: Control to show or hide the terminal button in the status bar
|
||||||
|
- Setting: `button`
|
||||||
|
- Default: `true`
|
||||||
|
|
||||||
|
**Options**
|
||||||
|
|
||||||
|
`boolean` values
|
||||||
|
|
||||||
### Working Directory
|
### Working Directory
|
||||||
|
|
||||||
- Description: What working directory to use when launching the terminal.
|
- Description: What working directory to use when launching the terminal.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue