diff --git a/bin/tmux_battery.sh b/bin/tmux_battery.sh new file mode 100755 index 0000000..57c692c --- /dev/null +++ b/bin/tmux_battery.sh @@ -0,0 +1,6 @@ +#! /bin/bash + +capacity=$(cat /sys/class/power_supply/BAT0/capacity) +status=$(cat /sys/class/power_supply/BAT0/status) + +echo "Battery: $capacity%" diff --git a/config/.tmux.conf b/config/.tmux.conf index c5c1f50..46f5f59 100644 --- a/config/.tmux.conf +++ b/config/.tmux.conf @@ -8,7 +8,7 @@ set -wg pane-base-index 1 # statusline set -g status-left "[#S] " -set -g status-right "\"#H\" %H:%M %d-%m-%Y" +set -g status-right "[#($HOME/dotfiles/bin/tmux_battery.sh)] \"#H\" %H:%M %d-%m-%Y" set -ag status-style "bg=#d4be98" set -ag status-style "fg=#32302f"