waybar: use idle_inhibitor instead of custom module

This commit is contained in:
2025-08-10 21:07:05 +02:00
parent f1d5c8aba6
commit a37c93245c
11 changed files with 28 additions and 223 deletions

View File

@@ -1,21 +1,23 @@
#!/bin/sh
if [ "$(id -u)" -eq 0 ]; then
exit 1
exit 0
fi
if [ -n "$SUDO_USER" ]; then
exit 1
exit 0
fi
if [ "$LOGNAME" != "$USER" ]; then
exit 1
exit 0
fi
ppid=$(ps -o ppid= -p $$ 2>/dev/null)
if [ -n "$ppid" ]; then
parent_comm=$(ps -o comm= -p "$ppid" 2>/dev/null)
if [ "$parent_comm" = "su" ]; then
exit 1
exit 0
fi
fi
exit 1