This forum has been archived. All content is frozen. Please use KDE Discuss instead.

[SOLVED] Scriptable way to change konsole profile

Tags: None
(comma "," separated)
koffeinfriedhof
Registered Member
Posts
608
Karma
4
OS
Hi!

I'm looking for a way to change the current profile of all running konsole windows. If possible for alle KPart-parts-Users like e.g. yakuake does. (I know that yakuake does handle default profiles itself).
I want to achieve a full profile switch between a personally configurable "daymode" and "nightmode", including the Konsole color scheme - setting. The global theme does not change these things.
As there are no usable qdbus methods, I do not know where to start besides "hacking" the DefaultProfile in konsolerc for new instances.

Any ideas where to start? Thanks in advance!

SOLVED:
Well, it does work via dbus:
#!/bin/bash
#…cut
IFS=,
lst=$(qdbus org.kde.yakuake /yakuake/sessions org.kde.yakuake.terminalIdList)
#…cut
for i in $lst; do
((i++))
qdbus org.kde.yakuake /Sessions/$i org.kde.konsole.Session.setProfile "$profileName"
done
#…cut


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell