Skip to content

Commit

Permalink
tmux show battery
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyagreco committed Aug 19, 2024
1 parent 9770070 commit ec9d622
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .tmux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ set -g @light-black "#242424"
# GENERAL #
###########

# refresh status bar every n seconds
set -g status-interval 15

# Start windows and panes at 1, not 0
# you can't 1 index sessions. why? that's a great question.
# https://unix.stackexchange.com/questions/313577/how-to-make-tmux-sessions-count-from-1-instead-of-0
Expand All @@ -36,9 +39,6 @@ set-option -g escape-time 10
# detect focus in a pane
set -g focus-events on

# true color support. determined by checking value of $TERM
#set-option -a terminal-features ',xterm-256color:RGB'

# set ctrl+x to prefix
unbind-key C-b
set-option -g prefix C-x
Expand All @@ -61,7 +61,7 @@ set -g history-limit 10000
# STATUS BAR
set -g status-style "bg=#{@purple},fg=#{@teal}"
# e.g. 'Monday May 27 4:34 PM'
set -g status-right "%A %B %-e %-I:%M %p "
set -g status-right "#(~/scripts/bash/battery.sh) | %A %B %-e %-I:%M %p "

# Show session name and window number on the bottom left
set -g status-left-length 40
Expand Down
1 change: 1 addition & 0 deletions scripts/bash/battery.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pmset -g batt | grep -Eo "\d+%" | head -1

0 comments on commit ec9d622

Please sign in to comment.