Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions [email protected]/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Changelog

## Known Issues

- If PowerMan is set to replace default Power applet and then uninstalled, you may need to manually re-enable the default power applet in Applet Manager and restart the system or logout/login. If PowerMan is still installed and active, you need to enable default Power applet, then uncheck "Replace system applet", it should appear in System tray.
- If dimming is enabled and screen is dimmed (user is idle), power profile would be switched immediately, but brightness will be switched after user become active again (to avoid screen brightness dimming bugs).
- If you have dimming enabled for i.e. only battery mode, after auto switching from AC to battery, dimming would not be active until some user activity (couldn't find a way around that issue).

## [1.9.5]

- Extended default popup with switches for quickly enable / disable automation.
- Added option to remember user's "external" change of brightness with settings depending on power source.
- Refactored some internal stuff.
- Updated po / pot files.

## [1.9.1]

- Refactored whole automation logic into extension framework with hooks and dedicated managers separated from applet's main logic.
- Fixed (most of) brightness and dimming switching bugs on power source changes.
- Fixed power state when batteries are full and AC connected (since most of power line detection on 3 laptops didn't gave me some meaningful results like "AC connected", on 100% of battery it should switch onto battery mode, then after short timeout switch again onto AC mode).
- Improved responsiveness and speed of the applet.
- Added icons to notifications.
- Removed some unneeded notifications.
- Improved debug logging for troubleshooting.

## [1.6.6]

- Initial release with power profile automation.
- Added separate AC/battery brightness levels.
- All logic inside original Power applet.
140 changes: 140 additions & 0 deletions [email protected]/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
# PowerMan - Enhanced Power Manager for Cinnamon

An enhanced power management applet for Linux Mint Cinnamon that extends the default <[email protected]> applet with automation features for brightness and power profiles. Mostly usable on laptops.

![PowerMan Icon](https://img.shields.io/badge/version-1.9.1-blue) ![Cinnamon](https://img.shields.io/badge/cinnamon-6.0%2B-green) ![License](https://img.shields.io/badge/license-GPL--3.0-orange)

## Features

### 🔋 **Battery Information**

- **Battery monitoring and Brightness control** with detailed device information (laptop battery, PPD), interface is same as the original Cinnamon Power applet with added button to configure Automation Settings.

### 💡 **Automated Brightness Control**

- **Separate brightness levels** for AC power and battery operation
- **Automatic brightness switching** when power source changes
- **Idle dimming** with configurable timeout and dim levels (dconf exposed settings)
- **Screen and keyboard backlight** support via Cinnamon Settings Daemon

### ⚡ **Power Profile Automation**

- **Automatic power profile switching** between AC and battery modes
- **Performance mode** on AC power, **balanced/power-saver** on battery (or by user's choice)
- **Low battery protection** - automatic power-saver mode when battery is critical

### 🎛️ **Advanced Configuration**

- **Conditional settings visibility** - options appear only when hardware supports them
- **System integration** option to replace default Cinnamon power applet or to hide this one when you're satisfied with your settings
- **Debug logging** for troubleshooting automation issues

## Installation

### Method 1: Manual Installation

1. Download or clone this repository
2. Copy the `[email protected]` folder to `~/.local/share/cinnamon/applets/`
3. Right-click on the panel → "Applets" → Find "PowerMan" → Add to panel

### Method 2: From ZIP

1. Download the latest release ZIP
2. Extract ZIP and copy `[email protected]` folder to `~/.local/share/cinnamon/applets/`
3. If using non-English language, manually compile translations (see Translation section)
4. Add PowerMan to your panel via System Settings → Applets

## Configuration

Access settings by right-clicking the applet and selecting "Configure..." or directly from applet's popup:

### **Display and Advanced**

- **Panel Display**: Choose what information to show (battery percentage, time remaining, etc.)
- **Notifications**: Enable/disable automation notifications
- **System Integration**: Replace default power applet or hide this one
- **Debug Logging**: Enable detailed logging for troubleshooting

### **Brightness Control** *(available only if brightness control detected)*

- **Automatic Brightness**: Set different levels for AC and battery power
- **Idle Dimming**: Automatically dim screen when idle (dconf exposed settings)

### **Power Management** *(available only if power profiles and battery detected)*

- **Profile Automation**: Different power profiles for AC/battery
- **Battery Saver**: Auto-enable power-saver mode on low battery

### **System Integration**

PowerMan can replace the default Cinnamon power applet on laptop systems:

- **System tray position**: Adjustable in panel edit mode (right-click panel → "Panel edit mode")
- **Replacing default applet**: PowerMan is designed to serve as a complete replacement for the built-in power applet
- **Restoration**: If PowerMan is uninstalled, you may need to manually re-enable the default power applet in Applet Manager and restart the system or logout/login. If PowerMan is still installed and active, you need to enable default Power applet, then uncheck "Replace system applet", it should appear in System tray

## Hardware Requirements

- PowerMan is mostly usable for laptops, my own are little older.

## Compatibility

- **Cinnamon Desktop**: 6.0, 6.2, 6.4+

## Troubleshooting

### **Known Issues**

- If dimming is enabled and screen is dimmed (user is idle), power profile would be switched immediately, but brightness will be switched after user become active again (to avoid screen brightness dimming bugs)
- If you have dimming enabled for i.e. only battery mode, after auto switching from AC to battery, dimming would not be active until some user activity
- Tested on 3 different laptops (older models), VM, real hardware (office PC), seems to work fine

### **Settings not appearing**

- Restart Cinnamon: `Alt+F2` → type `r` → Enter
- Check hardware detection in debug logs
- Ensure required services are running (UPower, PowerProfiles daemon)

### **Features showing as unavailable**

- Info messages explain when hardware/software requirements are not met
- Examples: "Screen brightness control is not available" or "Power profile automation is not available"
- Enable debug logging to see detailed hardware detection results (lg)

### **Brightness control not working**

- Test manual brightness: `brightnessctl` or system settings
- Restart Cinnamon Settings Daemon: `killall csd-power`
- Check if laptop supports software brightness control

### **Power profiles not switching**

- Verify power-profiles-daemon is running: `systemctl status power-profiles-daemon`
- Test manual switching: `powerprofilesctl set balanced`

## Development

Based on the original Cinnamon Power applet with enhancements like power source automation.

### **Contributing**

- Test on multiple hardware configurations
- Add translations for additional languages using the `po/` system

### **Translation**

Croatian localization is complete. I have translated to other languages, but don't understand if it is correct, if so, please send me or add updated translation for your language.
Translation deployment depends on installation method:

**Cinnamon Spices installation**: `.po` files are automatically compiled during installation
**Manual/ZIP installation**: Requires manual `.mo` file generation and placement

## License

GPL-3.0 - Based on original Cinnamon power applet code.

## Credits

- **Original Cinnamon Power Applet**: Linux Mint Team
- **Applet icon**: <a href="https://www.flaticon.com/free-icons/batteries" title="batteries icons">Batteries icons created by phatplus - Flaticon</a>
- **Inspiration**: My aged laptops with old batteries
Loading