Skip to main content

You can run shell scripts in tmux.conf

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

Related to #tmux