Adds Android icon/battery plugin support#480
Adds Android icon/battery plugin support#480guixxx wants to merge 3 commits intoPowerlevel9k:masterfrom guixxx:master
Conversation
Plus fixes #479, which was causing integer overflow on 32-bit CPUs
|
😆 Awesome! That was fast. Thank you very much for your contribution! |
|
|
||
| # Reset start time | ||
| _P9K_TIMER_START=99999999999 | ||
| _P9K_TIMER_START=2147483647 |
There was a problem hiding this comment.
Could you add a comment, that this is the maximum integer on 32bit?
|
|
||
| # Disable false display of command execution time | ||
| _P9K_TIMER_START=99999999999 | ||
| _P9K_TIMER_START=2147483647 |
There was a problem hiding this comment.
Could you add a comment, that this is the maximum integer on 32bit? <- Here as well
|
Awesome! One thing: Our development branch is |
|
How can I do that? 😐 I'm completely new to the git universe, I created my account a few days ago. I could search on how to do that, but I don't want to risk messing things up. Thanks. |
bhilburn
left a comment
There was a problem hiding this comment.
Thanks so much for the PR, @guixxx! Nice work. Especially impressive how quickly you went from filing a bug to filing a PR if you are still learning git!
I'm excited to get this merged and think we can do it quickly. I'd like to just address a small item, first :)
functions/utilities.zsh
Outdated
|
|
||
| # Not all OSes support the '-o' parameter | ||
| # That's why this second condition is needed | ||
| case $(uname -o 2>/dev/null) in |
There was a problem hiding this comment.
Hm, I see why you did this, but at the same time, breaking this out of the main case statement will result in every OS evaluating this conditional, even if the OS has already been discovered.
What does uname return on Android? Linux? If so, perhaps we can add this as a second conditional within the Linux case in the main statement.
There was a problem hiding this comment.
Thanks for your kind words! Yes, you're right and I've fixed it. Let me know what you think now!
|
I just installed And @bhilburn : Yes, |
|
I was wondering if it would be better to do something like ... functions/utilities.zsh Main file: That way we can add support for 32-bit without changing 64-bit, and also use |
|
Don't forget that the |
Er, actually, it is set in Are you working off of an older branch, by chance?
Excellent suggestion, @onaforeignshore! I actually tried to implement this, and discovered that while I'm on a 64-bit machine, my ZSH shell is only compiled to support 4-byte integers. I guess the Fedora packager for ZSH just decided that 4-bytes is fine, and rolled with it. Since $ARCH isn't a good indicator, the only other way would be to directly test bit precision in the shell. This seemed like a bit overboard for a number that will rarely overflow 0xFFFFFFFF, though, so I left it as-is for now. |
|
This PR has been merged into |
|
Hey guys! Sorry for the very late response. First of, thanks for adding this PR. :) I've just updated my powerlevel9k to the master branch, and I got this error:
Which refers to this line:
That hex notation represents the maximum unsigned integer value in 32-bit systems. Since zsh scripts don't have the luxury of unsigned integers, we need to change that value to the maximum signed integer in 32-bit, which is Thanks guys. |
Plus fixes #479, which was causing integer overflow on 32-bit CPUs.