{"id":19220151,"url":"https://github.com/crazyoptimist/mblocks","last_synced_at":"2025-11-14T15:10:42.623Z","repository":{"id":260601080,"uuid":"880423277","full_name":"crazyoptimist/mblocks","owner":"crazyoptimist","description":"dwm blocks written in rust","archived":false,"fork":false,"pushed_at":"2024-11-06T19:29:11.000Z","size":37,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-04T19:42:28.228Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/crazyoptimist.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-29T17:41:00.000Z","updated_at":"2024-11-06T19:29:14.000Z","dependencies_parsed_at":"2024-11-01T10:19:10.154Z","dependency_job_id":"21528bb7-1e8a-4f2e-9101-2ccbf3bce24b","html_url":"https://github.com/crazyoptimist/mblocks","commit_stats":null,"previous_names":["crazyoptimist/mblocks"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazyoptimist%2Fmblocks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazyoptimist%2Fmblocks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazyoptimist%2Fmblocks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazyoptimist%2Fmblocks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crazyoptimist","download_url":"https://codeload.github.com/crazyoptimist/mblocks/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240293304,"owners_count":19778476,"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":[],"created_at":"2024-11-09T14:34:16.281Z","updated_at":"2025-11-14T15:10:42.573Z","avatar_url":"https://github.com/crazyoptimist.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mblocks\n\nThis program is a multi-threaded memory-safe status monitor written in Rust.\nIt updates the status only when there is a change.\n\n## Example screenshots\n\n![example](./screenshots/screenshot_1.png)\n\n## Installation\n\nClone the repository\n\nConfigure the status blocks by editing `src/config.rs`.\n\nRun the install command.\n\n```bash\nmake clean install\n```\n\nAdd `mblocks \u0026` to your `~/.xinitrc` or another shell script that will be run on boot.\n\n## Configuration\n\nThe status monitor can be configured directly in the source `src/config.rs`.\n\nStatus blocks are defined in the `BLOCKS` vector.\nEach block has a kind, executes a command, and has a prefix and a suffix for formatting.\n\nThere are 4 kinds of blocks:\n\n- Once: blocks labeled with this kind are executed once at the start of the program.\n- Periodic(N): blocks of this type are executed every N seconds.\n- Signal(S): these blocks are executed when the signal S is sent to the mblocks process.\n  To send a signal, you can use `kill -$((34 + S)) $(pidof mblocks)` where `S` is the argument given to Signal, and it should not exceed 15 (1 \u003c= S \u003c= 15).\n  This means that you can define at most 15 Signal blocks, which is large enough.\n- PeriodicOrSignal(N, S): the update of the block is made every N seconds or at the reception of the signal S.\n\nThe `command` attribute corresponds to the command to be executed and can be one of the following:\n\n- Shell(COMMAND): this executes the shell command given as arguments (e.g. ` Shell(\u0026[\"date\", \"+%a, %b %d %Y\"])`). Note the `\u0026` preceding the array of arguments!\n- Function(F): this executes the Rust function F given as argument. These latter can be placed in the directory `src/blocks/`. Check out the example functions.\n\nThe configuration file also defines the variable `SEPARATOR` that specifies the delimiter between blocks, and which could be any string.\nThe generated status starts with the value of the variable `PREFIX` and ends with the value of the variable `SUFFIX`.\n\n## Misc.\n\n- If an empty string `\"\"` is returned by a block execution, then the corresponding block will not be displayed.\n- If the exit status of a `Shell` command is non-zero, then `failed` will be shown in the status (in the corresponding block).\n- If a `Function` command returns `None`, then `failed` will be shown in the status (in the corresponding block).\n- mblocks is memory-safe; it is validated with valgrind. The memory leaks shown by valgrind are false positives related to the signal-hook crate.\n\n## Credits\n\nForked from [this repo](https://gitlab.com/mhdy/mblocks.git).\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrazyoptimist%2Fmblocks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrazyoptimist%2Fmblocks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrazyoptimist%2Fmblocks/lists"}