diff --git a/src/host/rootfs/etc/tmux.conf b/src/host/rootfs/etc/tmux.conf index 1be1172..04aaca2 100644 --- a/src/host/rootfs/etc/tmux.conf +++ b/src/host/rootfs/etc/tmux.conf @@ -14,7 +14,7 @@ set-option -g status-left "[#S] " set-option -g status-right "" # The current power battery level -set-option -ag status-right " [#(cat /sys/class/power_supply/BAT0/capacity)%%]" +set-option -ag status-right '#(test -d /sys/class/power_supply/BAT0/capacity && printf " [%%s%%%%]" "$(cat /sys/class/power_supply/BAT0/capacity)")' # Current date and time, in case it's relevant, and has drifted set-option -ag status-right " [%Y-%m-%d %H:%M:%S]"