New feature qdbus patches for better scriptability

Damien Tardy-Panis damientardypanis at gmail.com
Sun Jul 30 23:29:05 UTC 2017


Hi,

Here attached are 2 small patches I just made to improve the scriptability
of konsole, each by adding a new qdbus method

One is adding a method to list the tabs (sessions) ids of a window
The other adds a method to set the current tab of a window (by its id)

You can also find them in my Github fork
https://github.com/tardypad/konsole/commit/64b0b399383fed4e8b0f2f32a4a34f92974f9781
https://github.com/tardypad/konsole/commit/ee4da09d92e81dbef5ec9d71a447e5d01fc2d43e

The motivation behinds them was the following:
I have global shortcuts on my environment executing a script to
automatically switch, in my main konsole window, to a specific tab by title
With the currently available qdbus options I had no choice but to cycle
through the tabs with the nextSession method and check the currentSession
title.
(if interested, this can be found there:
https://github.com/tardypad/dotfiles/blob/master/zsh/zsh/scripts/goto_local_session#L70
)
The main problem of that approach is that each tab gets displayed shortly
successively and it looks horrible :/

Those new added methods will make this better and simpler.
And I believe they are generic enough to be useful for similar scripting
purposes by other people.

Let me know what you think and if you prefer me to send those patches as a
"bug" report in bugs.kde.org, or any other way.

Thanks

Regards,
Damien
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/konsole-devel/attachments/20170730/9f45c5a7/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 64b0b399383fed4e8b0f2f32a4a34f92974f9781.patch
Type: application/x-patch
Size: 1543 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/konsole-devel/attachments/20170730/9f45c5a7/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ee4da09d92e81dbef5ec9d71a447e5d01fc2d43e.patch
Type: application/x-patch
Size: 1650 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/konsole-devel/attachments/20170730/9f45c5a7/attachment-0001.bin>


More information about the konsole-devel mailing list