{"id":15813742,"url":"https://github.com/andreibarsan/powerline-diskspace","last_synced_at":"2026-03-03T17:03:13.677Z","repository":{"id":254776121,"uuid":"847470810","full_name":"AndreiBarsan/powerline-diskspace","owner":"AndreiBarsan","description":"A powerline segment for displaying disk utilization.","archived":false,"fork":false,"pushed_at":"2025-05-03T22:16:37.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-10T11:18:52.917Z","etag":null,"topics":["linux","macos","powerline","powerline-segment","tmux"],"latest_commit_sha":null,"homepage":"","language":"Python","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/AndreiBarsan.png","metadata":{"files":{"readme":"README.md","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,"zenodo":null}},"created_at":"2024-08-25T22:52:58.000Z","updated_at":"2025-05-03T22:16:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"2c46d14e-525a-40ef-a049-c6bf0386f25c","html_url":"https://github.com/AndreiBarsan/powerline-diskspace","commit_stats":null,"previous_names":["andreibarsan/powerline-diskspace"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/AndreiBarsan/powerline-diskspace","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreiBarsan%2Fpowerline-diskspace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreiBarsan%2Fpowerline-diskspace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreiBarsan%2Fpowerline-diskspace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreiBarsan%2Fpowerline-diskspace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndreiBarsan","download_url":"https://codeload.github.com/AndreiBarsan/powerline-diskspace/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreiBarsan%2Fpowerline-diskspace/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279007028,"owners_count":26084226,"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","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["linux","macos","powerline","powerline-segment","tmux"],"created_at":"2024-10-05T04:05:22.400Z","updated_at":"2025-10-11T11:11:50.433Z","avatar_url":"https://github.com/AndreiBarsan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Powerline Disk Utilization Indicator\n\nA tiny [Powerline](https://github.com/powerline/powerline) segment I wrote (originally for `tmux`) to show me disk space utilization in its status line. This component does not work natively with `tmux` - if you just want a native tmux-specific component, check out [tmux-df](https://github.com/tassaron/tmux-df).\n\nHere is a screenshot of this segment in action:\n\n![disk utilization example](doc/img/powerline-diskspace-screenshot.png)\n\nThe root `/` is red because, unlike `/cache`, it's over the `critical_threshold` I set to 40% for this example.\n\nIn this case, the relevant part of the powerline config (`cat ~/.config/powerline/themes/tmux/default.json`) is:\n\n```json\n{\n\"segments\": {\n  \"right\": [\n    {\n      \"function\": \"powerline_diskspace.diskspace.Diskspace\",\n      \"priority\": 30,\n      \"args\": {\n        \"format\": \"{mounted_on} @ {capacity:.0f}%\",\n        \"mount_ignore_pattern\": \"(/snap|/dev|/run|/boot|/sys/fs)\",\n        \"show_when_used_over_percent\": {\n          \"/\": 20,\n        },\n        \"critical_threshold\": 40\n      }\n    }\n  ]\n}\n}\n```\n\n(Other plug-ins featured in the screenshot, like `uptime`, are not shown.)\n\n## Getting Started\n\nSystem requirements:\n * Linux (macOS support is only partial)\n * Python 3.8+\n * [Powerline](https://github.com/powerline/powerline) set up and in use (code only tested in tmux, but other places like `vim` should work to)\n\nInstallation steps:\n\n1. Install the Python package: `pip install powerline-diskspace`.\n2. Update your `powerline` (not `tmux`!) config following the example above.\n3. Restart the Powerline daemon: `powerline-daemon --replace`\n\nIf you have any questions or encounter issues setting up, please don't hesitate to open up an issue on GitHub!\n\n\n## Customization\n\nThere are many ways to customize your output. Please refer to the `__call__` method in `diskspace.py`, which is essentially the \"main function\" of the segment for more documentation.\n\n## Development\n\n### Testing\n\n1. Create a test environment, e.g., with venv or conda.\n2. Ensure `powerline-status` and `pytest` are installed in your test environment.\n3. Run `pytest` inside the `powerline_diskspace` folder.\n\n### Deployment\n\n1. Read [the official guide](https://packaging.python.org/en/latest/tutorials/packaging-projects/#generating-distribution-archives) to refresh your memory, if needed.\n2. Ensure you have permissions to publish the package. As of 2025-05, only `AndreiBarsan` has it. Please open an issue or email Andrei if you are interested in becoming a maintainer.\n3. Bump up the version in `pyproject.toml`.\n4. Create a tag for the new version, e.g., `git tag v1.2.3`.\n5. Push the tag to GitHub: `git push origin --tags`.\n6. Create a new release. This should trigger [the deployment workflow](https://github.com/AndreiBarsan/powerline-diskspace/actions/workflows/python-publish.yml) which will build the package and push it to PyPI.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreibarsan%2Fpowerline-diskspace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreibarsan%2Fpowerline-diskspace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreibarsan%2Fpowerline-diskspace/lists"}