#!/usr/bin/env bash # target.sh — print the active pentest-env target for the Polybar `target` module. # Reads the plaintext display cache written by `pe target use` # (name | ip), never touches the encrypted DB. Empty output => module hidden. f="${XDG_STATE_HOME:-$HOME/.local/state}/pentest-env/active_target_display" [ -r "$f" ] || exit 0 v=$(head -n1 "$f" 2>/dev/null) [ -n "$v" ] && printf '%s' "$v"