{"id":18289185,"url":"https://github.com/cmsj/lcd4linux_rotator","last_synced_at":"2025-04-09T07:16:27.616Z","repository":{"id":6600799,"uuid":"7843924","full_name":"cmsj/lcd4linux_rotator","owner":"cmsj","description":"Allow a label/widget pair to rotate between several data sources","archived":false,"fork":false,"pushed_at":"2013-01-26T21:54:43.000Z","size":136,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-15T01:32:40.786Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/cmsj.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}},"created_at":"2013-01-26T21:29:03.000Z","updated_at":"2014-01-12T23:39:46.000Z","dependencies_parsed_at":"2022-09-16T02:50:36.961Z","dependency_job_id":null,"html_url":"https://github.com/cmsj/lcd4linux_rotator","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/cmsj%2Flcd4linux_rotator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmsj%2Flcd4linux_rotator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmsj%2Flcd4linux_rotator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmsj%2Flcd4linux_rotator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cmsj","download_url":"https://codeload.github.com/cmsj/lcd4linux_rotator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247994136,"owners_count":21030050,"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-05T14:05:00.836Z","updated_at":"2025-04-09T07:16:27.594Z","avatar_url":"https://github.com/cmsj.png","language":"Python","readme":"\n#lcd4linux rotator\n##by Chris Jones \u003ccmsj@tenshu.net\u003e\nReleased under the GNU GPL v2 only. All Rights Reserved.\n--------------------------------------------------------\n\nThis is a class for use with lcd4linux. Its task is simple.\nYou want a Bar Widget to alternate between multiple sources\nof information (e.g. cycle through 5 disks to show their usage).\n\nTo achieve this, you should call this plugin roughly in this\nfashion in your lcd4linux.conf:\n\n    Widget LabelAllDisks {\n        class 'Text'\n        update 1000\n        width 4\n        expression python::exec('lcd4linux_rotator', 'main', 'AllDisks key root=/,md0=/data,home=/home)\n    }\n    Widget BarAllDisks {\n        class 'Bar'\n        update 1000\n        length 16\n        direction 'E'\n        min 0\n        max 100\n        expression path=python::exec('lcd4linux_rotator', 'main', 'AllDisks value') ; ((statfs(path, 'blocks') - statfs(path, 'bavail')) / statfs(path, 'blocks'))*100\n    }\n\nNow let's explain what that all meant.\n\nThe first widget is a label that updates every 1000msec and gets its value\nfrom a python expression. That expression calls the \"main\" methid in this\nmodule (\"lcd4linux_rotator\") and passes in a string of data.\n\nThe format of that string is: \"NAME TYPE [KEY=VALUE,,,,]\"\n\nNAME - The name of this instance of lcd4linux_rotator. You can have as many as\nyou want, just use the same name in the label and bar, so the module knows\nwhich one you want.\n\nTYPE - This indicates to the module which type of widget you are. There are\ncurrently two types, 'key' and 'value'. If you're the 'key' kind, you\nwill get the keys, if you are the 'value' kind you will get the values.\n\nKEY=VALUE - These are the keys and values mentioned previously. The key is\nthe string to the left of the = and the value is the string to the right.\nNote that you don't have to specify all the keys/values for both of the places\nyou use this class, but if you do specify them twice they *must* be identical.\n\n\nSo what will happen in this example is that each second, lcd4linux will\nupdate both of these widgets and the label will show \"root\" first, then\n\"md0\" a second later, then \"home\" a second later.\nMeanwhile the bar widget will represent the percentage of disk space used\non \"/\" at first, then \"/data\" a second later, then \"/home\" a second later.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmsj%2Flcd4linux_rotator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcmsj%2Flcd4linux_rotator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmsj%2Flcd4linux_rotator/lists"}