Skip to content

govnorice/powerdialog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

powerdialog

Dialogue of shutdown, logout, sleep, reboot PC

2024-05-06.14-09-09.mp4

INSTALL ARCH LINUX AND OTHER

I USE ARCH LINUX BTW?

Just install the package from the AUR, damn it!

yay -S powerdialog

OR

  1. Download executable file and move to /usr/bin:
cd download_location
chmod +x powerdialog
sudo mv powerdialog /usr/bin/powerdialog
  1. Create polkit rule in "/etc/polkit-1/rules.d/powerdialog.rules":
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;
        }
    }
});
  1. Restart polkit service
sudo systemctl restart polkit.service

HOW TO USE

hyprland example:

bind = $mainMod, P, exec, powerdialog