Comments (3)
I don't like the idea of a password prompt for each and every toggle. I had a quick look at polkit and I didn't find an easy way to overcome this issue. It seems to be quite easy to disable password prompt for all privileged actions, but not for a specific custom one (e.g. a command with specific params).
Feel free to send me a pull request if you have a solution, and I'll consider it.
from gnome-shell-extension-ideapad.
I think a 2 tiered approach could work:
First: check for write access on the file, if you have access: great.
If not:
Ask the user to grant permanent permission:
If not, use polkit to set permissions on the file. This will persist until the next reboot (not great)
If permission is granted, use polkit to install and reload a new udev rule, to will grant permission on the file
(ref)
from gnome-shell-extension-ideapad.
Related Issues (16)
- Similar extension HOT 1
- Battery stabilizes at its current level HOT 1
- GNOME 41 Support
- Extension not working properly HOT 8
- Conservation mode not "enable-able" HOT 14
- Infinite loop when toggling the PopupSwitchMenuItem HOT 1
- Update to Gnome 42
- Syntax error when following the readme.md HOT 5
- monitor on sysfs doesn't work HOT 2
- Battery keeps charging in conservation mode HOT 1
- Doesn't work with Lenovo IdeaPad Gaming 3 HOT 4
- Getting incorrect status value HOT 4
- Managing keyboard HOT 3
- Cannot change conservation mode on Ideapad S540 13ARE HOT 3
- Add support for thermal profiles and rapid charge switching HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gnome-shell-extension-ideapad.