my_konfig

This commit is contained in:
2025-12-17 18:10:08 +01:00
parent ed4ae93364
commit 773955ef02
42 changed files with 1313 additions and 158 deletions

33
config/waybar/rclone-status.sh Executable file
View File

@@ -0,0 +1,33 @@
#!/bin/bash
# Default error state
ICON=""
TEXT="Unknown"
# Check for DBUS session
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
TEXT="No D-Bus"
else
# Check if the service is active (syncing)
if systemctl --user is-active --quiet rclone-sync.service; then
ICON=""
TEXT="Sync..."
else
# Check if the service file exists/is loaded
if ! systemctl --user list-units --all | grep -q "rclone-sync.service"; then
TEXT="No Service"
else
LAST_STATUS=$(systemctl --user show rclone-sync.service -p ExecMainStatus --value)
if [ "$LAST_STATUS" == "0" ]; then
ICON=""
TEXT="OK"
else
ICON=""
TEXT="Fehler"
fi
fi
fi
fi
# Output a single line of plain text
printf "%s %s\n" "$ICON" "$TEXT"