isrunning-docker: add script
This commit is contained in:
parent
1b308586f4
commit
df73bc91d7
13
polybar-scripts/isrunning-docker/README.md
Normal file
13
polybar-scripts/isrunning-docker/README.md
Normal file
@ -0,0 +1,13 @@
|
||||
# Script: isrunning-docker
|
||||
|
||||
A script that shows if te docker is running.
|
||||
|
||||
|
||||
## Module
|
||||
|
||||
```ini
|
||||
[module/isrunning-docker]
|
||||
type = custom/script
|
||||
exec = ~/polybar-scripts/isrunning-docker.sh
|
||||
interval = 10
|
||||
```
|
7
polybar-scripts/isrunning-docker/isrunning-docker.sh
Normal file
7
polybar-scripts/isrunning-docker/isrunning-docker.sh
Normal file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "$(systemctl is-active docker.service)" = "active" ]; then
|
||||
echo "#1"
|
||||
else
|
||||
echo "#2"
|
||||
fi
|
Loading…
x
Reference in New Issue
Block a user