fix: detect dmenu mode correctly using fstat

Previously, poll() on /dev/null returned "readable" (EOF),
causing dmenu mode to trigger when launched from keybinds.

Now uses fstat() to check if stdin is a pipe or regular file
before checking for data. Character devices (TTY, /dev/null)
no longer trigger dmenu mode.

Fixes items not showing when launched from window manager keybinds.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-28 16:04:01 +01:00
parent 34145d5fbe
commit 1608582cbd
3 changed files with 23 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
[package]
name = "owlry"
version = "0.1.3"
version = "0.1.4"
edition = "2024"
rust-version = "1.90"
description = "A lightweight, owl-themed application launcher for Wayland"