Metadata-Version: 2.4
Name: hyprpwr
Version: 0.1.0
Summary: A simple GTK power menu styled after hyprland.
Author: Jacob Juneau
License: MIT
Project-URL: Homepage, https://github.com/jacobjuneau6/hyprpwr
Project-URL: Repository, https://github.com/jacobjuneau6/hyprpwr
Project-URL: Issues, https://github.com/jacobjuneau6/hyprpwr/issues
Keywords: hyprland,gtk,powermenu,linux
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: X11 Applications :: GTK
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: PyGObject>=3.42
Dynamic: license-file

# HyprPwr

A minimal power/session menu for Hyprland written in Python and GTK3.

HyprPwr provides a small keyboard-friendly popup for common session management actions:

- Logout
- Shutdown
- Restart
- Suspend

## Features

- Lightweight GTK3 interface
- Keyboard navigation (`↑`/`↓`, `j`/`k`)
- Mouse support
- Clean floating window design
- Designed specifically for Hyprland
- No external menu launcher required

## Requirements

- Python 3
- GTK3
- PyGObject
- Hyprland

## Dependencies

### Runtime Dependencies

| Dependency | Purpose |
|------------|---------|
| Python 3.8+ | Application runtime |
| GTK 3 | User interface |
| PyGObject | Python GTK bindings |
| Hyprland | Session management integration |
| systemd | Shutdown, reboot, and suspend actions |

### Distribution Packages

#### Arch Linux

```bash
sudo pacman -S python python-gobject gtk3
```

#### Debian / Ubuntu

```bash
sudo apt install python3 python3-gi gir1.2-gtk-3.0
```

#### Fedora

```bash
sudo dnf install python3 python3-gobject gtk3
```

#### openSUSE

```bash
sudo zypper install python3-gobject gtk3
```

#### Gentoo

```bash
sudo emerge dev-python/pygobject x11-libs/gtk+
```

## Support Matrix

| Component | Status |
|-----------|--------|
| Hyprland | ✅ Supported |
| GTK 3 | ✅ Supported |
| Wayland | ✅ Supported |
| X11 | ⚠️ Untested |
| systemd | ✅ Supported |
| elogind | ⚠️ Suspend/Reboot may require customization |
| seatd | ⚠️ Untested |

### Distribution Support

| Distribution | Status |
|--------------|--------|
| Arch Linux | ✅ Tested |
| EndeavourOS | ✅ Expected to work |
| CachyOS | ✅ Expected to work |
| Manjaro | ✅ Expected to work |
| Fedora | ✅ Expected to work |
| openSUSE Tumbleweed | ✅ Expected to work |
| Debian 12+ | ✅ Expected to work |
| Ubuntu 22.04+ | ✅ Expected to work |
| NixOS | ⚠️ Untested |
| Alpine Linux | ❌ Not supported (no systemd) |

## Notes

- Logout functionality requires `hyprctl`.
- Shutdown, reboot, and suspend functionality require `systemctl`.
- The application is intended for Hyprland sessions and has not been tested on other Wayland compositors.
- Running as a normal user is recommended.

## Installation

Make the script executable:

```bash
git clone https://github.com/jacobjuneau6/hyprpwr
cd hyprpwr
chmod +x hyprpwr.py
```

Optionally install it system-wide:

```bash
sudo install -Dm755 hyprpwr.py /usr/local/bin/hyprpwr
```

## Usage

Run:

```bash
hyprpwr
```

or

```bash
python3 hyprpwr.py
```

### Keyboard Controls

| Key | Action |
|------|--------|
| Up / `k` | Move selection up |
| Down / `j` | Move selection down |
| Enter | Execute selected action |
| Space | Execute selected action |
| Esc | Close menu |

### Available Actions

| Action | Command |
|---------|---------|
| Logout | `hyprctl dispatch exit` |
| Shutdown | `systemctl poweroff` |
| Restart | `systemctl reboot` |
| Suspend | `systemctl suspend` |

## Hyprland Binding

Example keybind for launching HyprPwr:

```ini
bind = SUPER, X, exec, hyprpwr
```
