polybar / polybar-scripts

This is a community project. We write and collect scripts for polybar!
The Unlicense
2.46k stars 338 forks source link

Altering vpn-wireguard-wg #432

Closed shoddysheep closed 1 year ago

shoddysheep commented 1 year ago

Hello Polybar team!

Instead of adding wg to sudoers, would it be possible to use an authenticator to enable/disable wireguard? With an authenticator, I simply just mean an ordinary box that pops up (which most distros have by default) when you try to run an action/cmd that requires sudo. My bash skills aren't really worthy of mentioning, just getting into it with Polybar, so I am not quite sure how to go about it.

x70b1 commented 1 year ago

Not sure, but I guess you talk about something like askpass? I would say you have to install an askpass helper. And then you should change the line from sudo to sudo -A.

Maybe not a working solution, but hint how you could start to find a way.