Skip to main content

A custom Powerline segment for displaying the current state of Podman containers

Project description

powerline-podman

PyPI PyPI - Python Version

A custom Powerline segment for displaying the current state of Podman containers. Inspired by powerline-docker.

powerline-podman

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

powerline_podman-1.0.0.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

powerline_podman-1.0.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file powerline_podman-1.0.0.tar.gz.

File metadata

  • Download URL: powerline_podman-1.0.0.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.2

File hashes

Hashes for powerline_podman-1.0.0.tar.gz
Algorithm Hash digest
SHA256 65a3d887b8741b8e9f57c422730cd085177e1e7ceca9540ce99cf976c906a0aa
MD5 e302fcea57e3c5c9b22de807a6ed9fad
BLAKE2b-256 178096bfbb2b07982b544e2eda470a4dfc0293348b3913761d7cbe2a6e9fedd4

See more details on using hashes here.

File details

Details for the file powerline_podman-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for powerline_podman-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c9e0477679073aa5eac47fdafe71a84ad4eb45ba481daf7f66d239baabd5baa0
MD5 5bad552ddb492d5e27e92e37bc6310c5
BLAKE2b-256 7fdd639b71428278dd12b3b9bb09b57ecc850f929ee681e221bdc58cc4dc22fe

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page