Skip to main content

Nov 5, 2024

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]+%')

2. Make the file executable

chmod +x battery.sh

3. Call it from tmux.conf

tmux.conf
set -g status-right "#($HOME/.config/tmux/battery.sh)"