<div><br></div><div dir="auto">This is a really nice idea. I’ll implement this week, thanks for the heads up.</div><div dir="auto"><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Sat, 11 Jun 2022 at 01:17 shellsmoke <<a href="mailto:bugzilla_noreply@kde.org">bugzilla_noreply@kde.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><a href="https://bugs.kde.org/show_bug.cgi?id=455143" rel="noreferrer" target="_blank">https://bugs.kde.org/show_bug.cgi?id=455143</a><br>
<br>
            Bug ID: 455143<br>
           Summary: Feature Request: Expanded JSON Layout Configuration<br>
           Product: konsole<br>
           Version: unspecified<br>
          Platform: Other<br>
                OS: Linux<br>
            Status: REPORTED<br>
          Severity: wishlist<br>
          Priority: NOR<br>
         Component: split-view<br>
          Assignee: <a href="mailto:konsole-devel@kde.org" target="_blank">konsole-devel@kde.org</a><br>
          Reporter: <a href="mailto:smokeintheshell@gmail.com" target="_blank">smokeintheshell@gmail.com</a><br>
  Target Milestone: ---<br>
<br>
Created attachment 149605<br>
  --> <a href="https://bugs.kde.org/attachment.cgi?id=149605&action=edit" rel="noreferrer" target="_blank">https://bugs.kde.org/attachment.cgi?id=149605&action=edit</a><br>
Konsole Session Generated example JSON<br>
<br>
It appears that currently, Konsole only supports the number and orientation of<br>
window splits in a JSON file format with the --layout commandline option. While<br>
most of the features requested below can be controlled for automation purposes<br>
with dbus, using dbus commands requires a steeper learning curve for the end<br>
user, creates issues with portability between systems, and can cause issues<br>
with script readability (one user writes a bash script one way, while other<br>
people might write it another). There are additional security concerns with the<br>
runCommand and sendText dbus methods, though Konsole already supports executing<br>
commands in a new session with the '-e' option. These issues can be alleviated<br>
by exposing more of Konsole's configuration and commandline options via JSON.<br>
<br>
My suggestion/feature request is to expand the JSON configuration to encompass<br>
the following:<br>
Publicly exposed DBus methods and properties for the 'org.kde.konsole'<br>
endpoint:<br>
- org.kde.konsole.Session.setTitle<br>
- org.kde.konsole.Session.setTabTitleFormat<br>
- - There are two Title and TabTitleFormat properties controlled by the above<br>
two methods. I've accounted for this in my example below<br>
- org.kde.konsole.Session.setProfile<br>
- org.kde.konsole.Session.sendText<br>
- org.kde.konsole.Session.runCommand<br>
Split pane sizing with either "HEIGHTxWIDTH" or separate HEIGHT and WIDTH<br>
properties.<br>
Window configurations such as window size and view-enabled plugins.<br>
<br>
The JSON formatting should be easy and simple to read and configure, and KDE<br>
Konsole documentation should be updated to include its usage. To assist in ease<br>
of formatting and standardization, I propose having all splits be separated by<br>
their left-right (horizontal) top-bottom (vertical) orientation (current<br>
behavior) to include the first split (Konsole Session 1. Not current behavior,<br>
as there is just a first '"Orientation": "Horizontal"' for the beginning of the<br>
first split). Additionally, all Konsole window settings, such as Window size,<br>
should be declared at the top of the JSON config file.<br>
<br>
An example of what this JSON configuration file might look like is below:<br>
<br>
{<br>
        "WindowSize" : "Maximized",<br>
        "Plugins": ["SSHManager", "Plugin2"],<br>
        "Splits": [  <br>
                { <br>
                        # First Split on far left<br>
                        # session 1<br>
                        "Orientation": "Horizontal",  <br>
                        "SessionRestoreId": 0,<br>
                        "TabTitleLocal": "Local Tab Title"<br>
                },  <br>
                {  <br>
                        # Second split to right<br>
                        "Orientation": "Vertical",  <br>
                        "Widgets": [  <br>
                                {  <br>
                                        # Top<br>
                                        # session 2<br>
                                        "SessionRestoreId": 0,<br>
                                        "TabTitleFormatLocal": "%d : %n"<br>
                                },  <br>
                                { <br>
                                        # Bottom<br>
                                        # session 3<br>
                                        "SessionRestoreId": 0,<br>
                                        "TabTitleFormatRemote": "%U%H"<br>
                                }  <br>
                        ]  <br>
                },  <br>
                {  <br>
                        # Third split to right<br>
                        # session 4<br>
                        "SessionRestoreId": 0, <br>
                        "TabTitleRemote": "Remote Tab Title",<br>
                        "Profile": "KonsoleProfile1"<br>
                },  <br>
                {  <br>
                        # Fourth Split to far right<br>
                        "Orientation": "Vertical",  <br>
                        "Widgets": [  <br>
                                {  <br>
                                        # top<br>
                                        # session 5<br>
                                        "SessionRestoreId": 0,<br>
                                        "SendText": "# echo send text"<br>
                                },  <br>
                                {  <br>
                                        # middle<br>
                                        # session 6<br>
                                        "SessionRestoreId": 0,<br>
                                        "RunCommand": "echo run command"<br>
                                },  <br>
                                {  <br>
                                        # bottom<br>
                                        # session 7<br>
                                        "SessionRestoreId": 0,<br>
                                        "PaneSize": "64x30"<br>
                                }  <br>
                        ]  <br>
                }  <br>
        ]  <br>
}<br>
A Screenshot of the resulting Konsole window from the example configuration I'm<br>
suggesting would look like the attached screenshot<br>
<br>
-- <br>
You are receiving this mail because:<br>
You are the assignee for the bug.</blockquote></div></div>