A custom Powerline segment for displaying the current state of Podman containers
Project description
A custom Powerline segment for displaying the current state of Podman containers. Inspired by powerline-docker.
This segment also requires the Podman REST API service to be running:
podman system service -t 0 &
See Podman docs for more details.
Installation
Using pip
$ pip install powerline-podman
Configuration
Colorscheme
Add the following config items to your Powerline colorscheme config file (usually located at ~/.config/powerline/colorschemes/
),
see Powerline Colorschemes for more info.
{
"podman": { "fg": "gray8", "bg": "darkestpurple", "attrs": [] },
"podman_created": { "fg": "yellow", "bg": "darkestpurple", "attrs": [] },
"podman_exited": { "fg": "brightred", "bg": "darkestpurple", "attrs": [] },
"podman_paused": { "fg": "brightestorange", "bg": "darkestpurple", "attrs": [] },
"podman_running": { "fg": "green", "bg": "darkestpurple", "attrs": [] },
"podman_unknown": { "fg": "gray10", "bg": "darkestpurple", "attrs": [] },
"podman:divider": { "fg": "gray4", "bg": "darkestpurple", "attrs": [] }
}
Segment
Add the following config item to your Powerline segments config file, see Powerline Segment reference for more info.
The segment tries to connect to the libpod service at unix:///run/user/1000/podman.sock
, which is where it lives on most Unix systems. You can change the URI with the uri
argument.
Additionally, you can hide containers with specific states e.g. don't show exited
containers by adding it to the ignore_states
argument list.
The valid states are created
, exited
, paused
, running
, and unknown
.
{
"function": "powerline_podman.podman",
"priority": 30,
"args": {
"uri": "unix:///run/user/1000/podman.sock",
"ignore_states": ["exited", "paused"]
}
}
- If adding the segment to the shell, edit
~/.config/powerline/themes/shell/default.json
. - If adding the segment to the tmux status line, edit
~/.config/powerline/themes/tmux/default.json
.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file powerline_podman-1.0.3.tar.gz
.
File metadata
- Download URL: powerline_podman-1.0.3.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ebc554a66bea67b711ce0b8a12644f6165be3fa8d5141d54ef92e2947afde4ae |
|
MD5 | dc44dd9d887e0c99e656cd92adc155f9 |
|
BLAKE2b-256 | 3278579f41ba87b36c85209698493d97fd6c968d2d9e4c0b8506e6cb8285d45b |
File details
Details for the file powerline_podman-1.0.3-py3-none-any.whl
.
File metadata
- Download URL: powerline_podman-1.0.3-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ee1b936b24c6a4bb6e84a5160033801368966509a78e4d36c3e7effb6579c1f |
|
MD5 | 1036eaa53a03bf29de395d6d505e434e |
|
BLAKE2b-256 | df8c9f8935d63811320ef405595b1250d7420c7368fc617eac81fd06b46f5128 |