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
#15)

* Show battery information correctly on macOS; remove media playing info

* Apply nixfmt
  • Loading branch information
rounakdatta authored Feb 15, 2024
1 parent c8c1c41 commit a12326a
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 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)"
tm_battery="#[fg=$base0F,bg=$base00] ♥ #(acpi --battery | awk \'{gsub(\",\", \"\"); print \$4}\')"
tm_date="#[default,bg=$base00,fg=$base0C] %I:%M %p"
''
+
(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 %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 a12326a

Please sign in to comment.