Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

type cpu not working #471

Open
KaiserStefanI opened this issue Oct 23, 2024 · 1 comment
Open

type cpu not working #471

KaiserStefanI opened this issue Oct 23, 2024 · 1 comment

Comments

@KaiserStefanI
Copy link

  {
    "type": "cpu",
    "refreshInterval": 3,
    "width": 80
  },

does only show "unknown" box on Touch Bar.

MacOS 15.0.1
MTMR 0.27

@eighteeneightythree
Copy link

eighteeneightythree commented Feb 2, 2025

I don't think the v0.27.0 release supports this, it didn't work for me (showed the same "unknown" box).

I built the app from source code because "matchAppId" wasn't working either and now the "type": "cpu" icon works out of the box.

Here is a workaround I used from the presets repo:

//CPU
{
    "type": "shellScriptTitledButton",
    "width": 70,
    "refreshInterval": 10,
    "source": {
        "inline": "top -l 2 -n 0 -F | egrep -o ' \\d*\\.\\d+% idle' | tail -1 | awk -F% '{p = 100 - $1; if (p > 30) c = \"\\033[33m\"; if (p > 70) c = \"\\033[30;43m\"; printf \"%s%4.1f%%\\n\", c, p}'"
    },
    "align": "left",
    "image": {
        "base64": "iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAACv0lEQVRYR9WXS4iNcRjGfw8RkdtCsbBWCjuUSyQbC5c0jZoFShjKbeOyUAYrxILBBhOZJENZIXJZYENKWc9mSrnkEmHm1TP9P505zpnvOzkc/puvc77/5fne93me9/2LBg8VOT8ipgNrgEfAFUl9ETEB2Ah4j3ZJbyJiCLAKmA10SHqWt39RAEeB7cBLYJGknohoBi6kA1okdUbEJOAOMBU4LmlbvQCcBDYB3cA8Sd0R4d/+36NVUntETAEeAH46Kq3/L4CIGA0sBeYAi4FpwEfgGvAOMC/mpy+8DzwHxgHLAa99AdxOvLkhyWt/GRU5EBGjgIMOLTAsL4w5778Bp4Ddkj6Vz60GwAQ7DwwH3gNvE9trwRIpImOBr8B6SR1FARwDtgIfgA2JWJZYLaMPmAucBsYAJyRtqQigROcjAS9ckHL+k/W1nJzNLVOFOXEP8Id8znyiPwURcRjYWeGQAQAiYnwi3uQqfOrxITaltG+pLMuX9PtEBqAJaANGpFl2OTO5VPc+3GRaMQgxvwNX7ZCS3pZFwCroBwZ8AfZLupgBGApMTKRzCg4BLWUAlgGX05zBMmLCNUm6XgbArrknpcBzXknqraaCPOfrBO4CBu7RCywErB6Pws6YRcAhXwL46QisTrke1HpLw1DAmm1Wl1IEnIpbkl5nAByaAxW0Xk8AA/AC+yS1ZQD2JhKWp+SvAWhECm5arv8MCYvI0Po3+10f8mTYLKmrsAwjop5G1OX6UasRNdyKZwJrS5zwTxcjO+E5SU+rkTArx+4FXI4fJgOppSgWL8flu6aOt6ENiSuhC5L7/nq0ZGeAXZX6wqr3gtSUrgRmlTQotTalbkAeu0TX1JRWSEledSxc/Sq2ZHnMioiGAzgC7Gjk1WwGsA544ppecjndnKLnjje7nLqXMG/OWud50S10Oc3b5Hfe/wClM+Qw17N9TwAAAABJRU5ErkJggg=="
    },
    "bordered": false
},


OSX 15.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants