- New Features - Enhancements: Simplify directory creation error handling - Bug Fixes: Ensure proper early return when creating parent directories fails
lapctl
lapctl is a fast and easy command line tool made in Rust. It helps you control your Linux laptop hardware from the terminal.
You can use it to change your graphics card mode, set battery charge limits, pick power profiles, and control the cooling fans. It talks directly to your system hardware, so it does not need any heavy background programs to run.
What It Can Do
Graphics Control
Easily switch between Integrated, Nvidia, and Hybrid graphics modes to save battery or get more power.
Battery Health
Set a battery charge limit like 80% to make your battery last longer over the years.
Power Saving
Change power profiles and set CPU power limits to save energy when you need it.
Cooling Control
Control the cooling fans for laptops like Lenovo or ASUS to keep your computer quiet or cool.
Hardware Status
Check the status of your battery, graphics, and power all in one place.
How to Use It
# Graphics
lapctl gpu integrated
lapctl gpu hybrid
lapctl gpu nvidia
# Battery limit
lapctl battery limit 80
lapctl battery status
# Power mode
lapctl power performance
lapctl power balanced
lapctl power battery-save
# Power limit in Watts
lapctl power limit-tdp 35
# Cooling fans
lapctl cooling performance
lapctl cooling balanced
lapctl cooling quiet
# Check everything
lapctl status
File Layout
lapctl
│
├── Cargo.toml
├── README.md
├── LICENSE
├── .gitignore
│
├── src/
│ ├── main.rs
│ ├── cli.rs
│ ├── lib.rs
│ │
│ ├── commands/
│ │ ├── mod.rs
│ │ ├── gpu.rs
│ │ ├── battery.rs
│ │ ├── power.rs
│ │ ├── cooling.rs
│ │ ├── install_rules.rs
│ │ └── status.rs
│ │
│ ├── hardware/
│ │ ├── mod.rs
│ │ └── gpu.rs
│ │
│ └── utils/
│ └── system.rs
│
└── tests/
├── cli.rs
└── gpu.rs
Project Goals Finished
- CLI setup and routing
- Graphics switching (Wayland & Xorg)
- Battery limits tools
- System status checking
- Tool configuration saving
- Cooling fan setup
- CPU power limit setup
Contributions
We welcome your ideas and help!
To contribute, please fork the repository, create a new feature branch, and submit a Pull Request. Please ensure all tests pass by running cargo test before submitting your changes.
Special Credit
Special thanks to EnvyControl by bayasdev. lapctl uses many ideas from EnvyControl to handle graphics setup on Linux.
License
This project uses the MIT License.
You can use, change, and share this software freely under the rules of the license. Check the LICENSE file in this folder for details.
⭐ If you like this tool, please consider starring the repository!