Giter Club home page Giter Club logo

Comments (7)

martinbeentjes avatar martinbeentjes commented on July 25, 2024 2

First of all, @tpm_plugins is deprecated. Please change this to:

set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-battery'

Second, run '~/.tmux/plugins/tpm/tpm' should be ran at last. (So just at the end of the tmux configuration file.

Third, maybe it is me but the followings looks like it is missing some quotes:

set -g status-left $tm_session_name' '
set -g status-right $tm_tunes' '$battery_icon' '$tm_date' '$tm_host

I personally did the following:

set -g status-right "#{battery_status_bg} #{battery_percentage} #[bg=default,fg=default] #H %d/%m %H:%M"

What is the reason that you split the configuration into several different files? I personally can't find anything now in your config even with this small amount of files. I really recommend just sticking to one .tmux.conf which lives in your $HOME folder (~).

from tmux-battery.

martinbeentjes avatar martinbeentjes commented on July 25, 2024

tm_battery="$battery_icon $battery_percentage $battery_remain"

This should be changed to

tm_battery="#{battery_icon} #{battery_percentage} #{battery_remain}"

from tmux-battery.

nerdpad avatar nerdpad commented on July 25, 2024

I have tried that but I still don't see any indicator, it's completely empty.

in my tmux.conf I source the plugin.sh before the theme.sh, so the variables should be available, right?

when I echo the variables I see the following.

~/.dotfiles
⇨ echo $tm_icon     # This works
🙊

~/.dotfiles
⇨ echo $battery_percent # this doesn't. all variables related to the plugin return empty

from tmux-battery.

martinbeentjes avatar martinbeentjes commented on July 25, 2024

How did you install the plugin? I recommend using tpm. Follow their README to install tpm. After installing tpm, add set -g @plugin 'tmux-plugins/tmux-battery to your tmux configuration file. Source your configuration file, and check if it works now.

I do not understand what you are doing exactly. Try by doing exactly what the README of tpm and tmux-battery say.

from tmux-battery.

nerdpad avatar nerdpad commented on July 25, 2024

@martinbeentjes I do have tmp installed, and installed the plugin via tpm (Prefix+I), and I am following the instructions properly, the plugin is also installed.

Instead of adding the plugins in my tmux config, I created another file for them, and I am sourcing that file in my tmux.conf before I source another file (theme.sh) that actually sets the tmux status line.

tmux.plugin.sh (https://github.com/NerdPad/dotfiles/blob/master/tmux/tmux.plugins.sh)

###########################
### Tmux Plugin Manager ###
###########################

# List of plugins
set -g @tpm_plugins '           \
  tmux-plugins/tpm              \
  tmux-plugins/tmux-sensible    \
  tmux-plugins/tmux-resurrect   \
  tmux-plugins/tmux-battery     \
'

# Initialize TMUX plugin manager
run '~/.tmux/plugins/tpm/tpm'

This file is sourced in my tmux.conf

tmux.conf (https://github.com/NerdPad/dotfiles/blob/master/tmux/tmux.conf.symlink)

...
...
# load tmux plugin manager
source ~/.dotfiles/tmux/tmux.plugins.sh

#######################
### Color & Style Settings ###
#######################
		 
source ~/.dotfiles/tmux/theme.sh # this is the last line in my tmux.conf

Theme.sh that customizes tmux look. https://github.com/NerdPad/dotfiles/blob/master/tmux/theme.sh

from tmux-battery.

martinbeentjes avatar martinbeentjes commented on July 25, 2024

Hey @nerdpad, can you tell if the above has worked? Do you still have problems?

from tmux-battery.

nerdpad avatar nerdpad commented on July 25, 2024

@martinbeentjes I have currently stopped using tmux-plugins. Will close the issue for now, will open it later when I test it.

from tmux-battery.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.