Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add net to status_right, solves #4 #31

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion maglev.tmux
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ fi
SHOW_BATTERY=false
if [[ $PLUGINS == *"tmux-battery"* ]]; then
# if no battery can be found but the plugin is still enabled, this might result in some blank space in status-right
SHOW_BATTERY=true
if [ ! x"$(uname -s)" = x"Linux" ] || [[ "$(ls /sys/class/power_supply)" == *"BAT"* ]]; then
Copy link
Author

@HarHarLinks HarHarLinks Mar 24, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out, this is how it works later on in the battery function, so it is just as compatible.
While I believe this isn't perfect, it should work on linux as long as battery drivers work properly.

No Idea what happens on macOS without battery (iMac, Mac Pro) or how to handle it if necessary.

SHOW_BATTERY=true
fi
fi
SHOW_NET=false
# net-speed plugin only works on linux as of yet (2018-03-24)
Expand Down