[Konsole-devel] Quicker and easier access to the most commonly used encodings in the konsole's popup menu.

Jekyll Wu adaptee at gmail.com
Wed Dec 21 18:58:44 UTC 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

于 2011年12月22日 01:48, Delian 写道:
> Hello everyone.
> 
> In my daily work, I often have to work with 2 encodings exclusively: utf8
> and cp 1251 (also known as windows-1251). Both these encodings are very
> popular in Bulgaria, where I am from.
> 
> I love using konsole, but the current mechanism for switching the current
> encoding through the main menu or the popup context menu, became somewhat
> cumbersome for me - sometimes I have to use it more than 3 times per 5
> minutes, and both UTF-8 and cp 1251 are not easy to be selected quickly
> using the default Encoding selector widget in KDE.
> 
> Today, I've finally decided to bite the bullet, and dive into the konsole's
> source. The result looks like this:
> ( https://github.com/spytheman/konsole/wiki )
> [image: proposal_for_konsole_context_menu_quick_encoding_switching_01.png]
> 
> I suspect that as it is, it is not very suitable for generic usage (since
> it requires code changes and recompiling in order to change the shown
> encodings, and I highly doubt that everyone has my preferences for them).
> However, it is a start, and I would be happy to discuss how it can be
> generalized... Possibly a second 'default2' encoding can be added to the
> Advanced tab of the profile editor, and then the popup menu would offer the
> 2 defaults with their names, instead of the hardcoded windows-1251 and utf8
> ???
> 
> I'm new to KDE development and Konsole in particular, so instead of sending
> patches as described here:
> http://techbase.kde.org/Development/Tutorials/Git/Create_a_patch , I've
> created a forked version on github.
> Here are the changes so far:
> https://github.com/spytheman/konsole/compare/master...quickly_switch_encoding_in_popupmenu
> 
> I'm looking forward to your suggestions, comments, flames :-)
> Delian Angelov
> 
> 
> 
> 
> _______________________________________________
> konsole-devel mailing list
> konsole-devel at kde.org
> https://mail.kde.org/mailman/listinfo/konsole-devel

Hi Delian:

There is a simple but handy script 'konsoleprofile', which is shipped by
konsole by default.  It can be used to change the settings of current
tab on the fly. For you case, I think "konsoleprofile
DefaultEncoding=cp1251" and "konsoleprofile DefaultEncoding=utf-8" will
work quite well. Create two aliases for them, then you can change the
encoding with few keystrokes.

If I remember correctly, konsole alsos provide dbus interface for
changing encoding. It is not as handy as konsoleproifle, but it can be
used to affect other tabs, instead of only current tab.

As for you suggestion of "second default", I'm not sure that is
something needed by most users.

Maybe we should write more documentation and examples for the
'konsoleprofile' script, so that more users will notice it and see its
value . Actually it is not documented at all until recently :)

Jekyll
Regards
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJO8ixkAAoJEOemZ9znWXlA7roP/ixg1lXoUjH9M5o/8cT64R7M
kFAOYLcTuF4XreNrRyiAsaLPyKuYj8ZRqCwWe5zc6M25SHapW0FFatF/8OKbecpG
YXwWEOgSvpkHnvvPEGV1V4aKjygmTUW166bJA+7sbAYVhOz+ARWlNpEoUXf89syj
WS6Cq1d6gIQ2YcHoz0YgvH19XMNxT7aBT6242vyXBsnV1cKpneLqUmJ9FcrBtQ6Y
KWm1ByXWBeCZgiwrBz7olqucebuTIxru0hWDhwq5PPddvWyw3y/a6shThNdI0aBJ
K3x/wGPSTFXclG1xTwdBJJ5IuykuAw6CZ2pVbt4r8PkrHAyfWrLe1O/bOM7Hf/0O
FqCBJZ/UG23j2OmKGr9SVuH4mpGpla02EquTeGSObscmzL6V3Whse0NSNJOOksG6
1XelPHeixnEIzoeghLU4c7EEKDS6onFyFAut0jPfbTjT19hZE2sFAoDqGanOV4qF
zkSZ6bcoeVidTGUCSL8LzwuFGOhQVSsHhSwa4b7dqZ4Az02Lf0ZVWxKL3r2sE5IO
9M6GO6w5yw3sGO3w3tzFLIMfzIGaUIbJmT94ZncmkqihpDiOsLlp9OQ+TNLyOZxx
ejkFtLxoBO/DG6cWyf/ogpBLwMeajJHUvo4EuNM4zqf3AL3LVhi6GI+41/ZF+L0x
kz4LxAIX4HzG43wx6cWG
=1Z4S
-----END PGP SIGNATURE-----



More information about the konsole-devel mailing list