mirror of
https://github.com/KDE/konsole.git
synced 2026-05-04 12:44:23 -04:00
Initial version of a command-line tool (konsoleprofile) to change profile options. Usage: konsoleprofile option=value . Applies to the profile used by the session in which konsoleprofile was executed. All of the logic is in Konsole itself. 'konsoleprofile' is just a very simple shell script which can be placed anywhere. Example usage: 'konsoleprofile colorscheme=WhiteOnBlack' will change the colors used by the active tab.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=670582
This commit is contained in:
@@ -229,6 +229,9 @@ Session* SessionManager::createSession(const QString& key )
|
||||
connect( session , SIGNAL(profileChanged(const QString&)) , this ,
|
||||
SLOT(sessionProfileChanged()) );
|
||||
|
||||
connect( session , SIGNAL(profileChangeCommandReceived(const QString&)) , this ,
|
||||
SLOT(sessionProfileCommandReceived(const QString&)) );
|
||||
|
||||
//ask for notification when session dies
|
||||
_sessionMapper->setMapping(session,session);
|
||||
connect( session , SIGNAL(finished()) , _sessionMapper ,
|
||||
@@ -658,12 +661,22 @@ QString SessionManager::findByShortcut(const QKeySequence& shortcut)
|
||||
void SessionManager::sessionProfileChanged()
|
||||
{
|
||||
Session* session = qobject_cast<Session*>(sender());
|
||||
|
||||
Q_ASSERT( session );
|
||||
|
||||
updateSession(session);
|
||||
}
|
||||
|
||||
void SessionManager::sessionProfileCommandReceived(const QString& text)
|
||||
{
|
||||
Session* session = qobject_cast<Session*>(sender());
|
||||
Q_ASSERT( session );
|
||||
|
||||
ProfileCommandParser parser;
|
||||
QHash<Profile::Property,QVariant> changes = parser.parse(text);
|
||||
|
||||
changeProfile(session->profileKey(),changes,false);
|
||||
}
|
||||
|
||||
QKeySequence SessionManager::shortcut(const QString& profileKey) const
|
||||
{
|
||||
Profile* info = profile(profileKey);
|
||||
|
||||
Reference in New Issue
Block a user