/ de-omarchy / bin / omarchy-plugin-list
swadhinbiswas Initial de-omarchy: Omarchy UI layer for Arch-based distros · 8/22/2026
9f393b2
47 lines · 901 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash

# omarchy:summary=List discovered shell plugins
# omarchy:group=plugin
# omarchy:args=[--json]

set -euo pipefail

json="false"

while (( $# > 0 )); do
  case "$1" in
  --json)
    json="true"
    ;;
  -h | --help)
    echo "Usage: omarchy plugin list [--json]"
    exit 0
    ;;
  *)
    echo "omarchy-plugin-list: unknown option: $1" >&2
    exit 1
    ;;
  esac
  shift
done

plugins=$(omarchy-shell shell listPlugins)

if [[ $json == "true" ]]; then
  printf '%s\n' "$plugins"
  exit 0
fi

jq -r '
  .[] |
  [ .id,
    (if .enabled then "enabled" else "disabled" end),
    (if .firstParty then "first-party" else "third-party" end),
    ((.kinds // []) | join(",")),
    (.name // "")
  ] | @tsv
' <<<"$plugins" | awk -F '\t' '
  BEGIN { printf "%-32s %-9s %-11s %-18s %s\n", "ID", "STATE", "SOURCE", "KINDS", "NAME" }
  { printf "%-32s %-9s %-11s %-18s %s\n", $1, $2, $3, $4, $5 }
'