Skip to content

cobaltgit/pkmenu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

pkmenu

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

Supported launchers

Requirements

  • A POSIX-compliant shell (sh)
  • Any of the three supported launchers
  • cmd-polkit
  • jq

Installation

To install, just copy the pkmenu script into a location in $PATH:

$ chmod +x pkmenu
$ sudo cp pkmenu /usr/local/bin/

Usage

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'" 

Autostart

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