🦀 Rust
🪶 GTK4
🚀 Wayland & X11
📂 Open-source
Linux Battle Shaper (LBS) is a modern Linux utility (similar to BES for Windows) that allows you to limit the CPU usage of specific processes.
- 🎯 Precise Limiting: Set CPU usage limits from 0% to 99.9%.
- 🔄 Fine-tuned Cycles: Adjust the "Awake Cycle" frequency from 2ms to 400ms to balance smoothness and resource saving.
- 🖥️ Universal Focus Monitor: Automatically unlimit a process when you switch to its window. Supports:
- Hyprland (native)
- Sway (native)
- KDE Plasma (Wayland via D-Bus and X11)
- GNOME, XFCE, and others (X11/XWayland via xprop)
- 📥 Tray: Minimize to a system tray icon showing the current status (Active/Idle).
- 🛡️ Safe: Automatically sends
SIGCONTto all limited processes on exit to prevent them from hanging in a STOP state. - ⚡ Fast: Written in Rust for maximum performance and minimal memory footprint.
- AppImage: Download the latest version from the Releases page. (run
chmod +x LBS-v0.1.0.AppImageand then./LBS-v0.1.0.AppImageand see Usage)
- AUR:
yay -S lbsor
paru -S lbs - Launch LBS.
- Click the "Target..." button to select a process from the list.
- Adjust the limit slider (e.g., -50% will limit the process to half its speed).
- Enable "Unlimit at Focus" in the settings if you want the app to run at full speed whenever its window is active. (optional)
You will need Rust, GTK4, xprop and dbus-send installed on your system.
-
Install Rust.
-
Install build-time dependencies:
- Ubuntu/Debian:
sudo apt install build-essential libgtk-4-dev pkg-config - Arch Linux:
sudo pacman -S --needed base-devel gtk4 pkg-config - Fedora:
sudo dnf install gtk4-devel pkgconf-pkg-config
- Ubuntu/Debian:
-
Clone the repository:
git clone https://github.com/Agzes/LBS.git cd LBS -
Build the project:
cargo build --release
-
Run the binary:
./target/release/lbs
- Open LBS and go to "Settings"
- Click "Uninstall (Remove all traces)"
- Remove the AppImage file.
- Run
yay -Rns lbsorparu -Rns lbs
Distributed under the MIT License. See LICENSE for more information.
With ❤️ by Agzes
pls ⭐ project!