Skip to content
jakeb-grantPublic

About

A GTK-based polkit authentication agent

Topics

Resources

Stars

6 stars

Watchers

0 watching

Forks

Latest commit

 

History

82 Commits

Folders and files

Repository files navigation

phylax

A Polkit authentication agent written in GTK4 for Arch Linux.

AUR License: Apache-2.0

Every Wayland compositor needs a polkit agent, and most of the options are either unmaintained GNOME leftovers or headless password prompts. Phylax is a minimal GTK4 dialog that just works — CSS-themeable, zeroizes passwords from memory, and handles the new socket-activated polkit on Arch out of the box.

Forked from Soteria by Vaskel.

Example authentication popup

Features

  • GTK4 Native - Modern, lightweight authentication dialogs
  • User Selection - Switch between available identities when authenticating
  • Retry Support - Clear feedback on failed attempts with retry capability
  • Custom Styling - Optional CSS theming support
  • Secure - Passwords are zeroized from memory after use

Installation

AUR (recommended)

yay -S phylax-git

Prebuilt binary

Download from GitHub Releases:

tar -xzf phylax-v*.tar.gz
sudo mv phylax /usr/local/bin/

From source

git clone https://github.com/jakeb-grant/phylax.git
cd phylax
cargo build --release
sudo cp target/release/phylax /usr/local/bin/

Dependencies

  • GTK4
  • Polkit

Usage

Add Phylax to your compositor startup. For Hyprland:

exec-once = phylax
windowrulev2 = pin, class:io.github.jakebgrant.phylax

For Sway:

exec phylax

Debugging

RUST_LOG=debug phylax

Configuration

Configuration files are stored in ~/.config/phylax/.

config.toml

# Custom polkit helper path (only needed for non-standard locations)
helper_path = "/usr/lib/polkit-1/polkit-agent-helper-1"

# Socket path for polkit 127-3+ (Arch Linux)
socket_path = "/run/polkit/agent-helper.socket"

Note: Arch Linux polkit 127-3 removed setuid from the authentication helper and switched to systemd socket activation. Phylax automatically uses the socket when available and falls back to the legacy helper spawn for older polkit versions.

style.css

Custom GTK4 styling for the authentication dialog. CSS is hot-reloaded each time the dialog appears.

Available CSS Classes

Class Element
.auth-window Main window
.auth-container Outer container
.auth-header "Authentication Required" title
.auth-message Polkit message
.auth-retry Error/retry text
.auth-identity-box Dropdown wrapper
.auth-identity User dropdown
.auth-password Password entry
.auth-buttons Button container
.auth-cancel Cancel button
.auth-confirm Confirm button

Example

See examples/catppuccin-mocha.css for a complete theme.

Demo Mode

To preview styling without triggering a real authentication:

PHYLAX_DEMO=1 phylax

License

Apache-2.0

About

A GTK-based polkit authentication agent

Topics

Resources

Stars

6 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages