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

Conversation

HarHarLinks
Copy link

@HarHarLinks HarHarLinks commented Mar 22, 2018

uses unicode point f6ff (nf-mdi-ethernet) as defined by nerdfonts

todo(?): variate icon to indicate whether ethernet or wireless is connected

@HarHarLinks HarHarLinks force-pushed the master branch 2 times, most recently from 742e6de to d9f0b4d Compare March 22, 2018 03:47
@caiogondim
Copy link
Owner

Would that run on macOS?

@HarHarLinks
Copy link
Author

In short: I think it wouldn't break on macOS, but be a useless waste of space.

(Just noting my thougths/to do:)

  • regarding 558d591: tmux-net-speed does not support macOS (as stated by it's readme). Will fix so it's only enabled when supported.
  • regarding 3108a9a: I have no experience with mac, and a quick google makes me think acpi is not available as it usually is on linux. Similar tools use pmset or ioreg on mac, however I don't feel comfortable with coding that blindly as I have no mac for testing. While chances are you would only install the plugin when you know your system has a battery, it's probably not a bad idea to keep this portable if you want to use your config on several machines. Will fix so check is ignored if it fails.
  • it's probably a good idea to make the icon portable/configurable as f6ff seems rather specific in hindsight. Will look into that, as well as tmux-online-status.

maglev.tmux Outdated
@@ -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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants