Comments (7)
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.
tm_battery="$battery_icon $battery_percentage $battery_remain"
This should be changed to
tm_battery="#{battery_icon} #{battery_percentage} #{battery_remain}"
from tmux-battery.
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.
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.
@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.
Hey @nerdpad, can you tell if the above has worked? Do you still have problems?
from tmux-battery.
@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)
- unable to showdischarge status in new WSL
- No indication at powerline HOT 1
- No indication at all HOT 1
- [feature] Support Android HOT 3
- Add colour for battery_status when charging HOT 1
- I'm seeing time remaining as a decimal not time HOT 3
- Support for custom background colors HOT 2
- Separate custom background and foreground colors
- Contributor name fix HOT 2
- Unable to see battery_percentage in status-right HOT 2
- Status line print the decimal points of the percentage of the remaining battery
- Can I use this on WSL? HOT 1
- [Solved] battery percentage wrong when I have a second battery
- UPS support
- Feature: Suggest to charge/remove charging at 20% or 80%
- Is there a way to make the background "transparent" or at least consistently one color? HOT 2
- Battery status not showing in Termux HOT 1
- batt_icon_status_charged /_charging, .._discharching: HOT 3
- battery status does not work with acpi (but with upower)
- Two Battery Laptop (Lenovo Thinkpad T70s) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tmux-battery.