powerdialog
PowerDialog 0.3.1
Diálogo de cierre, cierre de sesión, sueño, reiniciar PC
Simplemente instale el paquete desde el AUR, ¡maldita sea!
yay -S powerdialog
cd download_location
chmod +x powerdialog
sudo mv powerdialog /usr/bin/powerdialog
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.login1.power-off" ||
action.id == "org.freedesktop.login1.reboot" ||
action.id == "org.freedesktop.login1.suspend" ||
action.id == "org.freedesktop.login1.hibernate") {
if (subject.user == "root" &&
subject.process.binary == "/usr/bin/powerdialog") {
return polkit.Result.YES;
}
}
});
sudo systemctl restart polkit.service
Ejemplo de Hyprland:
bind = $mainMod, P, exec, powerdialog