Customizing Context Menu Transformations in Terminal

Hello Zorin Community,

I've recently encountered an interesting feature in the terminal on my Zorin OS where the context menu seems to be auto-converting decimal numbers into hexadecimal representation and vice-versa. For example, I see things like:

0x40 on 64
0xa on 10
32 on 0x20
15 on 0xf

While this is undoubtedly a handy feature for certain situations, I am curious about its origin and if it's possible to customize these automatic transformations. I've looked around but haven't found any settings or options that pertain to this. Also Help for the terminal is silent about this feature.

My questions are:

  1. Can anyone shed light on why my terminal is auto-converting numbers to hexadecimal in the context menu? Is it a default feature of the terminal in Zorin OS, or could it be something that got installed or configured without my noticing?

  2. I'm interested in possibly adding more custom transformations to the context menu. Is it possible to do so? For instance, can we add a feature that performs different types of operations on selected text?

Any guidance or resources you could provide would be greatly appreciated. I'm sure other users might find this topic interesting as well.

Thank you in advance!

I do not see this on Zorin Lite (xfce4-terminal), nor on Core (Gnome-Terminal).
Are you using Zorin OS Education Core edition?

I believe so that it is the Education Core edition. But I could not locate that information:

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Zorin
Description:	Zorin OS 16.2
Release:	16
Codename:	focal

$ cat /etc/os-release
NAME="Zorin OS"
VERSION="16.2"
ID=zorin
ID_LIKE=ubuntu
PRETTY_NAME="Zorin OS 16.2"
VERSION_ID="16"
HOME_URL="https://zorin.com/os/"
SUPPORT_URL="https://help.zorin.com/"
BUG_REPORT_URL="https://zorin.com/os/feedback/"
PRIVACY_POLICY_URL="https://zorin.com/legal/privacy/"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

Here is an example. The context menu quick converting number
to 0x10:
terminal context oct

Yes, the LSB_release or os_release files won't specify between Core, Lite, Education Core and Education Lite... Or Pro and Pro Lite.
Here is a list of the apps that come with Zorin OS Education:

or

2 Likes

Yes, according the list of apps, the Education Core is running here.

I was browsing through those lists to see if any of them might look like they could relate to the Terminal Function you mention.
Would you be able to post a screenshot of that terminal context menu?

Yes, sure, I was just about to create one. Here is a screenshot of the context menu on number 16, showing 0x10 in hexadecimal.
terminal context oct

Note: Unfortunately, the screenshot feature of Zorin is unresponsive when the context menu is open in the terminal. I had to find another tool (IrfanView) to create a screenshot.

terminal About

You can also open the screenshot options and do a Timed Screenshot in order to capture the Context Menu.

Looking at your screenshot - I am stumped. I have never seen that on any distro and I am not sure if it is a feature of Education or not.
I will need to look into this. Your second screenshot of the About Gnome Terminal shows a standard Gnome Terminal version.

1 Like

Yes, that is what I set in IrfanView, because a shortcut was not responsive. But I see that the native Screenshot app has this option, too. Thank you!

1 Like

Did you get Irfanview to operate on Zorin ???? .....

Never mind I found you need To install it using wine ...... :sob: :sob:

1 Like

Yes, I installed it from the Snap store.

The keyboard shortcut will be unresponsive when there's a context menu but you can search for "screenshot" in the start menu which will have the option to set a delay before taking a screenshot.
Obviously, you'd have to do this before opening the context menu.

I don't know why this behavior with the context menus is the way it is, or why the default screenshot utility does not have the delay option... but I agree it's very lacking and unintuitive.

1 Like

Hi, I'm in Core 16.3 and also have "that" too on terminal (Gnome-terminal 3.36.2).
May bee its default feature.

@fagark @thepegel
I had to install Gnome-terminal and test this. Sure enough, if you right click on the number, it presents that conversion in the context menu.

I looked around and found the following:
https://bugzilla.gnome.org/show_bug.cgi?id=741728

Which led to:
https://bugzilla.redhat.com/show_bug.cgi?id=1644986

This was an added feature to assist users with large strings.

Apparently, this should Only Appear if you Right Click On a Number. It does not always show.

Reading the gnome description, there is no way of altering or disabling it.

This feature is not present in XFCE4-terminal.

2 Likes

@Aravisian
Thanks dude, I see it. Personally I'm never mind about this feature, so leave this feature there as is.

That is cool! I never tried out the context menu on large numbers. There it shows a conversion to the closes 3-decimal (Ki, Mi, Gi,...).

@thepegel No, I do not wish to abandon the feature. I was rather intrigued by the behaviour and wanted to bend this feature or add a new one. It is born for plug-ins. Examples:

  • show the first three terms when running a translator on a word by using trans en:cs '%s'
  • convert a number to its binary format

Off-topic: I cannot find the "Mark as Solution" button. Is there any change in the forum engine?

This is the Customization discussion sub-forum. Most topics do not require a solution. We can move the thread to a sub-forum that does apply solutions if you need.
General Help, Hardware support, Installation support are the sub-forums that have the Solution Checkmark.