Skip to content

tips and tricks

The Tumultuous Unicorn Of Darkness edited this page Oct 4, 2024 · 5 revisions

Tips and tricks


Fallback mode

  • The term "fallback mode" is used for alternative functions, e.g. when a function cannot gather a data, another function (called "fallback") is used to retry to gather this data.
  • Some of these fallback functions avoid empty labels if CPU-X is run as regular user, but a fallback function can fail too.

Start daemon without asking password

You can create a Polkit authorization rule for a given user or a group.

For instance, to allow members of wheel group to start daemon without entering password, create a file like /etc/polkit-1/rules.d/00-early-checks.rules and add:

polkit.addRule(function(action, subject) {
    if (action.id == "io.github.thetumultuousunicornofdarkness.cpu-x-daemon" && subject.isInGroup("wheel")) {
        return polkit.Result.YES;
    }
});

You can find your groups with the groups command.

Change default key mapping for NCurses mode

Key mapping can be changed by using the --keymap argument on command line.
To make it permanent, set the CPUX_ARGS environment variable in your shell profile (e.g. CPUX_ARGS="--keymap=vim").