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

How do I save my Konsole setup (incl splits and tabs)

Tags: None
(comma "," separated)
User avatar
kosmonaut
Registered Member
Posts
3
Karma
0
OS
Hi!

I was playing around with Konsole´s split/tiling feature for the first time and I pretty much like it :-D
Image
Now I wonder how to save my config, so I can re-use it tomorrow the way it is set up right now: with tiles, tabs (maybe even the currently running programs?)
I thought that Bookmark could works but it seems it just seems to bookmark urls in the filesystem.
Any hints?

Cheers!
koffeinfriedhof
Registered Member
Posts
608
Karma
4
OS
Hi!
I am using Yakuake (the dropdown-version of konsole) and a startup-script to set up my defaults using DBus. Example:
Code: Select all
function activeSession {
    qdbus org.kde.yakuake /yakuake/sessions org.kde.yakuake.activeSessionId
};

function newSession {
  qdbus org.kde.yakuake /yakuake/sessions org.kde.yakuake.addSession
};

# SessionID
function getTerminalIdForSession {
  qdbus org.kde.yakuake /yakuake/sessions org.kde.yakuake.terminalIdsForSessionId "$1"
}

# SessionID CommandString
function runCommand {
  term=$(qdbus org.kde.yakuake /yakuake/sessions org.kde.yakuake.terminalIdsForSessionId "$1")
  qdbus org.kde.yakuake /yakuake/sessions org.kde.yakuake.runCommandInTerminal "$term" "$2"
};

# terminalID CommandString
function termCommand {
  qdbus org.kde.yakuake /yakuake/sessions org.kde.yakuake.runCommandInTerminal "$1" "$2"
}

# SessionID
function vSplit {
  qdbus org.kde.yakuake /yakuake/sessions org.kde.yakuake.splitSessionLeftRight "$1"
};

# SessionID | Titlestring
function setTitle {
  qdbus org.kde.yakuake /yakuake/tabs org.kde.yakuake.setTabTitle "$1" "$2"
};

srv=$(newSession)
setTitle "$srv" "whatever"
runCommand "$srv" "ls -lha /tmp"
runCommand "$srv" "ssh -p1234 user@sever.tld"
User avatar
kosmonaut
Registered Member
Posts
3
Karma
0
OS
Hi koffeinfriedhof

Thanks for your answer. Interesting config. Wasn't aware that yukuake is able to "recall" settings...nice to know.
I know and love this recall function (reorder reopen tiles and splits...) from tmux and I would l-o-v-e to see this in konsole.
I wonder how I could write a startup script that could fulfill this in konsole ;) Where could I find infos that could help me creating something similar to what you have in yukuake?

Cheers!!
koffeinfriedhof
Registered Member
Posts
608
Karma
4
OS
You can use the DBus-Methods of Konsole. Yakuake is based on Konsole, so there should be similar events. See Konsole Scripting for a short intro.


Bookmarks



Who is online

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