From e445ec248b9d9824a1528cc9272ae1676fb594df Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Wed, 2 Apr 2025 16:21:03 +0200 Subject: [PATCH] Update README.md --- README.md | 82 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 80 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 37b2c91..a5f1746 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,80 @@ -# hibernate -πŸ’€ A Python script to configure hibernation on Linux systems using a swap file, including GRUB and initramfs integration. Optional swap file creation with custom size support. +# Hibernate Setup Script + +A Python-based utility for configuring hibernation on Linux systems using a swap file. +This script automates resume configuration for GRUB and initramfs, and optionally creates a swap file of configurable size. + +--- + +## πŸ›  Features + +- Create and activate a swap file (optional) +- Automatically detect UUID and resume offset +- Inject `resume` and `resume_offset` into GRUB +- Regenerate initramfs via `mkinitcpio` +- Supports Arch-based systems (Manjaro, Arch, etc.) +- Root permission required + +--- + +## πŸ“¦ Installation + +This utility is available via **Kevin’s Package Manager**: +➑️ [github.com/kevinveenbirkenbach/package-manager](https://github.com/kevinveenbirkenbach/package-manager) + +```bash +pkgmgr install setup-hibernate +``` + +--- + +## πŸš€ Usage + +Run the script as root: + +```bash +sudo ./hibernate_setup.py [OPTIONS] +``` + +### Options + +| Option | Description | +|------------------------|-------------------------------------------------| +| `--create-swapfile` | Creates a swap file at `/swapfile` | +| `--swap-size ` | Size in GB (default: `32`) | + +### Example + +```bash +sudo ./hibernate_setup.py --create-swapfile --swap-size 40 +``` + +--- + +## βœ… Requirements + +- Python 3 +- Tools: `fallocate`, `mkswap`, `swapon`, `filefrag`, `findmnt`, `mkinitcpio`, `update-grub` +- Root privileges + +No external Python packages are required (no `requirements.txt` needed). + +--- + +## πŸ€– AI-Assisted Development + +This script was developed with the help of [ChatGPT](https://chat.openai.com) +πŸ”— [Click here to view the development conversation](https://chatgpt.com/share/67ed158b-66d4-800f-b418-e52460c225ce) + +--- + +## πŸ‘€ Author + +Developed by **Kevin Veen-Birkenbach** +🌐 https://www.veen.world/ + +--- + +## πŸ“„ License + +This project is licensed under the **MIT License**. +See [LICENSE](./LICENSE) for details.