power menu, redshift, polybar

This commit is contained in:
azpsen
2024-01-28 16:37:10 -06:00
parent 89516a6ce1
commit 319b44ecbd
307 changed files with 7642 additions and 5 deletions

View File

@@ -0,0 +1,18 @@
# Script: isrunning-service
A script that shows if a systemd service is running. It uses `journalctl` to get realtime output.
## Configuration
Make sure that your user is member of the group `systemd-journal` to read all events.
## Module
```ini
[module/isrunning-service]
type = custom/script
exec = ~/polybar-scripts/isrunning-service.sh
tail = true
```

View File

@@ -0,0 +1,11 @@
#!/bin/sh
UNIT="docker.service"
journalctl --follow -o cat --unit $UNIT | while read -r; do
if [ "$(systemctl is-active "$UNIT")" = "active" ]; then
echo "#1"
else
echo "#2"
fi
done