Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Konsole
Commits
5c252472
Commit
5c252472
authored
Nov 24, 2021
by
Tomaz Canabrava
Committed by
Kurt Hindenburg
Jan 26, 2022
Browse files
React when ssh opens or closes.
parent
48202ef5
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/plugins/SSHManager/sshmanagermodel.cpp
View file @
5c252472
...
...
@@ -152,7 +152,7 @@ void SSHManagerModel::setSessionController(Konsole::SessionController *controlle
void
SSHManagerModel
::
triggerProfileChange
(
const
QString
&
sshHost
)
{
Q_UNUSED
(
sshHost
)
;
qDebug
()
<<
"Localhost changed to"
<<
sshHost
;
}
void
SSHManagerModel
::
load
()
...
...
src/session/Session.cpp
View file @
5c252472
...
...
@@ -1110,6 +1110,16 @@ QString Session::getDynamicTitle()
bool
ok
=
false
;
if
(
process
->
name
(
&
ok
)
==
QLatin1String
(
"ssh"
)
&&
ok
)
{
sshProcess
=
std
::
make_unique
<
SSHProcessInfo
>
(
*
process
);
}
QString
currHostName
=
sshProcess
?
sshProcess
->
host
()
:
process
->
localHost
();
if
(
_currentHostName
!=
currHostName
)
{
_currentHostName
=
currHostName
;
Q_EMIT
hostnameChanged
(
currHostName
);
}
if
(
sshProcess
)
{
QString
title
=
tabTitleFormat
(
Session
::
RemoteTabTitle
);
title
.
replace
(
QLatin1String
(
"%w"
),
userTitle
());
title
.
replace
(
QLatin1String
(
"%#"
),
QString
::
number
(
sessionId
()));
...
...
src/session/Session.h
View file @
5c252472
...
...
@@ -872,6 +872,8 @@ private:
static
int
lastSessionId
;
bool
_isPrimaryScreen
;
QString
_currentHostName
;
};
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment