Create a shell script: battery.sh#!/usr/bin/env bash echo "♥" $(pmset -g batt | grep -Eo '[0-9]+%') Make the file executable: chmod +x battery.sh Call it from within tmux.conf: tmux.confset -g status-right "#($HOME/.config/tmux/battery.sh)"