[konsole] [Bug 455143] New: Feature Request: Expanded JSON Layout Configuration

shellsmoke bugzilla_noreply at kde.org
Sat Jun 11 00:17:04 BST 2022


https://bugs.kde.org/show_bug.cgi?id=455143

            Bug ID: 455143
           Summary: Feature Request: Expanded JSON Layout Configuration
           Product: konsole
           Version: unspecified
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: wishlist
          Priority: NOR
         Component: split-view
          Assignee: konsole-devel at kde.org
          Reporter: smokeintheshell at gmail.com
  Target Milestone: ---

Created attachment 149605
  --> https://bugs.kde.org/attachment.cgi?id=149605&action=edit
Konsole Session Generated example JSON

It appears that currently, Konsole only supports the number and orientation of
window splits in a JSON file format with the --layout commandline option. While
most of the features requested below can be controlled for automation purposes
with dbus, using dbus commands requires a steeper learning curve for the end
user, creates issues with portability between systems, and can cause issues
with script readability (one user writes a bash script one way, while other
people might write it another). There are additional security concerns with the
runCommand and sendText dbus methods, though Konsole already supports executing
commands in a new session with the '-e' option. These issues can be alleviated
by exposing more of Konsole's configuration and commandline options via JSON.

My suggestion/feature request is to expand the JSON configuration to encompass
the following:
Publicly exposed DBus methods and properties for the 'org.kde.konsole'
endpoint:
- org.kde.konsole.Session.setTitle
- org.kde.konsole.Session.setTabTitleFormat
- - There are two Title and TabTitleFormat properties controlled by the above
two methods. I've accounted for this in my example below
- org.kde.konsole.Session.setProfile
- org.kde.konsole.Session.sendText
- org.kde.konsole.Session.runCommand
Split pane sizing with either "HEIGHTxWIDTH" or separate HEIGHT and WIDTH
properties.
Window configurations such as window size and view-enabled plugins.

The JSON formatting should be easy and simple to read and configure, and KDE
Konsole documentation should be updated to include its usage. To assist in ease
of formatting and standardization, I propose having all splits be separated by
their left-right (horizontal) top-bottom (vertical) orientation (current
behavior) to include the first split (Konsole Session 1. Not current behavior,
as there is just a first '"Orientation": "Horizontal"' for the beginning of the
first split). Additionally, all Konsole window settings, such as Window size,
should be declared at the top of the JSON config file.

An example of what this JSON configuration file might look like is below:

{
        "WindowSize" : "Maximized",
        "Plugins": ["SSHManager", "Plugin2"],
        "Splits": [  
                { 
                        # First Split on far left
                        # session 1
                        "Orientation": "Horizontal",  
                        "SessionRestoreId": 0,
                        "TabTitleLocal": "Local Tab Title"
                },  
                {  
                        # Second split to right
                        "Orientation": "Vertical",  
                        "Widgets": [  
                                {  
                                        # Top
                                        # session 2
                                        "SessionRestoreId": 0,
                                        "TabTitleFormatLocal": "%d : %n"
                                },  
                                { 
                                        # Bottom
                                        # session 3
                                        "SessionRestoreId": 0,
                                        "TabTitleFormatRemote": "%U%H"
                                }  
                        ]  
                },  
                {  
                        # Third split to right
                        # session 4
                        "SessionRestoreId": 0, 
                        "TabTitleRemote": "Remote Tab Title",
                        "Profile": "KonsoleProfile1"
                },  
                {  
                        # Fourth Split to far right
                        "Orientation": "Vertical",  
                        "Widgets": [  
                                {  
                                        # top
                                        # session 5
                                        "SessionRestoreId": 0,
                                        "SendText": "# echo send text"
                                },  
                                {  
                                        # middle
                                        # session 6
                                        "SessionRestoreId": 0,
                                        "RunCommand": "echo run command"
                                },  
                                {  
                                        # bottom
                                        # session 7
                                        "SessionRestoreId": 0,
                                        "PaneSize": "64x30"
                                }  
                        ]  
                }  
        ]  
}
A Screenshot of the resulting Konsole window from the example configuration I'm
suggesting would look like the attached screenshot

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the konsole-devel mailing list