Skip to content

Conversation

@thewraith420
Copy link

No description provided.

Refactored power-desklet@thewraith420 to remove the tabbed interface
and replace it with a button-based toggle for the Nvidia settings.
This change provides a more streamlined user experience by combining
both Lenovo Vantage and Nvidia Prime functionalities into a single view.

Also, brought devtest-lenovo-vantage@thewraith420 into compliance
with the standard Cinnamon desklet file structure. This involved:
- Moving desklet.js, icon.png, metadata.json, settings-schema.json, and stylesheet.css
  into the nested 'files/devtest-lenovo-vantage@thewraith420/' directory.
- Creating info.json, README.md, and screenshot.png in the root directory.
- Creating a simplified metadata.json in the nested 'files/' directory.
… Prime integration

- Refactor desklet.js for improved UI structure, modularity, and updated settings handling.
- Introduce new battery display modes and quick toggle buttons with enhanced styling.
- Integrate new Nvidia Prime profile switching logic with custom icons (Intel and Hybrid modes).
- Update settings-schema.json to reflect new configurable options and better organization.
- Simplify info.json and update screenshot.png.
- Remove old README.md.
- Adds the new lenovo-vantage desklet with its complete set of files.
- Updates the test-spice file with recent changes.
…ion handling

- Replaced insecure 'gnome-terminal' and 'sudo' fallbacks/wrappers with direct 'pkexec' via 'Gio.Subprocess' for 'prime-select' and '/sys' file writes.
- Modified 'systemctl reboot' to also use 'pkexec' with 'Gio.Subprocess' for explicit privilege escalation.
- Added robust error handling and user notifications for privileged operations.
- Enhanced security and user experience by leveraging PolicyKit more effectively.
- Fixed duplicate _applySettings function definition
- Fixed missing parenthesis in if statement (line 717)
- Reduced nvidia profile button size (50px -> 28px) with proportional adjustments
- Reduced button padding and spacing for compact layout
- Updated rapid charge and conservation mode buttons to use nvidia accent color
- Changed battery bar gradient to use accent text color for consistency
- Add missing _applyConservationMode() and _applyRapidCharge() functions
- Implement _writeSysFile() with proper pkexec authentication
- Replace broken Gio.Subprocess calls with working pkexec implementation
- Add user feedback notifications for authentication and status
- Handle authentication cancellation with graceful fallback
- Improve error handling and logging
- Update helper script to properly support pkexec for sysfs writes
- Implement multi-method authentication with pkexec and sudo fallback
- Pass DISPLAY and XAUTHORITY environment variables to pkexec for better GUI interaction
- Replace Gio.Subprocess with Util.spawn for simplified reboot command
- Add interactive countdown timer dialog during reboot sequence
- Add 'Cancel Reboot' button to allow users to abort automatic reboot
- Show desktop notifications with countdown timer
- Update dialog styling to match rest of desklet design system
- Use dynamic colors from desklet settings (background, accent, NVIDIA green)
- Implement proper timeout and interval cleanup on dialog close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant