first commit

This commit is contained in:
2025-06-14 20:26:14 +02:00
commit 1edfd60dbd
351 changed files with 34592 additions and 0 deletions

28
waybar/modules/caffeine.sh Executable file
View File

@@ -0,0 +1,28 @@
#!/bin/env bash
function output() {
jq -n --unbuffered --compact-output \
--arg alt "$1" \
--arg class "$2" \
'{alt: $alt, class: [$class]}'
}
if [ -n "$1" ]; then
pid=$(pgrep -x "hypridle")
if [ -n "$pid" ]; then
killall hypridle > /dev/null 2>&1
else
hyprctl dispatch exec hypridle > /dev/null 2>&1
fi
exit 0
fi
sleep 0.3 # Allow hypridle to start
pid=$(pgrep -x "hypridle")
if [ -n "$pid" ]; then
output "inactive" "inactive"
notify-send "Caffeine disabled" "Caffeine mode is now inactive."
else
output "active" "active"
notify-send "Caffeine enabled" "Caffeine mode is now active."
fi