{"id":22464023,"url":"https://github.com/halosghost/plug","last_synced_at":"2025-03-27T14:29:30.132Z","repository":{"id":149471211,"uuid":"170944165","full_name":"HalosGhost/plug","owner":"HalosGhost","description":"a basic implementation of a .so-based plugin loader","archived":false,"fork":false,"pushed_at":"2024-04-13T22:19:36.000Z","size":83,"stargazers_count":1,"open_issues_count":6,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-01T18:43:12.300Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","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/HalosGhost.png","metadata":{"files":{"readme":"README.rst","changelog":null,"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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-16T00:03:55.000Z","updated_at":"2022-12-30T00:45:32.000Z","dependencies_parsed_at":"2024-04-19T06:18:53.876Z","dependency_job_id":null,"html_url":"https://github.com/HalosGhost/plug","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HalosGhost%2Fplug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HalosGhost%2Fplug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HalosGhost%2Fplug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HalosGhost%2Fplug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HalosGhost","download_url":"https://codeload.github.com/HalosGhost/plug/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245862580,"owners_count":20684710,"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-12-06T09:15:09.719Z","updated_at":"2025-03-27T14:29:30.095Z","avatar_url":"https://github.com/HalosGhost.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"plug\n====\n\n**This is just a proof-of-concept—it is not intended for use in-production.**\n**Use at your own risk.**\n\nIt is intended to be inspirational and instructive; it is not intended to be production-quality code.\nThe above in-mind, some steps have been taken to be reasonably portable and stable.\n\n:code:`plug` is intended to serve as a framework for a configurable status bar, for the moment.\nIt will eventually allow for callbacks so that you can have it do whatever you want with the plugin output; but, for the moment, it will support writing plugin output to the X root window's name (for WMs like dwm), or stdout.\n\ntl;dr\n-----\n\nThe :code:`dlopen()` family of functions is the POSIX-compliant method for loading a shared library at runtime.\nTherefore, if you are looking for a simple, portable system for modules, this is the way.\n\nfeatures\n--------\n\n* Discovers and loads an arbitrary number of plugins\n* Automatically allocates a buffer according to each module's requested size\n* Outputs the results of each module\n\napi\n---\n\nModules may expose whatever symbols they would like; however, there are only a few symbols which are resolved by the loader:\n\n* :code:`size` (the size of the buffer that should be allocated for the plugin)\n* :code:`interval` (the interval (in seconds) for when :code:`play` should be called; :code:`0` disables the module)\n* :code:`setup` (an initialization function run when loading each plugin, *optional*)\n* :code:`play` (the main function of the plugin, expected to finish either by early-exit in the case of failure or by writing the plugin's formatted state to the buffer argument)\n* :code:`teardown` (a cleanup function run when unloading each plugin, *optional*)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalosghost%2Fplug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhalosghost%2Fplug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalosghost%2Fplug/lists"}