tmux-plugins / tmux-cpu

Plug and play cpu percentage and icon indicator for Tmux.
MIT License
444 stars 69 forks source link

stopped working after using dracula theme #51

Closed hannadrehman closed 4 years ago

hannadrehman commented 4 years ago

it stopped working after i used dracula theme for tmux.

set -g @plugin 'dracula/tmux'

ctjhoa commented 4 years ago

Can you share your .tmux.conf please?

hannadrehman commented 4 years ago

i now use gruvbox theme. but the issue is same, it stopped showing in the statusbar

# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
bind r source-file ~/.tmux.conf \; display '~/.tmux.conf sourced'

set -g history-limit 5000                 # boost history

set -g monitor-activity on
set -g visual-activity off
set -g status-bg "#40514e"
set -g status-fg "white"
set -g default-terminal "screen-256color"
set-option -s escape-time 10

set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'nhdaly/tmux-better-mouse-mode'
set -g @plugin 'egel/tmux-gruvbox'
set -g @plugin 'dracula/tmux'

set -g -q mouse on

run -b '~/.tmux/plugins/tpm/tpm'
ctjhoa commented 4 years ago

@hannadrehman I do not see tmux-cpu plugin in your config

ctjhoa commented 4 years ago

Adding this line

diff --git a/home/ctjhoa/.tmux.conf.bad b/home/ctjhoa/.tmux.conf
index 122b7e016a..0426d54394 100644
--- a/home/ctjhoa/.tmux.conf.bad
+++ b/home/ctjhoa/.tmux.conf
@@ -17,6 +17,7 @@ set -g @plugin 'tmux-plugins/tpm'
 set -g @plugin 'nhdaly/tmux-better-mouse-mode'
 set -g @plugin 'egel/tmux-gruvbox'
 set -g @plugin 'dracula/tmux'
+set -g @plugin 'tmux-plugins/tmux-cpu'

 set -g -q mouse on

Edit: Remove wrong screenshot

ctjhoa commented 4 years ago

Ok so I want to clarify some things here. dracula/tmux doesn't rely on tmux-cpu to display CPU usage. Adding this line to your config works like a charm

diff --git a/.tmux.conf.bad b/.tmux.conf
index 122b7e0..e4bb790 100644
--- a/.tmux.conf.bad
+++ b/.tmux.conf
@@ -19,5 +19,6 @@ set -g @plugin 'egel/tmux-gruvbox'
 set -g @plugin 'dracula/tmux'

 set -g -q mouse on
+set -g @dracula-cpu-usage true

 run -b '~/.tmux/plugins/tpm/tpm'

2020-06-29-124553_1870x798_scrot

ctjhoa commented 4 years ago

If you want to use egel/tmux-gruvbox instead, you need to install both egel/tmux-gruvbox & tmux-plugins/tmux-cpu then override gruvbox default status (https://github.com/egel/tmux-gruvbox/blob/master/tmux-gruvbox-dark.conf#L45).