I want to be able to click on the kcalc icon in my taskbar and have it immediately open in scientific mode. I do not want to have to go into the menu to switch to it. Please have a way to either configure a default start mode or to add a command line parameter to specify the mode (in which case I could for instance edit the application menu shortcut to have the command be something like “kcalc --mode=scientific”).
When I test it, kcalc automatically remembers the last used mode and opens directly into that mode. So I can launch it from the taskbar directly into science mode. Does this not work for you?
Now that you mention that, I see there is a ~.config/kcalcrc file that gets updated whever I properly-close a kcalc window, and so kcalc does start in the same mode of the most-recently properly-closed kcalc window. However, part of my problem is that I have always shutdown my computer either using a “poweroff” command or a system crash, in which case that kcalc process is killed rather than being properly-closed, and what I suspect is that I had never properly closed kcalc (or I had it in simple mode when I did last properly-close it).
But what I actually really want is to have the taskbar button to consistently always start in a specific mode. Even if I changed modes! (Quite often I will change into numeral mode system to view some numbers in hex/binary, but I still don’t want to start my next kcalc instance in numeral mode…I really want to always start in science mode regardless!) Part of the reason why I want to start in science is I want to avoid having to use my mouse and I want to be able to immediately calculate exponents using “^” after I start kcalc. I don’t know if this is too much of ask, but basically I’m asking for checking if an “argv” in the main function starts with “–mode” and if so then to set the mode accordingly on start.
I see from kcalc --help that I can specify the desktop file…let me see if I can do what I want now…
hmm…reading the kde docs for “desktopfile”, but that option does seem to help me. If I could specify the rc file I want, like “kcalc --rcfile=~/kcalcrc_science” where ~/kcalcrc_science looks like:
[General]
CalculatorMode=science
then that would also work for me.
My workaround for now is that I’ve set a keyboard shortcut “F1” to go to science mode, so at least I can navigate to science mode without leaving the keyboard.