{"id":15902874,"url":"https://github.com/erikh/yaib","last_synced_at":"2025-03-20T19:31:28.594Z","repository":{"id":196135663,"uuid":"694230877","full_name":"erikh/yaib","owner":"erikh","description":"A simple i3wm status bar that focuses on communicating data instead of looking pretty","archived":false,"fork":false,"pushed_at":"2023-11-26T11:23:20.000Z","size":140,"stargazers_count":3,"open_issues_count":4,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-13T12:03:32.475Z","etag":null,"topics":["bar","i3","i3wm","rust","status"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/erikh.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,"governance":null}},"created_at":"2023-09-20T15:25:14.000Z","updated_at":"2023-10-14T10:02:37.000Z","dependencies_parsed_at":"2023-11-26T12:25:51.189Z","dependency_job_id":"51f0c2d5-5467-4aac-baf3-bdbede1d8f33","html_url":"https://github.com/erikh/yaib","commit_stats":null,"previous_names":["erikh/yaib"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikh%2Fyaib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikh%2Fyaib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikh%2Fyaib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikh%2Fyaib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erikh","download_url":"https://codeload.github.com/erikh/yaib/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221799221,"owners_count":16882380,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["bar","i3","i3wm","rust","status"],"created_at":"2024-10-06T12:00:26.014Z","updated_at":"2024-10-28T07:22:01.676Z","avatar_url":"https://github.com/erikh.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# yaib: Yet Another i3 Bar\n\nyaib is a very simple (at this time of writing) status bar for the i3 window\nmanager (X11) that leverages async computation to limit performance\nbottlenecks. This results in a very resource efficient bar capable of\ndisplaying statistics and other things you'd like to display.\n\nyaib is very immature at this writing. Lots of things you want won't be here.\n\nSome features:\n\n-   Expandable. Each block has an `icon` value which can then be clicked on to\n    expand it. Combine it with the urgency coloring values, and you don't have to\n    see text updating all day; just the colors when it matters.\n-   Pages: Flip between lots of different pages using the arrows. This way you\n    can hide less important things you care about in your bar, but get to them\n    when you want to.\n-   Resource light: yaib is very small and uses almost no resources.\n\nFor an example of the expansion, here's the expanded Disk section in the\ndefault configuration:\n\n\u003cimg style=\"height: 25px; width: auto\" src=\"one.png\" /\u003e\n\nAnd here it is collapsed (just click):\n\n\u003cimg style=\"height: 25px; width: auto\" src=\"two.png\" /\u003e\n\n## Installation\n\nRelease:\n\n```\ncargo install yaib\n```\n\nDevelopment (recommended):\n\n```\ncargo install --git https://github.com/erikh/yaib\n```\n\n## Execution \u0026 Setup\n\n```\nyaib\n```\n\nWill emit the bar's contents to standard output in JSON format.\n\nTo integrate it into your i3 installation, provide a stanza like so in your\n`~/.config/i3/config` file; remember to remove any other block like it.\n\n**NOTE:** in this block, you must replace `$HOME` with your home directory.\n\n```\nbar {\n    font pango:monospace 10, FontAwesome 10\n    position bottom\n    status_command $HOME/.cargo/bin/yaib\n    colors {\n        separator #666666\n        background #222222\n        statusline #dddddd\n        focused_workspace #0088CC #0088CC #ffffff\n        active_workspace #333333 #333333 #ffffff\n        inactive_workspace #333333 #333333 #888888\n        urgent_workspace #2f343a #900000 #ffffff\n    }\n}\n```\n\nDo this and reload your configuration (mod + shift + r by default) and the bar\nshould appear!\n\n## Configuration\n\nThere is an [example](example_config.yaml) configuration file. This\nconfiguration file can either be specified by setting `YAIB_CONFIG` in the\nenvironment, or by making a file in `$XDG_CONFIG_HOME/yaib/yaib.config.yaml`.\n\nField descriptions follow:\n\n-   `update_interval` is the amount of time to wait before polling the system,\n    and displaying new stats. It is specified in [fancy duration\n    format](https://docs.rs/fancy-duration/latest/fancy_duration/struct.FancyDuration.html)\n    which you can read more about at that link.\n-   `pages` is a list of pages to flip through. Each page consists of a list of items:\n    -   `name` is the name of the block. It is required, and must be unique for all blocks.\n    -   `icon` is the short initial clickable content. Not supported on static\n        values. If not provided, it will display the formatted content always.\n    -   `urgency` is a 3-element tuple of values that are all under 100. They\n        correspond to urgency values, green/yellow/red. Not supported on static\n        or music values. When under the minimum, the default text color is\n        used.\n    -   `urgency_colors` is a 3-element tuple of `#rrggbb` values. These values\n        are used when the urgency thresholds are set.\n    -   `type` is the type of block. `value` and `format` are dependent on this\n        type, so they will be specified with the type below:\n        -   `command` runs a command. It does not run it through a shell, and\n            tokenizes the value by whitespace. The value is the command to run.\n            `update_interval` can be used to override the global\n            `update_interval` for slow running or needlessly updating commands.\n            See `example_command.sh` for more information. The command must\n            emit (and only emit) a JSON blob with the following three\n            parameters:\n            -   `name`: this is the name of the block you configured it with, so it can map back.\n            -   `value`: this is the data you want to show in the bar. The icon\n                will be automatically concatenated if it exists.\n            -   `percent`: this is optional, an integer from 0-100 which helps\n                with urgency coloring.\n        -   `dynamic` is only for types which are updated by the unix socket\n            (see below). It carries no value and communicates no urgency and\n            has no format.\n        -   `static` just displays a static string set in the `value`. No\n            formatting is applied.\n        -   `music` displays several options for listing the current music track\n            playing via MPRIS (e.g., spotify, xmms). No value is used.\n            -   `%artist` is the current artist\n            -   `%title` is the current track title\n            -   `%pct_played` is the whole number percentage of how far along in the track you are.\n            -   `%total_played` is the `minute:second` time well suited for regular updates.\n        -   `cpu` are CPU metrics. Both `%count` (number of CPUs) and `%usage`\n            are available as format strings.\n        -   `disk` are storage metrics. The `value` is a mount point.\n            -   `%total` is the total user storage\n            -   `%usage` is the amount used\n            -   `%pct` is the percent of disk used.\n        -   `memory` are memory metrics. No value is used.\n            -   `%total` is the total user memory\n            -   `%usage` is the amount used\n            -   `%swap_total` is the amount of swap available\n            -   `%swap_usage` is the amount of swap used\n            -   `%pct` is the percent of memory used.\n            -   `%pct_swap` is the percent of swap used.\n        -   `load` are memory metrics. No value is used.\n            -   `%1` is the one minute load average\n            -   `%5` is the five minute load average\n            -   `%15` is the fifteen minute load average\n        -   `time` are time metrics. No value is used. The format is [chrono's\n            strftime\n            format](https://docs.rs/chrono/latest/chrono/format/strftime/index.html)\n\n## Unix Socket\n\n**NOTE:** This layer is likely to be changed dramatically in the future. It is\nrecommended that if you use this feature, you use it through `yaib` commands,\nand not writing to the socket directly, as the protocol is certain to change.\n\nYou can write blocks using the JSON format also used for the `command` type.\nOne block per write; use `yaib write-block '\u003cblock json\u003e'` to write directly to\nthe socket. The socket is also located at `/tmp/yaib.sock`; only the most\nrecent copy of `yaib` running will respond to it, but you can use this with\n`nc` et al to control it. Just barf some JSON at the socket. See\n[example_command.sh](example_command.sh) for an example of the output format.\n\nWhatever the block's `name` value is set to will replace the block in the bar.\nIf this block is not of a `dynamic` type in the configuration, it will not\npersist and be overwritten by new collection data in the next iteration (this\nbehavior is expected to change in the future).\n\n## License\n\nMIT\n\n## Author\n\nErik Hollensbe \u003cgit@hollensbe.org\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferikh%2Fyaib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferikh%2Fyaib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferikh%2Fyaib/lists"}