sankalp 626665e3e2 feat(root): Revamp README to showcase new CLI capabilities and project structure
Switch to more descriptive headings and embed badges for quick visual cues. Provide explicit command usage examples and clarify under‑the‑hood layout.

New Features
- Added clear command examples for graphics, battery, power, cooling, and inhibit operations.
- Highlighted benefits such as charge‑limit tuning and TDP limits.

Enhancements
- Reorganized content with badges, dividers, and a project layout diagram.
- Improved readability and navigation of key features.

Bug Fixes
- None.
2026-03-12 20:20:00 +05:45

License: MIT Rust Linux

Take full control of your Linux laptop hardware with a fast, zero dependency CLI tool built in Rust.


Why lapctl?

Modern Linux laptops often have great hardware that goes underutilized or requires heavy, bloated background services to manage. lapctl changes that.

Built with performance and simplicity in mind, it talks directly to your system's hardware interfaces (sysfs, acpi, udev). No background daemons (unless you want them), no heavy RAM usage just pure control from your terminal.


Key Features

  • Graphics Switching: Effortlessly toggle between Integrated, NVIDIA, and Hybrid modes. Optimize for battery life on the go or raw performance at your desk.
  • Battery Health: Modern batteries hate being at 100% all the time. Set custom charge limits (like 80%) to significantly extend your battery's lifespan.
  • Power Tuning: Switch through performance profiles or set hard CPU power (TDP) limits in Watts to keep things cool or let them loose.
  • Intelligent Cooling: Force your fans into Performance, Balanced, or Quiet modes (supporting ASUS and Lenovo laptops).
  • Sleep Inhibitor: Running a long compile or a critical download? Use the inhibitor to stop your laptop from falling asleep mid task.
  • Instant Status: Get a bird's eye view of your hardware state, battery health, and current limits with one simple command.

Quick Start Guide

# Manage your GPU
lapctl gpu integrated  # Max battery
lapctl gpu hybrid      # Best of both worlds
lapctl gpu nvidia      # High performance

# Prolong battery life
lapctl battery limit 80
lapctl battery status

# Tune your power
lapctl power performance
lapctl power battery-save
lapctl power limit-tdp 35  # Stay under 35W

# Adjust your fans
lapctl cooling quiet
lapctl cooling performance

# Keep it awake
lapctl inhibit --daemon  # Run in background
lapctl inhibit -- why "Critical update" ./long-task.sh

# Check everything
lapctl status

Under the Hood

The project is structured for speed and modularity:

lapctl
│
├── src/
│   ├── main.rs         # The entry point
│   ├── cli.rs          # Command definition & parsing
│   ├── commands/       # Feature logic (GPU, Battery, etc.)
│   ├── hardware/       # Hardware specific drivers (NVIDIA, etc.)
│   └── utils/          # System helpers
│
└── tests/              # Robust integration & unit tests

Development & Connection

We love seeing how you use lapctl!

  • Contribute: Found a bug or have a feature idea? Open an issue or submit a Pull Request. We're always looking for help supporting more laptop brands!
  • Testing: Please ensure all tests pass by running cargo test before submitting changes.
  • Shoutout: Huge thanks to EnvyControl for the inspiration on graphics management.

License

This project is licensed under the MIT License. You are free to use, modify, and distribute it as you see fit. See LICENSE for the full text.


If you find lapctl useful, please consider starring the repository!
S
Description
Zero dependency Rust CLI for managing Linux laptop hardware via sysfs/acpi; GPU switching, battery health, power limits, and cooling.
Readme MIT
330 KiB
0 Stars 1 Watchers 0 Forks
v0.3.5
Latest
2026-05-29 10:55:14 +00:00
Languages
Rust 99.4%
Just 0.6%