A PolicyKit agent for window managers, supporting dmenu-compatible launchers for prompts.
Written entirely in POSIX shell for portability.
Originally based on czaplicki/rofi-polkit-agent
dmenu
(password patch recommended!)rofi
fuzzel
- A POSIX-compliant shell (
sh
) - Any of the three supported launchers
cmd-polkit
jq
To install, just copy the pkmenu
script into a location in $PATH
:
$ chmod +x pkmenu
$ sudo cp pkmenu /usr/local/bin/
Basic example:
# start pkmenu with dmenu as launcher
$ pkmenu -l dmenu
Whenever PolicyKit triggers a password authentication, your chosen launcher will prompt you to enter your user password.
Additional arguments to the launcher can be passed with the -a
option:
# start pkmenu using fuzzel with red prompt colour and DejaVu Sans Mono font
$ pkmenu -l fuzzel -a "--prompt-color=ff0000ff --font='DejaVu Sans Mono'"
On most systems, you can place pkmenu.desktop
into your local XDG autostart folder, or you can start the agent
from your init script (.xinitrc
or WM config)
Make sure to replace dmenu
in pkmenu.desktop
with a launcher you have installed on your computer