Skip to content

Commit

Permalink
Show battery information correctly on macOS; remove media playing info
Browse files Browse the repository at this point in the history
  • Loading branch information
rounakdatta committed Feb 15, 2024
1 parent c8c1c41 commit ad4a960
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions configs/tmux/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,20 @@ in
tm_session_name="#[default,bg=$base00,fg=$base0E] #S "
set -g status-left "$tm_session_name"
tm_tunes="#[bg=$base00,fg=$base0D] ♫ #(playerctl metadata title)"
''
+
(if isDarwin then
''
tm_battery="#[fg=$base0F,bg=$base00] ♥ #(pmset -g batt | grep InternalBattery | awk '{print $3}' | sed 's/;$//')"
''
else
''
tm_battery="#[fg=$base0F,bg=$base00] ♥ #(acpi --battery | awk \'{gsub(\",\", \"\"); print \$4}\')"
tm_date="#[default,bg=$base00,fg=$base0C] %I:%M %p"
''
)
+
''
tm_date="#[default,bg=$base00,fg=$base0C] %I:%M %p %Z"
tm_host="#[fg=$base0E,bg=$base00] #h "
set -g status-right "$tm_tunes $tm_battery $tm_date $tm_host"
'';
Expand Down

0 comments on commit ad4a960

Please sign in to comment.