I’ve looked for a while but couldn’t seem to find any way to get KRunner to show thousands separators for calculator results. I would really appreciate if this was added, as larger numbers are a lot easier to read when you have separators. For example, if you put 10^6
in KRunner, I would like for it to be able to show 1,000,000
instead of 1000000
.
You can check this code building up on the original calculator plasmoid and make the small changes to it for formatting:
Then just build it and add as a plugin
to krunner
.
But I understand you are proposing this idea for the base calculator.
Thank you! That was really helpful. I forked the plasmoid and added the thousands separator I wanted.
I do still wish this was in the base calculator though. There are a few differences between the two that slightly annoy me, such as a difference in precision. Do you know where I can find the source code for the actual KRunner calculator? I’ve looked through the KRunner repo but couldn’t seem to find anything (I’m unfamiliar with C/C++ and KDE’s codebases so I might have missed it).
This one probably, but I don’t see the calculator code.
This has some runners:
Again, no calculator. You might give it more time to find it.
Just for reference, the code for the Calculator runner lives in the main Plasma Workspace project: runners/calculator · master · Plasma / Plasma Workspace · GitLab
Thank you so much! That is exactly what I was looking for.