prasanthrangan / hyprdots

// Aesthetic, dynamic and minimal dots for Arch hyprland
GNU General Public License v3.0
6.86k stars 817 forks source link

[Feature Request]: Doas support instead of sudo #1266

Open ItsLiyua opened 5 months ago

ItsLiyua commented 5 months ago

Feature Request

Description

I'd like to see a feature that allows you to use doas instead of sudo since sudo is a very big project and therefore a more common attack surface.

Use Case

sudo had its bugs and exploits in the past and doas is a way simpler program which still does what most people use sudo for. I don't know if you use elevated privileges in any of your custom scripts (besides the install script) so I don't know if I can uninstall sudo after running the install script.

Proposed Solution

I'd like to see either an autodetection during the install script or an option to select the program of your choice.

Alternatives

I guess the alternatives are to use sudo but some people just prefer doas

Additional Information

If by any chance you don't know what doas is: It does basically the same as what most people use sudo for. It has a lot less features than sudo but most of them aren't used by the majority of users anyway. Here's the archwiki if that helps: https://wiki.archlinux.org/title/Doas

kRHYME7 commented 5 months ago

how about letting a polkit handle it? still unsafe?

ItsLiyua commented 5 months ago

how about letting a polkit handle it? still unsafe?

I can't tell you whether that"s safe or not as I haven't really dealt with polkit yet. Either way you can't assume it's already set up so the install script would have to take are of that as well. And for setting up polkit you'll need root access which means either sudo or doas again.

kRHYME7 commented 5 months ago

For the installation( which probably polkit don't exist yet ), we can add checks if users have doas or sudo. Adding check for doas as priority and fallback to sudo.

For the whole Theming experience, will try to use the polkit as much as possible. (Hyprland encourages having a polkit.) then again fallsback to doas then sudo.

its-19818942118 commented 5 months ago

That honestly really good option I agree with this cuz I think the way Hyde is switching it needs even bits of customizability

kRHYME7 commented 5 months ago

@ItsLiyua Please checkout https://github.com/prasanthrangan/hyprdots/pull/1390 as I cannot really test the entire changes yet.