Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hot take: we set the tab title for cmd and powershell by default #2348

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/cascadia/TerminalApp/CascadiaSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,13 +232,15 @@ void CascadiaSettings::_CreateDefaultProfiles()
cmdProfile.SetColorScheme({ L"Campbell" });
cmdProfile.SetAcrylicOpacity(0.75);
cmdProfile.SetUseAcrylic(true);
cmdProfile.SetTabTitle(std::optional<std::wstring>{ L"Command Prompt" });

auto powershellProfile{ _CreateDefaultProfile(L"Windows PowerShell") };
powershellProfile.SetCommandline(L"powershell.exe");
powershellProfile.SetStartingDirectory(DEFAULT_STARTING_DIRECTORY);
powershellProfile.SetColorScheme({ L"Campbell" });
powershellProfile.SetDefaultBackground(POWERSHELL_BLUE);
powershellProfile.SetUseAcrylic(false);
powershellProfile.SetTabTitle(std::optional<std::wstring>{ L"Windows PowerShell" });

// If the user has installed PowerShell Core, we add PowerShell Core as a default.
// PowerShell Core default folder is "%PROGRAMFILES%\PowerShell\[Version]\".
Expand Down
5 changes: 5 additions & 0 deletions src/cascadia/TerminalApp/Profile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,11 @@ void Profile::SetColorScheme(std::optional<std::wstring> schemeName) noexcept
_schemeName = std::move(schemeName);
}

void Profile::SetTabTitle(std::optional<std::wstring> tabTitle) noexcept
{
_tabTitle = std::move(tabTitle);
}

void Profile::SetAcrylicOpacity(double opacity) noexcept
{
_acrylicTransparency = opacity;
Expand Down
1 change: 1 addition & 0 deletions src/cascadia/TerminalApp/Profile.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class TerminalApp::Profile final
void SetCommandline(std::wstring cmdline) noexcept;
void SetStartingDirectory(std::wstring startingDirectory) noexcept;
void SetName(std::wstring name) noexcept;
void SetTabTitle(std::optional<std::wstring> tabTitle) noexcept;
void SetUseAcrylic(bool useAcrylic) noexcept;
void SetDefaultForeground(COLORREF defaultForeground) noexcept;
void SetDefaultBackground(COLORREF defaultBackground) noexcept;
Expand Down