From 888a04424f738d692d376fa4a36b2b90460f2d3e Mon Sep 17 00:00:00 2001 From: Sanchayan Maity Date: Mon, 19 Oct 2020 15:25:16 +0530 Subject: [PATCH] tmux: Show battery and timing information in status line --- .gitmodules | 3 +++ tmux/.tmux.conf | 17 +++++++++++++++++ tmux/.tmux/plugins/tmux-battery | 1 + 3 files changed, 21 insertions(+) create mode 160000 tmux/.tmux/plugins/tmux-battery diff --git a/.gitmodules b/.gitmodules index 909e87d..d71d6e6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -16,3 +16,6 @@ [submodule "tmux/.tmux/plugins/tmux-butler"] path = tmux/.tmux/plugins/tmux-butler url = https://github.com/woodstok/tmux-butler +[submodule "tmux/.tmux/plugins/tmux-battery"] + path = tmux/.tmux/plugins/tmux-battery + url = https://github.com/tmux-plugins/tmux-battery diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index 0ec0653..3fbc853 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -103,6 +103,22 @@ set-option -g message-style fg=colour187,bg='#000000' # Set extrakto clip tool. Default is xclip. set -g @extrakto_clip_tool "xsel --input --clipboard" +# Battery +set -g @batt_icon_charge_tier8 '🌕' +set -g @batt_icon_charge_tier7 '🌖' +set -g @batt_icon_charge_tier6 '🌖' +set -g @batt_icon_charge_tier5 '🌗' +set -g @batt_icon_charge_tier4 '🌗' +set -g @batt_icon_charge_tier3 '🌘' +set -g @batt_icon_charge_tier2 '🌘' +set -g @batt_icon_charge_tier1 '🌑' +set -g @batt_icon_status_charged '🔋' +set -g @batt_icon_status_charging '⚡' +set -g @batt_icon_status_discharging '👎' +set -g @batt_color_status_primary_charged '#3daee9' +set -g @batt_color_status_primary_charging '#3daee9' +set -g status-right '#{battery_status_bg} #{battery_icon} #{battery_percentage} #{battery_remain} | %a %h-%d %H:%M ' + # Plugins run-shell '~/.tmux/plugins/tmux-resurrect/resurrect.tmux' run-shell '~/.tmux/plugins/tmux-continuum/continuum.tmux' @@ -110,5 +126,6 @@ run-shell '~/.tmux/plugins/tmux-yank/yank.tmux' run-shell '~/.tmux/plugins/tmux-copycat/copycat.tmux' run-shell '~/.tmux/plugins/tmux-open/open.tmux' run-shell '~/.tmux/plugins/tmux-butler/tmux-butler.tmux' +run-shell '~/.tmux/plugins/tmux-battery/battery.tmux' set -g @continuum-restore 'on' diff --git a/tmux/.tmux/plugins/tmux-battery b/tmux/.tmux/plugins/tmux-battery new file mode 160000 index 0000000..f8b8e84 --- /dev/null +++ b/tmux/.tmux/plugins/tmux-battery @@ -0,0 +1 @@ +Subproject commit f8b8e8451990365e0c98c38c184962e4f83b793b