mirror of
https://github.com/bvanroll/_dotfiles.git
synced 2025-08-30 04:22:47 +00:00
init
This commit is contained in:
19
.config/i3blocks/docker/README.md
Normal file
19
.config/i3blocks/docker/README.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# docker
|
||||
|
||||
Show the number of running `Docker` containers and latest created container IP address.
|
||||
|
||||

|
||||
|
||||
# Dependencies
|
||||
|
||||
*docker*
|
||||
|
||||
# Config
|
||||
|
||||
```
|
||||
[docker]
|
||||
command=$SCRIPT_DIR/docker
|
||||
color=#0db7ed
|
||||
interval=10
|
||||
LABEL=🐳
|
||||
```
|
8
.config/i3blocks/docker/docker
Executable file
8
.config/i3blocks/docker/docker
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Number of docker containers running
|
||||
count=$(docker ps -q | wc -l | sed -r 's/^0$//g')
|
||||
# Recent docker container IP
|
||||
recent_ip=$(docker inspect -f "{{ .NetworkSettings.IPAddress }}" $(docker ps -ql))
|
||||
|
||||
echo "$LABEL$count: $recent_ip"
|
BIN
.config/i3blocks/docker/docker.jpg
Normal file
BIN
.config/i3blocks/docker/docker.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.1 KiB |
5
.config/i3blocks/docker/i3blocks.conf
Normal file
5
.config/i3blocks/docker/i3blocks.conf
Normal file
@@ -0,0 +1,5 @@
|
||||
[docker]
|
||||
command=$SCRIPT_DIR/docker
|
||||
color=#0db7ed
|
||||
interval=10
|
||||
LABEL=🐳
|
Reference in New Issue
Block a user