{"id":17656409,"url":"https://github.com/nwg-piotr/psuinfo","last_synced_at":"2026-03-10T14:02:35.337Z","repository":{"id":48578535,"uuid":"156790137","full_name":"nwg-piotr/psuinfo","owner":"nwg-piotr","description":"A psutil-based command to display customizable system usage info in a single line, for Tint2 executors or CLI","archived":false,"fork":false,"pushed_at":"2021-12-13T01:25:25.000Z","size":165,"stargazers_count":28,"open_issues_count":1,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-07T10:02:08.206Z","etag":null,"topics":["archlinux","i3wm","openbox","tint2","tint2-executors","void-linux"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nwg-piotr.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-09T01:05:23.000Z","updated_at":"2024-03-04T10:03:23.000Z","dependencies_parsed_at":"2022-09-23T18:40:12.170Z","dependency_job_id":null,"html_url":"https://github.com/nwg-piotr/psuinfo","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/nwg-piotr/psuinfo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwg-piotr%2Fpsuinfo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwg-piotr%2Fpsuinfo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwg-piotr%2Fpsuinfo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwg-piotr%2Fpsuinfo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nwg-piotr","download_url":"https://codeload.github.com/nwg-piotr/psuinfo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwg-piotr%2Fpsuinfo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30336070,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T12:41:07.687Z","status":"ssl_error","status_checked_at":"2026-03-10T12:41:06.728Z","response_time":106,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["archlinux","i3wm","openbox","tint2","tint2-executors","void-linux"],"created_at":"2024-10-23T14:31:58.660Z","updated_at":"2026-03-10T14:02:35.318Z","avatar_url":"https://github.com/nwg-piotr.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# psuinfo\n[![Packaging status](https://repology.org/badge/vertical-allrepos/psuinfo.svg)](https://repology.org/metapackage/psuinfo/versions)\n\nA Python psutil-based command to display customizable system usage info as icons or text. Intended for [Tint2 panel](https://gitlab.com/o9000/tint2) executors, may also be used in other panels or executed in terminal. This project derives from my [collection of Tint2 executors](https://github.com/nwg-piotr/tint2-executors) and replaces the [cpu-fan-mem.py](https://github.com/nwg-piotr/tint2-executors/blob/master/cpu-fan-mem.py) script.\n\nInspired by @tknomanzr 's [cpu.py](https://github.com/tknomanzr/scripts/blob/master/tint2/executors/cpu.py).\n\n___\nNew in 1.0-1 version:\n\n- Trailing \".0\" (which was always 0) removed from the temperature display ([feature request](https://github.com/nwg-piotr/psuinfo/issues/1));\n- 3 sample config files (psuinfo-bottom*.tint2rc) added.\n___\n\nCalled with no argument, the script will display following data (if appropriate sensors available):\n\n[![cpu-fan-mem](http://nwg.pl/wiki-tint2-executors/psuinfo-def.png)](http://nwg.pl/wiki-tint2-executors/psuinfo-def.png)\n\n- graphical CPU load bar\n- CPU speed current/max\n- core temperature\n- fan speed\n- memory available/total\n\nYou may customize display, using arguments described below:\n\n[![customized display](http://nwg.pl/wiki-tint2-executors/psuinfo-customized.png)](http://nwg.pl/wiki-tint2-executors/psuinfo-customized.png)\n\nYou may also **prepend values with appropriate icons** instead of / together with names. Only 1 value per executor allowed. To do so, use `psuinfo -I\u003ccomponent\u003e` format. See components description below.\n\n[![executors with icons](http://nwg.pl/wiki-tint2-executors/psuinfo-icons-0051.png)](http://nwg.pl/wiki-tint2-executors/psuinfo-icons-0051.png)\n\nThe line above consists of 8 executors, using commands: `psuinfo -Cg`, `psuinfo -Ia`, `psuinfo -It`, `psuinfo -If`, `psuinfo -IM`, `psuinfo -In -W0`, `psuinfo -In -W1` and `psuinfo -Iu`.\n\n**Customizing icons:**\n\nCopy the `/usr/share/psuinfo` folder to `~/.local/share`, edit .svg files inside.\n\n## Command:\n```\npsuinfo [-C{components}] | [-I{component}] [-F] [-N] [-S\u003cnumber\u003e] | [-S\u003cstring\u003e] [-M\u003cstring\u003e] [-T] [-W{number}] [-all] [-h] [--help]\n```\n\n## Arguments:\n\n```\n-C defines multiple components. -I defines a single component. If none given, -CgStfM argument will be used by default.\n\n  g - (g)raphical CPU load bar\n  p - (p)ercentage for each core (text)\n  a - (a)verage CPU load (text)\n  q - fre(q)ency for each thread\n  Q - fre(Q)ency for each thread/max frequency\n  s - current CPU (s)peed\n  S - current/max CPU (S)peed\n  t - CPU (t)emperature\n  f - (f)an speed\n  m - (m)emory in use\n  M - (M)emory in use/total\n  c - used memory per(c)entage\n  C - free memory per(C)entage\n  w - s(w)ap memory in use\n  W - s(W)ap memory in use/total\n  x - swap usage in %\n  d - (d)rives as names usage in %\n  D - (D)rives as names used/total\n  n - drives as mou(n)tpoints usage in %\n  N - drives as mou(N)tpoints used/total\n  u - (u)ptime HH:MM\n  U - (U)ptime HH:MM:SS\n  i - current WiF(i) name\n  k - current networ(k) traffic as upload/download in kB/s\n\n-F - use Fahrenheit instead of ℃\n-N - display field names (except for (g)raphical CPU load bar)\n-S\u003cnumber\u003e - number of spaces between components (-S2 if none given)\n-S\u003cstring\u003e for custom separator (use ' | ' to include spaces)\n-M\u003cstring\u003e for custom component name ('My custom name: ')\n-T - test execution time\n-all - display all possible data (for use in terminal)\n\n-I\u003ccomponent\u003e - show an icon before text; 1 component per executor allowed\n-W\u003cnumber\u003e - select 0 to n-th element from multiple output (drives, mountpoints)\n```\n\n## Sample usage:\n\n```\nNo arguments, default display:\n\n[piotr@asuspro ~]$ psuinfo\n_▁______ 1.2/3.3GHz 48.0℃ 2500/m 1.3/15.6GB\n\nCustom display, CPU average load, speed and memory w/o max values + names:\n\n[piotr@asuspro ~]$ psuinfo -Castfm -N\navCPU: 3.4%  SPD:1.5GHz  CORE:48.0℃  FAN:2500/m   MEM:1.9GB\n\nCustom display with graphical bar, average CPU speed, core temperature, fan speed, \nmemory used/total, drives usage:\n\n[piotr@asuspro ~]$ psuinfo -CgStfMD -N\n_▁___▁__  avSPD:1.4/3.3GHz  CORE:49.0℃  FAN:2500/m  MEM:1.3/15.6GB  SDB3:101.1/210.6GB  SDA1:154.1/915.9GB\n\nYou may use a custom separator:\n\n[piotr@asuspro ~]$ psuinfo -CgStfmxdu -N -S' ┊ '\n__▁_▁___ ┊ avSPD:1.8/3.3GHz ┊ CORE:47.0℃ ┊ FAN:2500/m ┊ MEM:2.0GB ┊ SWAP:0.0% ┊ SDB3:50.6% ┊ SDA1:15.4% ┊ UP:3:06\n\nAll available information (use in terminal e.g. to check which data will be available on a certain machine). \nTime of execution on the very end:\n\n[piotr@asuspro ~]$ psuinfo -all\n___▁____  CPU: 2%  3%  3%  8%  3%  2%  3%  3%   avCPU: 2.4%  CPU:1.3|1.3|1.3|1.3|1.3|1.3|1.3|1.3/3.3GHz  avSPD:1.3/3.3GHz  CORE:47.0℃  FAN:2500/m  MEM:1.3/15.6GB  MEM:12.3%  SWAP:0.0/8.0GB  SDB3:101.1/210.6GB  SDA1:154.1/915.9GB  UP:1:07:03  [2.148s]\n```\n\n### Execution time:\n\nSince execution of the `psutil.cpu_percent()` function takes a certain time (set to 1 second here), it makes sense to learn how long it takes your customized command to produce output. To do so, use the `-T` argument:\n\n```\n[piotr@asuspro ~]$ psuinfo -CgStfM -T\n▁▁__▁___  2.0/3.3GHz  48.0℃  2500/m  1.3/15.6GB  [1.012s]\n```\n\nExecuting the command above took 1.113 second. To use it in a Tint2 executor, it makes sense to set at least 2 seconds long interval:\n```\nexecp_interval = 2\n```\n\n**Why does it take so long?**\n\n1. Data collection time for `g` and `p` component in the script is set to 1 second\n2. Data collection time for `a` component is also set to 1 second\n\nIf you'd like to use (`g` **and**/**or** `p`) **and** `a`, the executor interval should be \u003e 2 seconds.\n```\npiotr@asuspro ~]$ psuinfo -Cga -T -N\n_____▁__  avCPU: 3.0%  [2.139s]\n``` \nSince data are being collected only once, multiple use of components doesn't change much:\n```\n___▁▁▁▁_ avCPU:~4.4% [2.003s]\n[piotr@asuspro ~]$ psuinfo -Cggppaa -T -N\n___▁____  ___▁____  CPU: 4%  2%  2%  7%  2%  5%  1%  3%   CPU: 4%  2%  2%  7%  2%  5%  1%  3%   avCPU: 3.9%  avCPU: 3.9%  [2.105s]\n```\n\n## Sample Tint2 executor:\n\n(fixed width font recommended)\n\n```\n#-------------------------------------\n# Executor 1\nexecp = new\nexecp_command = psuinfo -N\nexecp_interval = 2\nexecp_has_icon = 0\nexecp_cache_icon = 1\nexecp_continuous = 1\nexecp_markup = 1\nexecp_tooltip = \nexecp_lclick_command = \nexecp_rclick_command = \nexecp_mclick_command = \nexecp_uwheel_command = \nexecp_dwheel_command = \nexecp_font = Monospace 10\nexecp_font_color = #aaaaff 100\nexecp_padding = 0 0\nexecp_background_id = 0\nexecp_centered = 0\nexecp_icon_w = 0\nexecp_icon_h = 0\n```\n\n## Installation:\n\n### Arch Linux\n\n[psuinfo](https://aur.archlinux.org/packages/psuinfo) AUR package.\n\n### Void Linux\n\nThe `psuinfo` package v1-0_1 in official repository.\n\n**Dependencies:** `python` (`python3`), `python-psutil` (`python3-psutil`)\n\nThe script was not tested with Python versions below 3.5.\n\n## Warning messages in terminal\n\nSince about 2 releases back the `psutil.sensors_temperatures()` command returns a stderr warning:\n\n\u003e RuntimeWarning: ignoring FileNotFoundError(2, 'No such file or directory') for file '/sys/class/hwmon/hwmon0/temp2_input'\n\nThe issue was discussed on the project site, but no action has been taken. It does not stop psuinfo from \nworking well with panels, but looks ugly in terminal output. I tried to supress warnings, by moving the\nscript to `/usr/share/psuinfo/psuinfo.py` and adding a shell launcher script:\n\n```bash\n#!/usr/bin/env bash\n\nexec /usr/share/psuinfo/psuinfo.py \"$@\" 2\u003e/dev/null\n```\n\nFor some reason the script executed this way consumes three times as much CPU power, so I gave up. However, \nyou can consider thit for use in terminal.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnwg-piotr%2Fpsuinfo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnwg-piotr%2Fpsuinfo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnwg-piotr%2Fpsuinfo/lists"}